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