swftools-vl.spec 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # Filter Python modules from Provides
  2. %{?filter_setup:
  3. %filter_provides_in %{python_sitearch}/.*\.so$
  4. %filter_setup
  5. }
  6. #% define with_pdflib_lite 1
  7. Name: swftools
  8. Version: 0.9.1
  9. Release: 1%{?_dist_release}
  10. Summary: SWF manipulation and generation utilities
  11. Group: Applications/Multimedia
  12. # swftools is GPLv2+ licensed, lib/MD5.c is BSD licensed,
  13. # lib/action/actioncompiler.c is LGPLv2+ licensed
  14. License: GPLv2+ and LGPLv2+ and BSD
  15. URL: http://www.swftools.org
  16. Source0: http://www.swftools.org/%{name}-%{version}.tar.gz
  17. # Add prefix to installation paths
  18. Patch0: swftools-0.9.1-prefix.patch
  19. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  20. BuildRequires: fftw-devel
  21. BuildRequires: fontconfig-devel
  22. BuildRequires: giflib-devel
  23. BuildRequires: libjpeg-devel
  24. # self-build-lame provides lame-devel
  25. ##BuildRequires: lame-devel
  26. #BuildRequires: python-imaging-devel
  27. BuildRequires: python-devel
  28. BuildRequires: python-imaging
  29. BuildRequires: zziplib-devel
  30. %{?with_pdflib_lite:BuildRequires: pdflib-lite-devel}
  31. %description
  32. SWFTools is a collection of utilities for working with Adobe Flash files (SWF
  33. files). The tool collection includes programs for reading SWF files, combining
  34. them, and creating them from other content (like images, sound files, videos or
  35. source code).
  36. %package -n python-%{name}
  37. Summary: Python bindings for %{name}
  38. Group: System Environment/Libraries
  39. Requires: %{name} = %{version}-%{release}
  40. %description -n python-%{name}
  41. This package provides Python bindings for %{name}.
  42. %prep
  43. %setup -q
  44. %patch0 -p1 -b .prefix
  45. # Fix permissions
  46. chmod -x lib/*.[ch] lib/action/*.[ch]
  47. # Fix encoding
  48. for file in AUTHORS src/{jpeg2swf.1,swfstrings.1}; do
  49. iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
  50. touch -r $file $file.new && \
  51. mv $file.new $file
  52. done
  53. %build
  54. export PYTHON_INCLUDES=$(python-config --includes)/Imaging
  55. export PYTHON_LIB=$(python-config --libs)
  56. export PYTHON_LIB2=$PYTHON_LIB
  57. export HAVE_PYTHON_IMAGING_LIB=1
  58. %configure
  59. %__make %{?_smp_mflags}
  60. %install
  61. %__rm -rf $RPM_BUILD_ROOT
  62. %__make install DESTDIR=$RPM_BUILD_ROOT
  63. %__mkdir_p $RPM_BUILD_ROOT%{python_sitearch}
  64. %__install -Dp lib/python/*.so $RPM_BUILD_ROOT%{python_sitearch}
  65. %clean
  66. %__rm -rf $RPM_BUILD_ROOT
  67. %files
  68. %defattr(-,root,root,-)
  69. %doc AUTHORS ChangeLog COPYING doc/fileformat.sc
  70. %{_bindir}/*
  71. %{_mandir}/man1/*.1.*
  72. %{_datadir}/%{name}
  73. %files -n python-%{name}
  74. %defattr(-,root,root,-)
  75. %{python_sitearch}/*.so
  76. %changelog
  77. * Fri Apr 01 2011 Munehiro Yamamoto <munepi@vinelinux.org> - 0.9.1-1
  78. - initial build
  79. * Thu Jan 10 2011 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.9.1-3
  80. - Remove pdflib-devel from BuildRequires
  81. * Thu Nov 11 2010 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.9.1-2
  82. - Add missing BuildRequires fftw-devel and zziplib-devel
  83. - Re-enable Python modules build
  84. * Sun Jun 13 2010 Mohamed El Morabity <melmorabity@fedoraproject.org> 0.9.1-1
  85. - Update to 0.9.1
  86. - Disable Python modules build (broken in 0.9.1)
  87. * Wed Jun 3 2010 Mohamed El Morabity <melmorabity@fedoraproject.org> 0.9.0-1
  88. - Initial RPM release