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