]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with php # PHP binding | |
4 | %bcond_with java # Java binding (native library build broken) | |
5 | %bcond_with ruby # Ruby binding (unfinished) | |
6 | ||
7 | Summary: Ming - an SWF output library | |
8 | Summary(pl.UTF-8): Ming - biblioteka do produkcji plików SWF | |
9 | Name: ming | |
10 | Version: 0.4.8 | |
11 | %define ver_tag %(echo %{version} | tr . _) | |
12 | Release: 16 | |
13 | License: LGPL v2.1+ | |
14 | Group: Libraries | |
15 | #Source0Download: https://github.com/libming/libming/releases | |
16 | Source0: https://github.com/libming/libming/archive/%{name}-%{ver_tag}.tar.gz | |
17 | # Source0-md5: 70c28c1e41d5888aa158e6e15644b742 | |
18 | Patch0: %{name}-perl-shared.patch | |
19 | Patch1: am.patch | |
20 | Patch2: flex.patch | |
21 | Patch3: tcl-libx32.patch | |
22 | Patch4: swig.patch | |
23 | URL: http://www.libming.net/ | |
24 | BuildRequires: autoconf | |
25 | BuildRequires: automake | |
26 | BuildRequires: bison | |
27 | BuildRequires: flex | |
28 | BuildRequires: freetype-devel >= 2 | |
29 | BuildRequires: giflib-devel >= 4.1 | |
30 | %{?with_java:BuildRequires: jdk} | |
31 | BuildRequires: libpng-devel | |
32 | BuildRequires: libstdc++-devel | |
33 | BuildRequires: libtool >= 2:1.5 | |
34 | BuildRequires: python-devel >= 1:2.4 | |
35 | BuildRequires: rpm-perlprov >= 4.0.2-24 | |
36 | BuildRequires: rpm-pythonprov | |
37 | BuildRequires: rpmbuild(macros) >= 1.344 | |
38 | %{?with_ruby:BuildRequires: ruby-devel} | |
39 | BuildRequires: swig | |
40 | BuildRequires: swig-tcl | |
41 | BuildRequires: tcl | |
42 | BuildRequires: tcl-devel | |
43 | BuildRequires: zlib-devel | |
44 | %if %{with php} | |
45 | BuildRequires: %{php_name}-program | |
46 | BuildRequires: %{php_name}-devel >= 4:5.3 | |
47 | %endif | |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
49 | ||
50 | %description | |
51 | Ming is a C library for generating SWF ("Flash") format movies, plus a | |
52 | set of wrappers for using the library from c++ and popular scripting | |
53 | languages like PHP, Python, and Ruby. | |
54 | ||
55 | %description -l pl.UTF-8 | |
56 | Ming jest biblioteką w C do generowania animacji w formacie SWF | |
57 | ("Flash") wraz z zestawem wrapperów do używania jej z C++ i | |
58 | popularnymi językami skryptowymi, takimi jak PHP, Python i Ruby. | |
59 | ||
60 | %package devel | |
61 | Summary: Ming development files | |
62 | Summary(pl.UTF-8): Pliki dla programistów Ming | |
63 | Group: Development/Libraries | |
64 | Requires: %{name} = %{version}-%{release} | |
65 | Requires: giflib-devel | |
66 | ||
67 | %description devel | |
68 | Header files for ming library (C and C++). | |
69 | ||
70 | %description devel -l pl.UTF-8 | |
71 | Pliki nagłówkowe dla biblioteki ming (do C i C++). | |
72 | ||
73 | %package static | |
74 | Summary: Ming static library | |
75 | Summary(pl.UTF-8): Statyczna biblioteka Ming | |
76 | Group: Development/Libraries | |
77 | Requires: %{name}-devel = %{version}-%{release} | |
78 | ||
79 | %description static | |
80 | Static Ming library. | |
81 | ||
82 | %description static -l pl.UTF-8 | |
83 | Statyczna biblioteka Ming. | |
84 | ||
85 | %package utils | |
86 | Summary: Ming utilities | |
87 | Summary(pl.UTF-8): Narzędzia Ming | |
88 | Group: Applications/File | |
89 | ||
90 | %description utils | |
91 | Ming utilities: | |
92 | - listswf - swf format disassembler | |
93 | - listfdb - show contents of fdb font file | |
94 | - makefdb - rip fdb font definition files out of a generator template | |
95 | file | |
96 | - swftophp - attempt to make a php/ming script out of an swf file | |
97 | ||
98 | %description utils -l pl.UTF-8 | |
99 | Narzędzia Ming: | |
100 | - listswf - disasembler plików swf | |
101 | - listfdb - pokazuje zawartość plików fontów fdb | |
102 | - makefdb - wyciąga pliki definicji fontów fdb z pliku generatora | |
103 | - swftophp - próbuje zrobić skrypt php/ming z pliku swf | |
104 | ||
105 | %package -n java-ming | |
106 | Summary: Ming Java classes | |
107 | Summary(pl.UTF-8): Klasy Ming dla Javy | |
108 | Group: Libraries/Java | |
109 | Requires: %{name} = %{version}-%{release} | |
110 | ||
111 | %description -n java-ming | |
112 | Ming Java classes. | |
113 | ||
114 | %description -n java-ming -l pl.UTF-8 | |
115 | Klasy Ming dla Javy. | |
116 | ||
117 | %package -n perl-ming | |
118 | Summary: Ming Perl module | |
119 | Summary(pl.UTF-8): Moduł Perla Ming | |
120 | Group: Development/Languages/Perl | |
121 | Requires: %{name} = %{version}-%{release} | |
122 | Obsoletes: ming-perl < 0.2a-1 | |
123 | ||
124 | %description -n perl-ming | |
125 | Ming perl module - perl wrapper for Ming library. | |
126 | ||
127 | %description -n perl-ming -l pl.UTF-8 | |
128 | Moduł perla Ming - perlowy wrapper do biblioteki Ming. | |
129 | ||
130 | %package -n %{php_name}-ming | |
131 | Summary: Ming module for PHP | |
132 | Summary(pl.UTF-8): Moduł Ming dla PHP | |
133 | Group: Development/Languages/PHP | |
134 | Requires: %{name} = %{version}-%{release} | |
135 | %{?requires_php_extension} | |
136 | ||
137 | %description -n %{php_name}-ming | |
138 | PHP interface to Ming SWF generating library. | |
139 | ||
140 | %description -n %{php_name}-ming -l pl.UTF-8 | |
141 | Interfejs PHP do biblioteki Ming generującej pliki SWF. | |
142 | ||
143 | %package -n python-ming | |
144 | Summary: Ming Python module | |
145 | Summary(pl.UTF-8): Moduł biblioteki Ming dla języka Python | |
146 | Group: Development/Languages/Perl | |
147 | Requires: %{name} = %{version}-%{release} | |
148 | Requires: python-libs | |
149 | ||
150 | %description -n python-ming | |
151 | Ming Python module. | |
152 | ||
153 | %description -n python-ming -l pl.UTF-8 | |
154 | Moduł biblioteki Ming dla języka Python. | |
155 | ||
156 | %package -n tcl-ming | |
157 | Summary: Ming module for Tcl | |
158 | Summary(pl.UTF-8): Moduł Ming dla Tcl-a | |
159 | Group: Development/Languages/Tcl | |
160 | Requires: %{name} = %{version}-%{release} | |
161 | Requires: tcl | |
162 | ||
163 | %description -n tcl-ming | |
164 | Tcl interface to Ming SWF generating library. | |
165 | ||
166 | %description -n tcl-ming -l pl.UTF-8 | |
167 | Interfejs Tcl do biblioteki Ming generującej pliki SWF. | |
168 | ||
169 | %prep | |
170 | %setup -q -n libming-%{name}-%{ver_tag} | |
171 | %patch0 -p1 | |
172 | %patch1 -p1 | |
173 | %patch2 -p1 | |
174 | %patch3 -p1 | |
175 | %patch4 -p1 | |
176 | ||
177 | %build | |
178 | %{__libtoolize} | |
179 | %{__aclocal} -I macros | |
180 | %{__autoconf} | |
181 | %{__autoheader} | |
182 | %{__automake} | |
183 | %configure \ | |
184 | --enable-perl \ | |
185 | %{?with_php:--enable-php} \ | |
186 | --enable-python \ | |
187 | --enable-tcl \ | |
188 | --disable-silent-rules | |
189 | ||
190 | %{__make} -j1 \ | |
191 | mingc_ladir=%{_libdir}/tclming | |
192 | ||
193 | %if %{with java} | |
194 | %{__make} -C java_ext | |
195 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
196 | %{__make} -C java_ext/native \ | |
197 | CXX="%{__cxx}" \ | |
198 | LDFLAGS="%{rpmldflags} -L../../src/.libs -lming" \ | |
199 | JAVADIR=%{_jvmdir}/java \ | |
200 | NOVAR_SHLIBEXT=".so" | |
201 | %endif | |
202 | ||
203 | %if %{with ruby} | |
204 | cd rb_ext | |
205 | ln -sf ../src/.libs/libming.so . | |
206 | ruby extconf.rb \ | |
207 | --with-ming-include=../src \ | |
208 | --with-ming-lib=../src/.libs | |
209 | %{__make} \ | |
210 | CC="%{__cc}" \ | |
211 | optflags="%{rpmcflags}" | |
212 | cd .. | |
213 | %endif | |
214 | ||
215 | %install | |
216 | rm -rf $RPM_BUILD_ROOT | |
217 | ||
218 | %{__make} install \ | |
219 | DESTDIR=$RPM_BUILD_ROOT \ | |
220 | mingc_ladir=%{_libdir}/tclming | |
221 | ||
222 | %if %{with php} | |
223 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d | |
224 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/ming.ini | |
225 | ; Enable ming extension module | |
226 | extension=ming.so | |
227 | EOF | |
228 | %endif | |
229 | ||
230 | %if %{with java} | |
231 | install -Dp java_ext/jswf.jar RPM_BUILD_ROOT%{_javadir}/jswf.jar | |
232 | install java_ext/native/libjswf.so $RPM_BUILD_ROOT%{_libdir} | |
233 | %endif | |
234 | ||
235 | %if %{with ruby} | |
236 | %{__make} -C rb_ext install \ | |
237 | DESTDIR=$RPM_BUILD_ROOT | |
238 | %endif | |
239 | ||
240 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/SWF/.packlist | |
241 | %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod | |
242 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/ming*.py | |
243 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/tclming/*.{la,a} | |
244 | # obsoleted by pkg-config | |
245 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libming.la | |
246 | ||
247 | %clean | |
248 | rm -rf $RPM_BUILD_ROOT | |
249 | ||
250 | %post -p /sbin/ldconfig | |
251 | %postun -p /sbin/ldconfig | |
252 | ||
253 | %files | |
254 | %defattr(644,root,root,755) | |
255 | %doc AUTHORS NEWS README TODO | |
256 | %attr(755,root,root) %{_libdir}/libming.so.*.*.* | |
257 | %attr(755,root,root) %ghost %{_libdir}/libming.so.1 | |
258 | ||
259 | %files devel | |
260 | %defattr(644,root,root,755) | |
261 | %attr(755,root,root) %{_libdir}/libming.so | |
262 | %{_includedir}/ming.h | |
263 | %{_includedir}/mingpp.h | |
264 | %{_pkgconfigdir}/libming.pc | |
265 | ||
266 | %files static | |
267 | %defattr(644,root,root,755) | |
268 | %{_libdir}/libming.a | |
269 | ||
270 | %files utils | |
271 | %defattr(644,root,root,755) | |
272 | %doc util/{README,TODO} | |
273 | %attr(755,root,root) %{_bindir}/dbl2png | |
274 | %attr(755,root,root) %{_bindir}/gif2dbl | |
275 | %attr(755,root,root) %{_bindir}/gif2mask | |
276 | %attr(755,root,root) %{_bindir}/listaction | |
277 | %attr(755,root,root) %{_bindir}/listaction_d | |
278 | %attr(755,root,root) %{_bindir}/listfdb | |
279 | %attr(755,root,root) %{_bindir}/listjpeg | |
280 | %attr(755,root,root) %{_bindir}/listmp3 | |
281 | %attr(755,root,root) %{_bindir}/listswf | |
282 | %attr(755,root,root) %{_bindir}/listswf_d | |
283 | %attr(755,root,root) %{_bindir}/makefdb | |
284 | %attr(755,root,root) %{_bindir}/makeswf | |
285 | %attr(755,root,root) %{_bindir}/ming-config | |
286 | %attr(755,root,root) %{_bindir}/png2dbl | |
287 | %attr(755,root,root) %{_bindir}/raw2adpcm | |
288 | %attr(755,root,root) %{_bindir}/swftocxx | |
289 | %attr(755,root,root) %{_bindir}/swftoperl | |
290 | %attr(755,root,root) %{_bindir}/swftophp | |
291 | %attr(755,root,root) %{_bindir}/swftopython | |
292 | %attr(755,root,root) %{_bindir}/swftotcl | |
293 | ||
294 | %if %{with java} | |
295 | %files -n java-ming | |
296 | %defattr(644,root,root,755) | |
297 | %attr(755,root,root) %{_libdir}/libjswf.so | |
298 | %{_javadir}/jswf.jar | |
299 | %endif | |
300 | ||
301 | %files -n perl-ming | |
302 | %defattr(644,root,root,755) | |
303 | %doc perl_ext/{README,TODO} | |
304 | %{perl_vendorarch}/SWF.pm | |
305 | %{perl_vendorarch}/SWF | |
306 | %dir %{perl_vendorarch}/auto/SWF | |
307 | %attr(755,root,root) %{perl_vendorarch}/auto/SWF/SWF.so | |
308 | %{_mandir}/man3/SWF*.3pm* | |
309 | ||
310 | %if %{with php} | |
311 | %files -n %{php_name}-ming | |
312 | %defattr(644,root,root,755) | |
313 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/ming.ini | |
314 | %attr(755,root,root) %{php_extensiondir}/ming.so | |
315 | %endif | |
316 | ||
317 | %files -n python-ming | |
318 | %defattr(644,root,root,755) | |
319 | %doc py_ext/{README,TODO} | |
320 | %attr(755,root,root) %{py_sitedir}/_mingc.so | |
321 | %{py_sitedir}/ming*.py[co] | |
322 | %if "%{py_ver}" > "2.4" | |
323 | %{py_sitedir}/mingc-%{version}-py*.egg-info | |
324 | %endif | |
325 | ||
326 | %files -n tcl-ming | |
327 | %defattr(644,root,root,755) | |
328 | %doc tcl_ext/README | |
329 | %dir %{_libdir}/tclming | |
330 | %attr(755,root,root) %{_libdir}/tclming/mingc.so |