]>
Commit | Line | Data |
---|---|---|
83f0a899 ER |
1 | # |
2 | # Conditional build: | |
3198f979 | 3 | %bcond_with php # PHP binding |
85fd7b12 JB |
4 | %bcond_with java # Java binding (native library build broken) |
5 | %bcond_with ruby # Ruby binding (unfinished) | |
83f0a899 | 6 | |
e137629a | 7 | Summary: Ming - an SWF output library |
420f4188 | 8 | Summary(pl.UTF-8): Ming - biblioteka do produkcji plików SWF |
81a84306 | 9 | Name: ming |
85fd7b12 JB |
10 | Version: 0.4.8 |
11 | %define ver_tag %(echo %{version} | tr . _) | |
8b631396 | 12 | Release: 15 |
85fd7b12 | 13 | License: LGPL v2.1+ |
e7b6717f | 14 | Group: Libraries |
85fd7b12 JB |
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 | |
252f5752 JR |
18 | Patch0: %{name}-perl-shared.patch |
19 | Patch1: am.patch | |
990a4bb4 | 20 | Patch2: flex.patch |
b04ba89a | 21 | Patch3: tcl-libx32.patch |
a82db06d | 22 | Patch4: swig.patch |
85fd7b12 | 23 | URL: http://www.libming.net/ |
0e1601b9 AM |
24 | BuildRequires: autoconf |
25 | BuildRequires: automake | |
ad4d7c2c | 26 | BuildRequires: bison |
27 | BuildRequires: flex | |
85fd7b12 JB |
28 | BuildRequires: freetype-devel >= 2 |
29 | BuildRequires: giflib-devel >= 4.1 | |
30 | %{?with_java:BuildRequires: jdk} | |
ad4d7c2c | 31 | BuildRequires: libpng-devel |
462c48df | 32 | BuildRequires: libstdc++-devel |
85fd7b12 | 33 | BuildRequires: libtool >= 2:1.5 |
e0f7f807 | 34 | BuildRequires: python-devel >= 1:2.4 |
81a84306 | 35 | BuildRequires: rpm-perlprov >= 4.0.2-24 |
de383548 | 36 | BuildRequires: rpm-pythonprov |
f568d8d7 | 37 | BuildRequires: rpmbuild(macros) >= 1.344 |
85fd7b12 | 38 | %{?with_ruby:BuildRequires: ruby-devel} |
a82db06d JP |
39 | BuildRequires: swig3 |
40 | BuildRequires: swig3-tcl | |
462c48df | 41 | BuildRequires: tcl |
42 | BuildRequires: tcl-devel | |
8d5b5075 | 43 | BuildRequires: zlib-devel |
83f0a899 | 44 | %if %{with php} |
5d4f312c | 45 | BuildRequires: %{php_name}-program |
83f0a899 ER |
46 | BuildRequires: %{php_name}-devel >= 4:5.3 |
47 | %endif | |
e137629a | 48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
93b9c492 AF |
49 | |
50 | %description | |
81a84306 | 51 | Ming is a C library for generating SWF ("Flash") format movies, plus a |
e137629a JB |
52 | set of wrappers for using the library from c++ and popular scripting |
53 | languages like PHP, Python, and Ruby. | |
93b9c492 | 54 | |
78c38071 JR |
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. | |
81a84306 JB |
59 | |
60 | %package devel | |
61 | Summary: Ming development files | |
420f4188 | 62 | Summary(pl.UTF-8): Pliki dla programistów Ming |
81a84306 | 63 | Group: Development/Libraries |
a8a8a1c5 | 64 | Requires: %{name} = %{version}-%{release} |
b01d4d69 | 65 | Requires: giflib-devel |
81a84306 JB |
66 | |
67 | %description devel | |
68 | Header files for ming library (C and C++). | |
69 | ||
78c38071 JR |
70 | %description devel -l pl.UTF-8 |
71 | Pliki nagłówkowe dla biblioteki ming (do C i C++). | |
81a84306 | 72 | |
da7e6517 | 73 | %package static |
aaa85863 JB |
74 | Summary: Ming static library |
75 | Summary(pl.UTF-8): Statyczna biblioteka Ming | |
da7e6517 ER |
76 | Group: Development/Libraries |
77 | Requires: %{name}-devel = %{version}-%{release} | |
3f096cc8 | 78 | |
da7e6517 | 79 | %description static |
aaa85863 JB |
80 | Static Ming library. |
81 | ||
82 | %description static -l pl.UTF-8 | |
83 | Statyczna biblioteka Ming. | |
3f096cc8 | 84 | |
81a84306 JB |
85 | %package utils |
86 | Summary: Ming utilities | |
420f4188 | 87 | Summary(pl.UTF-8): Narzędzia Ming |
81a84306 | 88 | Group: Applications/File |
81a84306 JB |
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 | ||
78c38071 JR |
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 | |
81a84306 | 104 | |
85fd7b12 JB |
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 | ||
de383548 | 117 | %package -n perl-ming |
f568d8d7 JB |
118 | Summary: Ming Perl module |
119 | Summary(pl.UTF-8): Moduł Perla Ming | |
de383548 JB |
120 | Group: Development/Languages/Perl |
121 | Requires: %{name} = %{version}-%{release} | |
122 | Obsoletes: ming-perl | |
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 | ||
83f0a899 | 130 | %package -n %{php_name}-ming |
f568d8d7 JB |
131 | Summary: Ming module for PHP |
132 | Summary(pl.UTF-8): Moduł Ming dla PHP | |
83f0a899 | 133 | Group: Development/Languages/PHP |
f568d8d7 | 134 | Requires: %{name} = %{version}-%{release} |
f568d8d7 JB |
135 | %{?requires_php_extension} |
136 | ||
83f0a899 | 137 | %description -n %{php_name}-ming |
f568d8d7 JB |
138 | PHP interface to Ming SWF generating library. |
139 | ||
83f0a899 | 140 | %description -n %{php_name}-ming -l pl.UTF-8 |
f568d8d7 JB |
141 | Interfejs PHP do biblioteki Ming generującej pliki SWF. |
142 | ||
de383548 JB |
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} | |
83f0a899 | 148 | Requires: python-libs |
de383548 JB |
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 | ||
f568d8d7 JB |
156 | %package -n tcl-ming |
157 | Summary: Ming module for Tcl | |
158 | Summary(pl.UTF-8): Moduł Ming dla Tcl-a | |
83f0a899 | 159 | Group: Development/Languages/Tcl |
f568d8d7 JB |
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 | ||
93b9c492 | 169 | %prep |
85fd7b12 | 170 | %setup -q -n libming-%{name}-%{ver_tag} |
81a84306 | 171 | %patch0 -p1 |
06d3cd21 | 172 | %patch1 -p1 |
990a4bb4 | 173 | %patch2 -p1 |
b04ba89a | 174 | %patch3 -p1 |
a82db06d | 175 | %patch4 -p1 |
f568d8d7 | 176 | |
93b9c492 | 177 | %build |
0e1601b9 AM |
178 | %{__libtoolize} |
179 | %{__aclocal} -I macros | |
180 | %{__autoconf} | |
85fd7b12 | 181 | %{__autoheader} |
0e1601b9 | 182 | %{__automake} |
c5338c67 | 183 | %configure \ |
a82db06d | 184 | SWIG=/usr/bin/swig-3 \ |
c5338c67 | 185 | --enable-perl \ |
83f0a899 | 186 | %{?with_php:--enable-php} \ |
462c48df | 187 | --enable-python \ |
83f0a899 ER |
188 | --enable-tcl \ |
189 | --disable-silent-rules | |
93b9c492 | 190 | |
f568d8d7 JB |
191 | %{__make} -j1 \ |
192 | mingc_ladir=%{_libdir}/tclming | |
de383548 | 193 | |
85fd7b12 JB |
194 | %if %{with java} |
195 | %{__make} -C java_ext | |
196 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
197 | %{__make} -C java_ext/native \ | |
198 | CXX="%{__cxx}" \ | |
199 | LDFLAGS="%{rpmldflags} -L../../src/.libs -lming" \ | |
200 | JAVADIR=%{_jvmdir}/java \ | |
201 | NOVAR_SHLIBEXT=".so" | |
202 | %endif | |
203 | ||
204 | %if %{with ruby} | |
205 | cd rb_ext | |
206 | ln -sf ../src/.libs/libming.so . | |
207 | ruby extconf.rb \ | |
208 | --with-ming-include=../src \ | |
209 | --with-ming-lib=../src/.libs | |
210 | %{__make} \ | |
211 | CC="%{__cc}" \ | |
212 | optflags="%{rpmcflags}" | |
213 | cd .. | |
214 | %endif | |
215 | ||
93b9c492 | 216 | %install |
e137629a | 217 | rm -rf $RPM_BUILD_ROOT |
8458c7d9 | 218 | %{__make} install \ |
f568d8d7 JB |
219 | DESTDIR=$RPM_BUILD_ROOT \ |
220 | mingc_ladir=%{_libdir}/tclming | |
de383548 | 221 | |
83f0a899 | 222 | %if %{with php} |
f568d8d7 JB |
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 | |
83f0a899 | 228 | %endif |
f568d8d7 | 229 | |
85fd7b12 JB |
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 | ||
f568d8d7 | 240 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/SWF/.packlist |
83f0a899 | 241 | %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod |
f568d8d7 JB |
242 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/ming*.py |
243 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/tclming/*.{la,a} | |
de383548 | 244 | |
93b9c492 | 245 | %clean |
e137629a | 246 | rm -rf $RPM_BUILD_ROOT |
93b9c492 | 247 | |
81a84306 JB |
248 | %post -p /sbin/ldconfig |
249 | %postun -p /sbin/ldconfig | |
250 | ||
93b9c492 | 251 | %files |
e137629a | 252 | %defattr(644,root,root,755) |
85fd7b12 | 253 | %doc AUTHORS NEWS README TODO |
fb9b3080 | 254 | %attr(755,root,root) %{_libdir}/libming.so.*.*.* |
0e1601b9 | 255 | %attr(755,root,root) %ghost %{_libdir}/libming.so.1 |
81a84306 JB |
256 | |
257 | %files devel | |
258 | %defattr(644,root,root,755) | |
259 | %attr(755,root,root) %{_libdir}/libming.so | |
0e1601b9 | 260 | %{_libdir}/libming.la |
93b9c492 | 261 | %{_includedir}/ming.h |
81a84306 | 262 | %{_includedir}/mingpp.h |
0e1601b9 | 263 | %{_pkgconfigdir}/libming.pc |
93b9c492 | 264 | |
da7e6517 | 265 | %files static |
3f096cc8 | 266 | %defattr(644,root,root,755) |
da7e6517 | 267 | %{_libdir}/libming.a |
3f096cc8 | 268 | |
81a84306 JB |
269 | %files utils |
270 | %defattr(644,root,root,755) | |
3f096cc8 | 271 | %doc util/{README,TODO} |
da7e6517 ER |
272 | %attr(755,root,root) %{_bindir}/dbl2png |
273 | %attr(755,root,root) %{_bindir}/gif2dbl | |
274 | %attr(755,root,root) %{_bindir}/gif2mask | |
275 | %attr(755,root,root) %{_bindir}/listaction | |
276 | %attr(755,root,root) %{_bindir}/listaction_d | |
277 | %attr(755,root,root) %{_bindir}/listfdb | |
278 | %attr(755,root,root) %{_bindir}/listjpeg | |
279 | %attr(755,root,root) %{_bindir}/listmp3 | |
280 | %attr(755,root,root) %{_bindir}/listswf | |
281 | %attr(755,root,root) %{_bindir}/listswf_d | |
282 | %attr(755,root,root) %{_bindir}/makefdb | |
283 | %attr(755,root,root) %{_bindir}/makeswf | |
284 | %attr(755,root,root) %{_bindir}/ming-config | |
285 | %attr(755,root,root) %{_bindir}/png2dbl | |
da7e6517 | 286 | %attr(755,root,root) %{_bindir}/raw2adpcm |
0e1601b9 | 287 | %attr(755,root,root) %{_bindir}/swftocxx |
da7e6517 ER |
288 | %attr(755,root,root) %{_bindir}/swftoperl |
289 | %attr(755,root,root) %{_bindir}/swftophp | |
290 | %attr(755,root,root) %{_bindir}/swftopython | |
0e1601b9 | 291 | %attr(755,root,root) %{_bindir}/swftotcl |
de383548 | 292 | |
85fd7b12 JB |
293 | %if %{with java} |
294 | %files -n java-ming | |
295 | %defattr(644,root,root,755) | |
296 | %attr(755,root,root) %{_libdir}/libjswf.so | |
297 | %{_javadir}/jswf.jar | |
298 | %endif | |
299 | ||
de383548 JB |
300 | %files -n perl-ming |
301 | %defattr(644,root,root,755) | |
302 | %doc perl_ext/{README,TODO} | |
303 | %{perl_vendorarch}/SWF.pm | |
304 | %{perl_vendorarch}/SWF | |
305 | %dir %{perl_vendorarch}/auto/SWF | |
de383548 | 306 | %attr(755,root,root) %{perl_vendorarch}/auto/SWF/SWF.so |
85fd7b12 | 307 | %{_mandir}/man3/SWF*.3pm* |
de383548 | 308 | |
83f0a899 ER |
309 | %if %{with php} |
310 | %files -n %{php_name}-ming | |
f568d8d7 JB |
311 | %defattr(644,root,root,755) |
312 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/ming.ini | |
313 | %attr(755,root,root) %{php_extensiondir}/ming.so | |
83f0a899 | 314 | %endif |
f568d8d7 | 315 | |
de383548 JB |
316 | %files -n python-ming |
317 | %defattr(644,root,root,755) | |
318 | %doc py_ext/{README,TODO} | |
319 | %attr(755,root,root) %{py_sitedir}/_mingc.so | |
320 | %{py_sitedir}/ming*.py[co] | |
e0f7f807 | 321 | %if "%{py_ver}" > "2.4" |
85fd7b12 | 322 | %{py_sitedir}/mingc-%{version}-py*.egg-info |
e0f7f807 | 323 | %endif |
f568d8d7 JB |
324 | |
325 | %files -n tcl-ming | |
326 | %defattr(644,root,root,755) | |
327 | %doc tcl_ext/README | |
328 | %dir %{_libdir}/tclming | |
329 | %attr(755,root,root) %{_libdir}/tclming/mingc.so |