Backslash ${prefix} for kde3 too...
[gnash.git] / packaging / redhat / gnash.spec
blobae89360e67d9b8e8e573e94e115469f90d1d8380
1 Name: gnash
2 # This next field gets edited by "make gnash.spec" when building an rpm
3 Version: master
4 Release: 0
5 Epoch: 1
6 # This next field gets edited by "make gnash.spec" when building an rpm
7 Distribution: fc13
8 Summary: GNU SWF player
10 Group: Applications/Multimedia
11 Vendor: Gnash Project
12 Packager: Rob Savoye <rob@welcomehome.org>
13 License: GPLv3
14 URL: http://www.gnu.org/software/gnash/
15 Source0: http://www.getgnash.org/packages/snapshots/fedora/%{name}-%{version}.tar.gz
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{_target_cpu}
18 # bitmap libraries for loading images
19 BuildRequires: libpng-devel libjpeg-devel giflib-devel
20 # these are needed for the python gtk widget
21 BuildRequires: pygtk2-devel python-devel
22 BuildRequires: gtk2-devel freetype-devel fontconfig-devel
23 BuildRequires: openssl-devel curl-devel boost-devel
24 BuildRequires: gstreamer-devel >= 0.10, gstreamer-plugins-base-devel >= 0.10
25 # these are for the kde4 support
26 BuildRequires: kdelibs-devel >= 4.0, kdebase-devel >= 4.0, qt-devel >= 4.0
27 # these are needed for the various renderers, which now all get built
28 BuildRequires: libXt-devel agg-devel gtkglext-devel libstdc++
30 # The default Gnash package only includes the GTK parts, the rest
31 # is in gnash-common.
32 Requires: gtkglext gtk2 pygtk2 python
33 Requires: gnash-common
35 # Fedora 12 packages the boost libraries as separate packages,
36 # whereas Fedora 11 has just the one dependency on boost-devel.
37 %if %{distribution} != "fc11"
38 BuildRequires: boost-date-time boost-thread
39 Requires: boost-date-time boost-thread
40 %endif
42 # BuildRequires: scrollkeeper
44 #Requires(post): scrollkeeper
45 #Requires(postun): scrollkeeper
46 Requires(post): /sbin/ldconfig
47 Requires(postun): /sbin/ldconfig
48 #Requires(post): /sbin/install-info
49 #Requires(preun): /sbin/install-info
51 %description
52 Gnash is a GNU SWF movie player that supports many SWF v7 features,
53 with growing support for swf v8, v9, and v10.
55 %package common
56 Summary: Web-client SWF player plugin
57 Group: Applications/Multimedia
58 # Installation requirements
59 Requires: libpng libjpeg giflib
60 Requires: boost agg cairo libGL libXt libX11 libXv
61 Requires: freetype fontconfig libstdc++
62 Requires: gstreamer >= 0.10, gstreamer-plugins-base >= 0.10
63 Requires: openssl curl
64 # libX11 libExt libXv
66 %description common
67 Common files Shared between Gnash and Klash, Gnash/Klash is a GNU SWF movie
68 player that supports many SWF v7 features, with growing support for
69 swf v8, v9, and v10.
71 %package klash4
72 Summary: Konqueror SWF player plugin for KDE 4
73 Group: Applications/Multimedia
74 Requires: gnash-common
75 Requires: kdelibs >= 4, kdebase >= 4, qt >= 4, gnash
77 %description klash4
78 The gnash (klash) SWF player plugin for Konqueror in KDE4.
80 %package plugin
81 Summary: Web-client SWF player plugin
82 Group: Applications/Internet
83 Requires: gnash, gnash-common
85 %description plugin
86 The gnash SWF player plugin for firefox or mozilla.
88 %package cygnal
89 Summary: Streaming media server
90 Group: Applications/Multimedia
91 Requires: gnash-common
93 %description cygnal
94 Cygnal is a streaming media server that's Flash aware.
96 %package devel
97 Summary: Gnash header files
98 Group: Applications/Multimedia
99 Requires: gnash-common
101 %description devel
102 Gnash header files can be used to write external Gnash extensions.
104 %package widget
105 Summary: Gnash widgets for Gtk and Python
106 Group: Applications/Multimedia
107 Requires: gnash, gnash-common
109 %description widget
110 The Gnash widgets can be used to embed Gnash into any Gtk or Python-Gtk
111 application.
113 %package fileio-extension
114 Summary: Fileio extension for Gnash
115 Group: Applications/Multimedia
116 Requires: gnash-common
118 %description fileio-extension
119 This extension allows SWF files being played within Gnash to have direct access
120 to the file system. The API is similar to the C library one.
122 %package lirc-extension
123 Summary: LIRC extension for Gnash
124 Group: Applications/Multimedia
125 Requires: gnash-common
127 %description lirc-extension
128 This extension allows SWF files being played within Gnash to have direct access
129 to a LIRC based remote control device. The API is similar to the standard
130 LIRC one.
132 %package dejagnu-extension
133 Summary: DejaGnu extension for Gnash
134 Group: Applications/Multimedia
135 Requires: gnash-common
137 %description dejagnu-extension
138 This extension allows SWF files to have a simple unit testing API. The API
139 is similar to the DejaGnu unit testing one.
141 %package mysql-extension
142 Summary: MySQL extension for Gnash
143 Group: Applications/Multimedia
144 Requires: gnash-common
146 %description mysql-extension
147 This extension allows SWF files being played within Gnash to have direct access
148 to a MySQL database. The API is similar to the standard MySQL one.
150 %prep
151 %setup -q
153 %build
155 # For QT3
156 # [ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh
158 # handle cross building rpms. This gets messy when building for two
159 # archtectures with the same CPU type, like x86-Linux -> OLPC. We have
160 # to do this because an OLPC requires RPMs to install software, but
161 # doesn't have the resources to do native builds. So this hack lets us
162 # build RPM packages on one host for the OLPC, or other RPM based
163 # embedded distributions.
164 %if %{_target_cpu} != %{_build_arch}
165 %define cross_compile 1
166 %else
167 %define cross_compile 0
168 %endif
169 # if not defined, assume this is a native package.
170 %{?do_cross_compile:%define cross_compile 0}
172 # FIXME: this is a bad hack! Although all this does work correctly and
173 # build an RPM, it's set for an geode-olpc, so the actual hardware
174 # won't let us install it.
175 # %define cross_compile 0
176 # %define olpc 0
178 # Build rpms for an ARM based processor, in our case the Nokia 770/800/810
179 # tablet.
180 %ifarch arm
181 RPM_TARGET=%{_target}
182 %endif
184 %if %{cross_compile}
185 # cross building an RPM. This works as long as you have a good cross
186 # compiler installed.
187 CROSS_OPTS="--build=%{_host} --host=$RPM_TARGET --target=$RPM_TARGET"
188 RENDERER="--enable-renderer=agg" # could be opengl
189 %ifarch arm
190 SOUND="--enable-media=none --disable-nsapi --disable-kparts"
191 %else
192 SOUND="--enable-media=gst" # could also be sdl
193 %endif
194 %else
195 # Native RPM build
196 CROSS_OPTS="" # "--enable-ghelp --enable-docbook"
197 # these are actually the default values, but this way they get added
198 # to the build so they appear in "gnash --version".
199 GUI="--enable-gui=gtk,kde4" # could be kde3, kde4, aqua, sdl
200 SOUND="--enable-media=gst" # could be ffmpeg
201 OTHER="--enable-cygnal"
202 RENDERER="--enable-renderer=all" # could be opengl or cairo
203 # These are not the defaults
204 OPTIONAL="--enable-python"
205 %endif
207 %if %{distribution} != "ydl6"
208 SOUND="--enable-media=gst"
209 %endif
211 # we disable the testsuites by default, as when building packages we
212 # should have already been running the testsuites as part of the
213 # normal build & test development cycle.
215 # The default options for the configure aren't suitable for
216 # cross configuring, so we force them to be what we know is correct.
217 # uncommenting these will produce huge volumes of debug info from the
218 # shell, but sometimes that's what you need to do.
219 # export CONFIG_SHELL="sh -x"
220 # sh -x ./configure \
221 %if %{cross_compile}
222 %configure --enable-static \
223 $CROSS_OPTS \
224 $SOUND $GUI \
225 $RENDERER \
226 $OTHER \
227 $OPTIONAL \
228 --disable-dependency-tracking \
229 --disable-testsuite \
230 --disable-rpath \
231 --with-plugindir=%{_libdir}/mozilla/plugins
233 make $MAKEFLAGS dumpconfig all
234 %else
235 # uncommenting these will produce huge volumes of debug info from the
236 # shell, but sometimes that's what you need to do.
237 # export CONFIG_SHELL="sh -x"
238 # sh -x ./configure
239 sh ./configure \
240 $CROSS_OPTS \
241 $SOUND $GUI \
242 $RENDERER \
243 $OTHER \
244 $OPTIONAL \
245 --prefix=/usr \
246 --mandir=%{_prefix}/share/man \
247 --infodir=%{_prefix}/share/info \
248 --disable-dependency-tracking \
249 --disable-testsuite \
250 --disable-rpath \
251 --enable-renderer=agg,cairo \
252 --enable-cygnal \
253 --enable-python \
254 --with-plugins-install=system \
255 --enable-extensions=fileio,lirc,dejagnu,mysql
257 make $MAKEFLAGS dumpconfig all LDFLAGS="-Wl,--build-id"
258 %endif
259 # When testing the spec file, try setting MAKEFLAGS to
260 # "CXXFLAGS-O0 -j4" to speed up getting results. Note *don't*
261 # do that for release builds, as the performance will suffer.
263 %install
264 strip gui/.libs/*-gnash
265 strip utilities/.libs/g* utilities/.libs/soldumper utilities/.libs/flvdumper cygnal/.libs/cygnal
266 rm -rf $RPM_BUILD_ROOT
267 make $MAKEFLAGS install DESTDIR=$RPM_BUILD_ROOT LDFLAGS="-Wl,--build-id"
268 make $MAKEFLAGS install-plugins DESTDIR=$RPM_BUILD_ROOT LDFLAGS="-Wl,--build-id"
269 rm $RPM_BUILD_ROOT%{_libdir}/gnash/*.*a
270 %if !%{cross_compile}
272 rm -rf $RPM_BUILD_ROOT%{_localstatedir}/scrollkeeper
273 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
274 %endif
276 %clean
277 rm -rf $RPM_BUILD_ROOT
279 %post
280 /sbin/ldconfig
281 %if !%{cross_compile}
282 scrollkeeper-update -q -o %{_datadir}/omf/%{name} || :
283 /sbin/install-info --entry="* Gnash: (gnash). GNU SWF Player" %{_infodir}/%{name}.info %{_infodir}/dir || :
284 %endif
286 %preun
287 if [ $1 = 0 ]; then
288 /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
291 %postun
292 /sbin/ldconfig
293 %if !%{cross_compile}
294 scrollkeeper-update -q || :
295 %endif
297 %files
298 %defattr(-,root,root,-)
299 %{_bindir}/gtk-gnash
300 %{_datadir}/man/man1/gtk-gnash.1.gz
302 %files common
303 %defattr(-,root,root,-)
304 %dump
305 %doc README AUTHORS COPYING NEWS
306 %{_bindir}/gnash
307 %{_datadir}/man/man1/gnash.1.gz
308 %{_bindir}/gprocessor
309 %{_bindir}/soldumper
310 %{_bindir}/flvdumper
311 %{_bindir}/findmicrophones
312 %{_bindir}/findwebcams
313 #%{_bindir}/dumpshm
314 %{_bindir}/rtmpget
315 %{_libdir}/gnash/*.so*
316 %{_prefix}/share/gnash/GnashG.png
317 %{_prefix}/share/gnash/gnash_128_96.ico
318 %{_datadir}/man/man1/gprocessor.1.gz
319 %{_datadir}/man/man1/soldumper.1.gz
320 %{_datadir}/man/man1/flvdumper.1.gz
321 %{_datadir}/man/man1/findmicrophones.1.gz
322 %{_datadir}/man/man1/findwebcams.1.gz
323 %{_datadir}/man/man1/rtmpget.1.gz
324 %{_datadir}/locale/*/LC_MESSAGES/gnash.mo
325 %if !%{cross_compile}
326 #%{_prefix}/share/info/*.info*
327 %{_prefix}/share/doc/gnash/*.html
328 %{_prefix}/share/doc/gnash/images/*.png
329 %{_prefix}/etc/gnashrc
330 %{_prefix}/etc/gnashpluginrc
331 # %{_infodir}/*.info*
332 #%doc doc/C/gnash*.html
333 #%doc doc/C/images/*.png
334 #%doc doc/C/images/*.txt
335 # %doc %{_prefix}/share/gnash/doc/gnash/C/images
336 # %doc %{_prefix}/share/gnash/doc/gnash/C/*.xml
337 %endif
339 %files plugin
340 %defattr(-,root,root,-)
341 %{_libdir}/mozilla/plugins/libgnashplugin.so
343 %files cygnal
344 %defattr(-,root,root,-)
345 %{_bindir}/cygnal
346 %{_prefix}/etc/cygnalrc
347 %{_libdir}/cygnal/plugins/*.so*
348 %{_datadir}/man/man1/cygnal.1.gz
350 %files devel
351 %{_prefix}/include/gnash/*.h*
352 %{_prefix}/include/gnash/vm/*.h
353 %{_prefix}/include/gnash/asobj/*.h
354 %{_prefix}/include/gnash/parser/*.h
355 %{_prefix}/lib/pkgconfig/gnash.pc
357 %files widget
358 %{_prefix}/include/gnash/*.h
359 %{_prefix}/lib/python*/site-packages/gtk-2.0/gnash.*
361 %files klash4
362 %defattr(-,root,root,-)
363 %{_bindir}/kde4-gnash
364 %{_datadir}/man/man1/kde4-gnash.1.gz
365 %{_libdir}/kde4/libklashpart.*
366 %{_prefix}/share/kde4/apps/klash/klashpartui.rc
367 %{_prefix}/share/kde4/apps/klash/pluginsinfo
368 %{_prefix}/share/kde4/services/klash_part.desktop
370 %files fileio-extension
371 %{_libdir}/gnash/plugins/fileio.so
373 %files lirc-extension
374 %{_libdir}/gnash/plugins/lirc.so
376 %files dejagnu-extension
377 %{_libdir}/gnash/plugins/dejagnu.so
379 %files mysql-extension
380 %{_libdir}/gnash/plugins/mysql.so
382 %changelog
383 * Sat Mar 27 2010 Rob Savoye <rob@welcomehome.org> - %{version}-%{release}
384 - add gnash-common package for non GUI files so as not to contaminate
385 the gtk or kde packages.
387 * Sat Sep 07 2009 Rob Savoye <rob@welcomehome.org> - %{version}-%{release}
388 - add kde4 support for klash.
390 * Sat Jun 13 2009 Rob Savoye <rob@welcomehome.org> - trunk
391 - Add support for packaging the gtk & python widget
393 * Sat Feb 13 2009 Rob Savoye <rob@welcomehome.org> - trunk
394 - Split off klash into it's own spec file.
396 * Sat Oct 24 2008 Rob Savoye <rob@welcomehome.org> - trunk
397 - Adjust dependencies for current bzr trunk
399 * Sat Feb 16 2008 Rob Savoye <rob@welcomehome.org> - %{version}-%{release}
400 - Adjust dependencies for current cvs HEAD
402 * Sat Mar 6 2007 Rob Savoye <rob@welcomehome.org> - %{version}-%{release}
403 - merge in patch from John @ Redhat.
405 * Tue Mar 06 2007 John (J5) Palmieri <johnp@redhat.com> 0.7.2.cvs20070306-1
406 - update to new snapshot
408 * Thu Feb 28 2007 John (J5) Palmieri <johnp@redhat.com> 0.7.2.cvs20070226-3
409 - require xulrunner instead of webclient
411 * Wed Feb 28 2007 John (J5) Palmieri <johnp@redhat.com> 0.7.2.cvs20070226-2
412 - don't delete requires .so files
414 * Mon Feb 26 2007 John (J5) Palmieri <johnp@redhat.com> 0.7.2.cvs20070226-1
415 - cvs snapshot built for olpc
417 * Sat Nov 7 2006 Rob Savoye <rob@welcomehome.org> - 0.7.2-2
418 - update for 0.7.2 release.
420 * Sat Nov 6 2006 Patrice Dumas <pertusus@free.fr> 0.7.2-1
421 - update for 0.7.2 release.
423 * Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 0.7.1-9
424 - rebuilt for unwind info generation, broken in gcc-4.1.1-21
426 * Sun Sep 24 2006 Patrice Dumas <pertusus@free.fr> 0.7.1-8
427 - plugin requires %%{_libdir}/mozilla/plugins. Fix (incompletly and
428 temporarily, but there is no better solution yet) #207613
430 * Sun Aug 27 2006 Patrice Dumas <pertusus@free.fr> - 0.7.1-7
431 - add defattr for klash
432 - add warnings in the description about stability
434 * Mon Aug 21 2006 Patrice Dumas <pertusus@free.fr> - 0.7.1-6
435 - remove superfluous buildrequires autoconf
436 - rename last patch to gnash-plugin-tempfile-dir.patch
437 - add README.fedora to plugin to explain tmpdirs
439 * Wed Aug 16 2006 Jens Petersen <petersen@redhat.com> - 0.7.1-5
440 - source qt.sh and configure --with-qtdir (Dominik Mierzejewski)
441 - add plugin-tempfile-dir.patch for plugin to use a safe tempdir
443 * Fri Jul 28 2006 Jens Petersen <petersen@redhat.com> - 0.7.1-4
444 - buildrequire autotools (Michael Knox)
446 * Fri Jun 2 2006 Patrice Dumas <pertusus@free.fr> - 0.7.1-3
447 - add gnash-continue_on_info_install_error.patch to avoid
448 - buildrequire libXmu-devel
450 * Wed May 17 2006 Jens Petersen <petersen@redhat.com> - 0.7.1-2
451 - configure with --disable-rpath
452 - buildrequire docbook2X
453 - remove devel files
455 * Sun May 7 2006 Jens Petersen <petersen@redhat.com> - 0.7.1-1
456 - update to 0.7.1 alpha release
458 * Sat Apr 22 2006 Rob Savoye <rob@welcomehome.org> - 0.7-1
459 - install the info file. Various tweaks for my system based on
460 Patrice's latest patch,
462 * Fri Feb 3 2006 Patrice Dumas <dumas@centre-cired.fr> - 0.7-0
463 - initial packaging