Update with current status
[gnash.git] / packaging / redhat / gnash.spec
blob59a1b1e439ccde0a07afd36af1833b5e8f1bd941
1 Name: gnash
2 # This next field gets edited by "make gnash.spec" when building an rpm
3 Version: 0.8.11dev
4 Release: 0
5 Epoch: 1
6 # This next field gets edited by "make gnash.spec" when building an rpm
7 Distribution: fc14
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 %if %{_target_cpu} != "armv7l"
19 BuildRequires: redhat-lsb
20 %endif
21 BuildRequires: mysql-devel docbook2X
22 # bitmap libraries for loading images
23 BuildRequires: libpng-devel libjpeg-devel giflib-devel
24 # these are needed for the python gtk widget
25 BuildRequires: pygtk2-devel python-devel
26 BuildRequires: gtk2-devel freetype-devel fontconfig-devel
27 BuildRequires: openssl-devel curl-devel boost-devel
28 BuildRequires: gstreamer-devel >= 0.10, gstreamer-plugins-base-devel >= 0.10
29 # these are for the kde4 support, which isn't supported by the OLPC XO 1.75.
30 # which is armv7l based.
31 %if %{_target_cpu} != "armv7l"
32 BuildRequires: kdelibs-devel >= 4.0, kdebase-devel >= 4.0, qt-devel >= 4.0
33 %endif
34 # these are needed for the various renderers, which now all get built
35 BuildRequires: libXt-devel agg-devel libstdc++
36 BuildRequires: jemalloc-devel
38 # The default Gnash package only includes the GTK parts, the rest
39 # is in gnash-common.
40 Requires: gtk2 pygtk2 python
41 Requires: gnash-common
43 # Fedora 12 packages the boost libraries as separate packages,
44 # whereas Fedora 11 has just the one dependency on boost-devel.
45 %if %{distribution} != "fc11"
46 BuildRequires: boost-date-time boost-thread
47 Requires: boost-date-time boost-thread
48 %endif
50 # BuildRequires: scrollkeeper
52 #Requires(post): scrollkeeper
53 #Requires(postun): scrollkeeper
54 Requires(post): /sbin/ldconfig
55 Requires(postun): /sbin/ldconfig
56 #Requires(post): /sbin/install-info
57 #Requires(preun): /sbin/install-info
59 %description
60 Gnash is a GNU SWF movie player that supports many SWF v7 features,
61 with growing support for swf v8, v9, and v10.
63 %package common
64 Summary: Web-client SWF player plugin
65 Group: Applications/Multimedia
66 # Installation requirements
67 Requires: libpng libjpeg giflib
68 Requires: boost agg cairo libGL libXt libX11 libXv
69 Requires: freetype fontconfig libstdc++
70 Requires: gstreamer >= 0.10, gstreamer-plugins-base >= 0.10
71 Requires: openssl curl
72 # libX11 libExt libXv
74 %description common
75 Common files Shared between Gnash and Klash, Gnash/Klash is a GNU SWF movie
76 player that supports many SWF v7 features, with growing support for
77 swf v8, v9, and v10.
79 %if %{_target_cpu} != "armv7l"
80 %package klash4
81 Summary: Konqueror SWF player plugin for KDE 4
82 Group: Applications/Multimedia
83 Requires: gnash-common
84 Requires: kdelibs >= 4, kdebase >= 4, qt >= 4, gnash
86 %description klash4
87 The gnash (klash) SWF player plugin for Konqueror in KDE4.
89 %endif
91 %package plugin
92 Summary: Web-client SWF player plugin
93 Group: Applications/Internet
94 Requires: gnash, gnash-common
96 %description plugin
97 The gnash SWF player plugin for firefox or mozilla.
99 %package cygnal
100 Summary: Streaming media server
101 Group: Applications/Multimedia
102 Requires: gnash-common
104 %description cygnal
105 Cygnal is a streaming media server that's Flash aware.
107 %package devel
108 Summary: Gnash header files
109 Group: Applications/Multimedia
110 Requires: gnash-common
112 %description devel
113 Gnash header files can be used to write external Gnash extensions.
115 %package framebuffer
116 Summary: Standalone SWF file player for the framebuffer.
117 Group: Applications/Multimedia
118 Requires: gnash-common
120 %description framebuffer
121 Framebuffer Gnash is a standalone SWF file player for the Linux framebuffer.
123 %package dump
124 Summary: Standalone SWF file player that dumps screenshots.
125 Group: Applications/Multimedia
126 Requires: gnash-common
128 %description dump
129 Gnash Dump is a standalone SWF file player that dumps screenshots of each
130 frame to disk.
132 %package widget
133 Summary: Gnash widgets for Gtk and Python
134 Group: Applications/Multimedia
135 Requires: gnash, gnash-common
137 %description widget
138 The Gnash widgets can be used to embed Gnash into any Gtk or Python-Gtk
139 application.
141 %package fileio-extension
142 Summary: Fileio extension for Gnash
143 Group: Applications/Multimedia
144 Requires: gnash-common
146 %description fileio-extension
147 This extension allows SWF files being played within Gnash to have direct access
148 to the file system. The API is similar to the C library one.
150 %package lirc-extension
151 Summary: LIRC extension for Gnash
152 Group: Applications/Multimedia
153 Requires: gnash-common
155 %description lirc-extension
156 This extension allows SWF files being played within Gnash to have direct access
157 to a LIRC based remote control device. The API is similar to the standard
158 LIRC one.
160 %package dejagnu-extension
161 Summary: DejaGnu extension for Gnash
162 Group: Applications/Multimedia
163 Requires: gnash-common
165 %description dejagnu-extension
166 This extension allows SWF files to have a simple unit testing API. The API
167 is similar to the DejaGnu unit testing one.
169 %package mysql-extension
170 Summary: MySQL extension for Gnash
171 Group: Applications/Multimedia
172 Requires: gnash-common
174 %description mysql-extension
175 This extension allows SWF files being played within Gnash to have direct access
176 to a MySQL database. The API is similar to the standard MySQL one.
178 %prep
179 %setup -q
181 %build
183 # For QT3
184 # [ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh
186 # handle cross building rpms. This gets messy when building for two
187 # archtectures with the same CPU type, like x86-Linux -> OLPC. We have
188 # to do this because an OLPC requires RPMs to install software, but
189 # doesn't have the resources to do native builds. So this hack lets us
190 # build RPM packages on one host for the OLPC, or other RPM based
191 # embedded distributions.
192 %if %{_target_cpu} != %{_build_arch}
193 %define cross_compile 1
194 %else
195 %define cross_compile 0
196 %endif
197 # if not defined, assume this is a native package.
198 %{?do_cross_compile:%define cross_compile 0}
200 # FIXME: this is a bad hack! Although all this does work correctly and
201 # build an RPM, it's set for an geode-olpc, so the actual hardware
202 # won't let us install it.
203 # %define cross_compile 0
204 # %define olpc 0
206 # Build rpms for an ARM based processor, in our case the Nokia 770/800/810
207 # tablet.
208 %ifarch arm
209 RPM_TARGET=%{_target}
210 %endif
212 %if %{cross_compile}
213 # cross building an RPM. This works as long as you have a good cross
214 # compiler installed.
215 CROSS_OPTS="--build=%{_host} --host=$RPM_TARGET --target=$RPM_TARGET"
216 RENDERER="--enable-renderer=agg" # could be opengl
217 %ifarch arm
218 SOUND="--enable-media=none --disable-nsapi --disable-kparts"
219 %else
220 SOUND="--enable-media=gst"
221 %endif
222 %else
223 # Native RPM build
224 # these are actually the default values, but this way they get added
225 # to the build so they appear in "gnash --version".
226 RENDERER="--enable-renderer=agg,cairo" # opengl or openvg too
227 # These are not the defaults
228 SOUND="--enable-media=gst" # we can't distribute ffmpeg support
229 OPTIONAL="--enable-python --enable-cygnal"
230 GUI="--enable-gui=gtk,qt4,fb,dump" # aqua, sdl
231 %endif
233 %if %{_target_cpu} == "armv7l"
234 GUI="--enable-gui=gtk"
235 SOUND="--enable-media=gst"
236 RENDERER="--enable-renderer=agg,cairo"
237 OPTIONAL="--enable-python"
238 %endif
240 # we disable the testsuites by default, as when building packages we
241 # should have already been running the testsuites as part of the
242 # normal build & test development cycle.
244 # The default options for the configure aren't suitable for
245 # cross configuring, so we force them to be what we know is correct.
246 # uncommenting these will produce huge volumes of debug info from the
247 # shell, but sometimes that's what you need to do.
248 # export CONFIG_SHELL="sh -x"
249 # sh -x ./configure \
250 %if %{cross_compile}
251 %configure --enable-static \
252 $CROSS_OPTS \
253 $SOUND $GUI \
254 $RENDERER \
255 $OTHER \
256 $OPTIONAL \
257 --disable-dependency-tracking \
258 --disable-testsuite \
259 --disable-rpath \
260 --with-plugindir=%{_libdir}/mozilla/plugins
262 make MAKEFLAGS=$MAKEFLAGS dumpconfig all
263 %else
264 # uncommenting these will produce huge volumes of debug info from the
265 # shell, but sometimes that's what you need to do.
266 # export CONFIG_SHELL="sh -x"
267 # sh -x ./configure
268 sh ./configure \
269 $SOUND \
270 $GUI \
271 $RENDERER \
272 $OPTIONAL \
273 --prefix=/usr \
274 --libdir=%{_libdir} \
275 --mandir=%{_prefix}/share/man \
276 --infodir=%{_prefix}/share/info \
277 --disable-dependency-tracking \
278 --disable-testsuite \
279 --disable-rpath \
280 --enable-docbook \
281 --with-plugins-install=system \
282 --with-plugindir=%{_libdir}/mozilla/plugins \
283 --enable-extensions=fileio,lirc,dejagnu,mysql
285 make MAKEFLAGS=$MAKEFLAGS dumpconfig all LDFLAGS="-Wl,--build-id"
286 %endif
287 # When testing the spec file, try setting MAKEFLAGS to
288 # "CXXFLAGS-O0 -j4" to speed up getting results. Note *don't*
289 # do that for release builds, as the performance will suffer.
291 %install
292 strip gui/.libs/*-gnash
293 strip utilities/.libs/g* utilities/.libs/soldumper utilities/.libs/flvdumper cygnal/.libs/cygnal
294 rm -rf $RPM_BUILD_ROOT
295 make MAKEFLAGS=$MAKEFLAGS install DESTDIR=$RPM_BUILD_ROOT LDFLAGS="-Wl,--build-id"
296 make MAKEFLAGS=$MAKEFLAGS install-plugins DESTDIR=$RPM_BUILD_ROOT LDFLAGS="-Wl,--build-id"
297 rm -f $RPM_BUILD_ROOT%{_libdir}/gnash/*.*a
298 %if !%{cross_compile}
299 rm -rf $RPM_BUILD_ROOT%{_localstatedir}/scrollkeeper
300 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
301 %endif
302 /usr/lib/rpm/brp-compress
304 %clean
305 rm -rf $RPM_BUILD_ROOT
307 %post
308 %if !%{cross_compile}
309 scrollkeeper-update -q -o %{_datadir}/omf/%{name} || :
310 /sbin/install-info --entry="* Gnash: (gnash). GNU SWF Player" %{_infodir}/%{name}.info %{_infodir}/dir || :
311 %endif
312 update-desktop-database &> /dev/null || :
313 touch --no-create %{_datadir}/icons/hicolor
314 if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
315 %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
318 %preun
319 if [ $1 = 0 ]; then
320 /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
323 %postun
324 %if !%{cross_compile}
325 scrollkeeper-update -q || :
326 %endif
327 update-desktop-database &> /dev/null || :
328 touch --no-create %{_datadir}/icons/hicolor
329 if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
330 %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
333 %if %{_target_cpu} != "armv7l"
334 %post klash4
335 update-desktop-database &> /dev/null || :
336 touch --no-create %{_datadir}/icons/hicolor
338 %postun klash4
339 update-desktop-database &> /dev/null || :
340 touch --no-create %{_datadir}/icons/hicolor
341 %endif
343 %files
344 %defattr(-,root,root,-)
345 %{_bindir}/gnash-gtk-launcher
346 %{_bindir}/gtk-gnash
347 %{_mandir}/man1/gtk-gnash.1.gz
348 %{_mandir}/man1/gnash-gtk-launcher.1.gz
349 %{_datadir}/icons/hicolor/32x32/apps/gnash.xpm
350 %{_datadir}/applications/gnash.desktop
352 %files common
353 %defattr(-,root,root,-)
354 %dump
355 %doc README AUTHORS COPYING NEWS
356 %{_bindir}/gnash
357 %{_mandir}/man1/gnash.1.gz
358 %{_bindir}/gprocessor
359 %{_bindir}/soldumper
360 %{_bindir}/flvdumper
361 %{_bindir}/findmicrophones
362 %{_bindir}/findwebcams
363 #%{_bindir}/dumpshm
364 %{_bindir}/rtmpget
365 %{_libdir}/gnash/*.so*
366 %{_prefix}/share/gnash/GnashG.png
367 %{_prefix}/share/gnash/gnash_128_96.ico
368 %{_mandir}/man1/gprocessor.1.gz
369 %{_mandir}/man1/soldumper.1.gz
370 %{_mandir}/man1/flvdumper.1.gz
371 %{_mandir}/man1/findmicrophones.1.gz
372 %{_mandir}/man1/findwebcams.1.gz
373 %{_mandir}/man1/rtmpget.1.gz
374 %{_mandir}/man1/gnash-gtk-launcher.1.gz
375 %{_datadir}/locale/*/LC_MESSAGES/gnash.mo
376 %{_prefix}/share/applications/gnash.desktop
377 %{_prefix}/share/applications/gnash.schemas
378 %{_prefix}/share/icons/hicolor/32x32/apps/gnash.xpm
379 %{_prefix}/share/gnash/gnash-splash.swf
380 %if !%{cross_compile}
381 #%{_prefix}/share/info/*.info*
382 %{_prefix}/share/doc/gnash/gnash*.html
383 %{_prefix}/share/doc/gnash/images/*.png
384 %{_prefix}/etc/gnashrc
385 %{_prefix}/etc/gnashpluginrc
386 %{_infodir}/gnash_ref.info.gz
387 %{_infodir}/gnash_user.info.gz
388 #%doc doc/C/gnash*.html
389 #%doc doc/C/images/*.png
390 #%doc doc/C/images/*.txt
391 %endif
393 %files plugin
394 %defattr(-,root,root,-)
395 %{_libdir}/mozilla/plugins/libgnashplugin.so
397 %files cygnal
398 %defattr(-,root,root,-)
399 %{_bindir}/cygnal
400 %{_prefix}/etc/cygnalrc
401 %{_libdir}/cygnal/plugins/*.so*
402 %{_mandir}/man1/cygnal.1.gz
404 %files devel
405 %defattr(-,root,root,-)
406 %{_prefix}/include/gnash/*.h*
407 %{_prefix}/include/gnash/vm/*.h
408 %{_prefix}/include/gnash/asobj/*.h
409 %{_prefix}/include/gnash/parser/*.h
410 %{_libdir}/pkgconfig/gnash.pc
412 %files widget
413 %defattr(-,root,root,-)
414 %{_prefix}/include/gnash/*.h
415 %{_prefix}/lib*/python*/site-packages/gtk-2.0/gnash.*
417 %if %{_target_cpu} != "armv7l"
418 %files klash4
419 %defattr(-,root,root,-)
420 %{_bindir}/gnash-qt-launcher
421 %{_bindir}/qt4-gnash
422 %{_mandir}/man1/qt4-gnash.1.gz
423 %{_mandir}/man1/gnash-qt-launcher.1.gz
424 %{_prefix}/lib*/kde4/libklashpart.*
425 %{_prefix}/share/kde4/apps/klash/klashpartui.rc
426 %{_prefix}/share/kde4/apps/klash/pluginsinfo
427 %{_prefix}/share/kde4/services/klash_part.desktop
428 %{_prefix}/share/applications/klash.desktop
429 %{_prefix}/share/icons/hicolor/32x32/apps/klash.xpm
430 %endif
432 %files framebuffer
433 %defattr(-,root,root,-)
434 %{_bindir}/fb-gnash
435 %{_mandir}/man1/fb-gnash.1.gz
437 %files dump
438 %defattr(-,root,root,-)
439 %{_bindir}/dump-gnash
440 %{_bindir}/gnash-thumbnailer
441 %{_prefix}/etc/gnashthumbnailrc
442 %{_mandir}/man1/dump-gnash.1.gz
444 %files fileio-extension
445 %defattr(-,root,root,-)
446 %{_libdir}/gnash/plugins/fileio.so
448 %files lirc-extension
449 %defattr(-,root,root,-)
450 %{_libdir}/gnash/plugins/lirc.so
452 %files dejagnu-extension
453 %defattr(-,root,root,-)
454 %{_libdir}/gnash/plugins/dejagnu.so
456 %files mysql-extension
457 %defattr(-,root,root,-)
458 %{_libdir}/gnash/plugins/mysql.so
460 %changelog
461 * Fri Oct 14 2011 Rob Savoye <rob@welcomehome.org> - %{version}-%{release}
462 - Tweak for recent OLPC builds of fc14, which don't support kde.
464 * Sat Mar 27 2010 Rob Savoye <rob@welcomehome.org> - %{version}-%{release}
465 - add gnash-common package for non GUI files so as not to contaminate
466 the gtk or kde packages.
468 * Sat Sep 07 2009 Rob Savoye <rob@welcomehome.org> - %{version}-%{release}
469 - add kde4 support for klash.
471 * Sat Jun 13 2009 Rob Savoye <rob@welcomehome.org> - trunk
472 - Add support for packaging the gtk & python widget
474 * Sat Feb 13 2009 Rob Savoye <rob@welcomehome.org> - trunk
475 - Split off klash into it's own spec file.
477 * Sat Oct 24 2008 Rob Savoye <rob@welcomehome.org> - trunk
478 - Adjust dependencies for current bzr trunk
480 * Sat Feb 16 2008 Rob Savoye <rob@welcomehome.org> - %{version}-%{release}
481 - Adjust dependencies for current cvs HEAD
483 * Sat Mar 6 2007 Rob Savoye <rob@welcomehome.org> - %{version}-%{release}
484 - merge in patch from John @ Redhat.
486 * Tue Mar 06 2007 John (J5) Palmieri <johnp@redhat.com> 0.7.2.cvs20070306-1
487 - update to new snapshot
489 * Thu Feb 28 2007 John (J5) Palmieri <johnp@redhat.com> 0.7.2.cvs20070226-3
490 - require xulrunner instead of webclient
492 * Wed Feb 28 2007 John (J5) Palmieri <johnp@redhat.com> 0.7.2.cvs20070226-2
493 - don't delete requires .so files
495 * Mon Feb 26 2007 John (J5) Palmieri <johnp@redhat.com> 0.7.2.cvs20070226-1
496 - cvs snapshot built for olpc
498 * Sat Nov 7 2006 Rob Savoye <rob@welcomehome.org> - 0.7.2-2
499 - update for 0.7.2 release.
501 * Sat Nov 6 2006 Patrice Dumas <pertusus@free.fr> 0.7.2-1
502 - update for 0.7.2 release.
504 * Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 0.7.1-9
505 - rebuilt for unwind info generation, broken in gcc-4.1.1-21
507 * Sun Sep 24 2006 Patrice Dumas <pertusus@free.fr> 0.7.1-8
508 - plugin requires %%{_libdir}/mozilla/plugins. Fix (incompletly and
509 temporarily, but there is no better solution yet) #207613
511 * Sun Aug 27 2006 Patrice Dumas <pertusus@free.fr> - 0.7.1-7
512 - add defattr for klash
513 - add warnings in the description about stability
515 * Mon Aug 21 2006 Patrice Dumas <pertusus@free.fr> - 0.7.1-6
516 - remove superfluous buildrequires autoconf
517 - rename last patch to gnash-plugin-tempfile-dir.patch
518 - add README.fedora to plugin to explain tmpdirs
520 * Wed Aug 16 2006 Jens Petersen <petersen@redhat.com> - 0.7.1-5
521 - source qt.sh and configure --with-qtdir (Dominik Mierzejewski)
522 - add plugin-tempfile-dir.patch for plugin to use a safe tempdir
524 * Fri Jul 28 2006 Jens Petersen <petersen@redhat.com> - 0.7.1-4
525 - buildrequire autotools (Michael Knox)
527 * Fri Jun 2 2006 Patrice Dumas <pertusus@free.fr> - 0.7.1-3
528 - add gnash-continue_on_info_install_error.patch to avoid
529 - buildrequire libXmu-devel
531 * Wed May 17 2006 Jens Petersen <petersen@redhat.com> - 0.7.1-2
532 - configure with --disable-rpath
533 - buildrequire docbook2X
534 - remove devel files
536 * Sun May 7 2006 Jens Petersen <petersen@redhat.com> - 0.7.1-1
537 - update to 0.7.1 alpha release
539 * Sat Apr 22 2006 Rob Savoye <rob@welcomehome.org> - 0.7-1
540 - install the info file. Various tweaks for my system based on
541 Patrice's latest patch,
543 * Fri Feb 3 2006 Patrice Dumas <dumas@centre-cired.fr> - 0.7-0
544 - initial packaging