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