File gnash.spec of Package gnash

#
# spec file for package gnash
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           gnash
Version:        0.8.10
Release:        0
Summary:        GNU SWF player
License:        GPL-3.0
Group:          Productivity/Multimedia/Other
Url:            http://www.gnu.org/software/gnash/
Source0:        ftp://ftp.gnu.org/pub/gnu/gnash/%{version}/%{name}-%{version}.tar.bz2
Patch0:         gnash-buildfix.patch
Patch1:         gnash-0.8.10-giflib5.patch
Patch2:         gnash-0.8.10-buffer-overflow.patch
Patch3:         gnash-0.8.10-boost_system.patch
Patch4:         gnash-0.8.10-docbook_fix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  dejagnu
BuildRequires:  docbook-utils
BuildRequires:  docbook2X
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libexpat-devel
BuildRequires:  libltdl-devel
BuildRequires:  libmysqlclient-devel
BuildRequires:  makeinfo
BuildRequires:  mozilla-nspr-devel
BuildRequires:  update-desktop-files
BuildRequires:  xulrunner-devel
# bitmap libraries for loading images
BuildRequires:  giflib-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
# these are needed for the python gtk widget
BuildRequires:  boost-devel
BuildRequires:  curl-devel
BuildRequires:  fontconfig-devel
BuildRequires:  freetype2-devel
BuildRequires:  gconf2-devel
BuildRequires:  gstreamer-0_10-plugins-base-devel
BuildRequires:  gstreamer010-devel
BuildRequires:  gtk2-devel
BuildRequires:  openssl-devel
BuildRequires:  python-devel
BuildRequires:  python-gtk-devel
BuildRequires:  speex-devel
# needed for Klash
BuildRequires:  libkde4-devel
# these are needed for the various renderers, which now all get built
BuildRequires:  SDL-devel
BuildRequires:  agg-devel
BuildRequires:  libstdc++-devel
BuildRequires:  xorg-x11-libXt-devel

# For info files needed
Requires(post):  /sbin/install-info
Requires(preun):  /sbin/install-info

# The default Gnash package only includes the GTK parts, the rest
# is in gnash-common.
Requires:       gnash-common

%description
Gnash is a GNU SWF movie player that supports many SWF v7 features,
with growing support for swf v8, v9, and v10.

%package common
Summary:        Web-client SWF player plugin 
Group:          Productivity/Networking/Web/Browsers

%description common
Common files Shared between Gnash and Klash, Gnash/Klash is a GNU SWF movie
player that supports many SWF v7 features, with growing support for
swf v8, v9, and v10.

%package klash4
Summary:        Konqueror SWF player plugin for KDE 4
Group:          Productivity/Networking/Web/Browsers
Requires:       gnash
Requires:       gnash-common
%kde4_runtime_requires

%description klash4
The gnash (klash) SWF player plugin for Konqueror in KDE4.

%package plugin
Summary:        Web-client SWF player plugin 
Group:          Productivity/Networking/Web/Browsers
Requires:       gnash
Requires:       gnash-common

%description plugin
The gnash SWF player plugin for Firefox or Mozilla.

%package cygnal
Summary:        Streaming media server
Group:          Productivity/Networking/Web/Servers
Requires:       gnash-common

%description cygnal
Cygnal is a streaming media server that's Flash aware.

%package devel
Summary:        Gnash header files
Group:          Development/Libraries/C and C++
Requires:       gnash-common

%description devel
Gnash header files can be used to write external Gnash extensions.

%package framebuffer
Summary:        Standalone SWF file player for the framebuffer
Group:          Productivity/Multimedia/Video/Players
Requires:       gnash-common

%description framebuffer
Framebuffer Gnash is a standalone SWF file player for the Linux framebuffer.

%package dump
Summary:        Standalone SWF file player that dumps screenshots
Group:          Productivity/Multimedia/Video/Players
Requires:       gnash-common

%description dump
Gnash Dump is a standalone SWF file player that dumps screenshots of each
frame to disk.

%package widget
Summary:        Gnash widgets for Gtk and Python
Group:          Productivity/Multimedia/Video/Players
Requires:       gnash
Requires:       gnash-common

%description widget
The Gnash widgets can be used to embed Gnash into any Gtk or Python-Gtk
application.

%package fileio-extension
Summary:        Fileio extension for Gnash
Group:          Productivity/Multimedia/Video/Players
Requires:       gnash-common

%description fileio-extension
This extension allows SWF files being played within Gnash to have direct access
to the file system. The API is similar to the C library one.

%package lirc-extension
Summary:        LIRC extension for Gnash
Group:          Productivity/Multimedia/Video/Players
Requires:       gnash-common

%description lirc-extension
This extension allows SWF files being played within Gnash to have direct access
to a LIRC based remote control device. The API is similar to the standard
LIRC one.

%package dejagnu-extension
Summary:        DejaGnu extension for Gnash
Group:          Development/Tools/Other
Requires:       gnash-common

%description dejagnu-extension
This extension allows SWF files to have a simple unit testing API. The API
is similar to the DejaGnu unit testing one.

%package mysql-extension
Summary:        MySQL extension for Gnash
Group:          Development/Tools/Other
Requires:       gnash-common

%description mysql-extension
This extension allows SWF files being played within Gnash to have direct access
to a MySQL database. The API is similar to the standard MySQL one.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2
%patch3 -p1

%if 0%{?suse_version} == 1230
%patch4 -p1
%endif

%build
# these are actually the default values, but this way they get added
# to the build so they appear in "gnash --version".
RENDERER="--enable-renderer=agg,cairo"      # opengl or openvg too
# These are not the defaults
SOUND="--enable-media=gst"		    # we can't distribute ffmpeg support
OPTIONAL="--enable-python --enable-cygnal"
GUI="--enable-gui=gtk,qt4,fb,dump"          # aqua, sdl
CXXFLAGS="%{optflags}" \
%configure \
	$SOUND \
	$GUI \
	$RENDERER \
	$OPTIONAL \
        --prefix=/usr \
	--libdir=%{_libdir} \
	--mandir=%{_prefix}/share/man \
	--infodir=%{_prefix}/share/info \
	--disable-dependency-tracking \
	--disable-testsuite \
	--disable-rpath \
	--enable-docbook \
	--with-plugins-install=system \
	--with-plugindir=%{_libdir}/mozilla/plugins \
	--enable-extensions=fileio,lirc,dejagnu,mysql

make MAKEFLAGS=$MAKEFLAGS dumpconfig all LDFLAGS="-Wl,--build-id"

%install
make MAKEFLAGS=$MAKEFLAGS install DESTDIR=$RPM_BUILD_ROOT LDFLAGS="-Wl,--build-id"
make MAKEFLAGS=$MAKEFLAGS install-plugins DESTDIR=$RPM_BUILD_ROOT LDFLAGS="-Wl,--build-id"
rm -f $RPM_BUILD_ROOT%{_libdir}/gnash/*.*a

%fdupes -s %{buildroot}%{_datadir}/locale
%fdupes -s %{buildroot}%{_mandir}/man1/
%suse_update_desktop_file -i klash AudioVideo Player
%suse_update_desktop_file -i gnash AudioVideo Player

%clean
rm -rf $RPM_BUILD_ROOT

%post 
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}_ref.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}_user.info.gz

%postun
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}_ref.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}_user.info.gz

%post klash4
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor

%postun klash4
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor

%files
%defattr(-,root,root,-)
%{_bindir}/gnash-gtk-launcher
%{_bindir}/gtk-gnash
%{_mandir}/man1/gtk-gnash.1.gz
%{_mandir}/man1/gnash-gtk-launcher.1.gz
%{_datadir}/icons/hicolor/32x32/apps/gnash.xpm
%{_datadir}/applications/gnash.desktop

%files common
%defattr(-,root,root,-)
%dump
%doc README AUTHORS COPYING NEWS 
%{_bindir}/gnash
%{_mandir}/man1/gnash.1.gz
%{_bindir}/gprocessor
%{_bindir}/soldumper
%{_bindir}/flvdumper
%{_bindir}/findmicrophones
%{_bindir}/findwebcams
%{_bindir}/rtmpget
%dir %{_libdir}/gnash
%{_libdir}/gnash/*.so*
%dir %{_datadir}/gnash
%{_datadir}/gnash/GnashG.png
%{_datadir}/gnash/gnash_128_96.ico
%{_datadir}/info/gnash_ref.info.gz
%{_datadir}/info/gnash_user.info.gz
%{_mandir}/man1/gprocessor.1.gz
%{_mandir}/man1/soldumper.1.gz
%{_mandir}/man1/flvdumper.1.gz
%{_mandir}/man1/findmicrophones.1.gz
%{_mandir}/man1/findwebcams.1.gz
%{_mandir}/man1/rtmpget.1.gz
%lang(cs) %{_datadir}/locale/cs/LC_MESSAGES/gnash.mo
%lang(da) %{_datadir}/locale/da/LC_MESSAGES/gnash.mo
%lang(de) %{_datadir}/locale/de/LC_MESSAGES/gnash.mo
%lang(el) %{_datadir}/locale/el/LC_MESSAGES/gnash.mo
%lang(en_GB) %{_datadir}/locale/en_GB/LC_MESSAGES/gnash.mo
%lang(es) %{_datadir}/locale/es/LC_MESSAGES/gnash.mo
%lang(fi) %{_datadir}/locale/fi/LC_MESSAGES/gnash.mo
%lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/gnash.mo
%lang(it) %{_datadir}/locale/it/LC_MESSAGES/gnash.mo
%lang(ja) %{_datadir}/locale/ja/LC_MESSAGES/gnash.mo
%lang(km) %{_datadir}/locale/km/LC_MESSAGES/gnash.mo
%lang(ne) %{_datadir}/locale/ne/LC_MESSAGES/gnash.mo
%lang(ru) %{_datadir}/locale/ru/LC_MESSAGES/gnash.mo
%lang(zh_TW) %{_datadir}/locale/zh_TW/LC_MESSAGES/gnash.mo
%{_datadir}/applications/gnash.schemas
%{_datadir}/gnash/gnash-splash.swf
%dir %{_datadir}/doc/gnash
%{_datadir}/doc/gnash/gnash*.html
%dir %{_datadir}/doc/gnash/images
%{_datadir}/doc/gnash/images/*.png
%config %{_sysconfdir}/gnashrc
%config %{_sysconfdir}/gnashpluginrc

%files plugin
%defattr(-,root,root,-)
%dir %{_libdir}/mozilla
%dir %{_libdir}/mozilla/plugins
%{_libdir}/mozilla/plugins/libgnashplugin.so

%files cygnal
%defattr(-,root,root,-)
%{_bindir}/cygnal
%config %{_sysconfdir}/cygnalrc
%dir %{_libdir}/cygnal
%dir %{_libdir}/cygnal/plugins
%{_libdir}/cygnal/plugins/*.so*
%{_mandir}/man1/cygnal.1.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/gnash/
%{_libdir}/pkgconfig/gnash.pc

%files widget
%defattr(-,root,root,-)
%{_prefix}/lib*/python*/site-packages/gtk-2.0/gnash.*

%files klash4
%defattr(-,root,root,-)
%{_bindir}/gnash-qt-launcher
%{_bindir}/qt4-gnash
%{_mandir}/man1/qt4-gnash.1.gz
%{_mandir}/man1/gnash-qt-launcher.1.gz
%{_libdir}/kde4/libklashpart.*
%dir %{_kde4_appsdir}/klash
%{_kde4_appsdir}/klash/klashpartui.rc
%{_kde4_appsdir}/klash/pluginsinfo
%{_kde4_servicesdir}/klash_part.desktop
%{_datadir}/applications/klash.desktop
%{_datadir}/icons/hicolor/32x32/apps/klash.xpm

%files framebuffer
%defattr(-,root,root,-)
%{_bindir}/fb-gnash
%{_mandir}/man1/fb-gnash.1.gz

%files dump
%defattr(-,root,root,-)
%{_bindir}/dump-gnash
%{_bindir}/gnash-thumbnailer
%config %{_sysconfdir}/gnashthumbnailrc
%{_mandir}/man1/dump-gnash.1.gz

%files fileio-extension
%defattr(-,root,root,-)
%dir %{_libdir}/gnash
%dir %{_libdir}/gnash/plugins
%{_libdir}/gnash/plugins/fileio.so

%files lirc-extension
%defattr(-,root,root,-)
%dir %{_libdir}/gnash
%dir %{_libdir}/gnash/plugins
%{_libdir}/gnash/plugins/lirc.so

%files dejagnu-extension
%defattr(-,root,root,-)
%dir %{_libdir}/gnash
%dir %{_libdir}/gnash/plugins
%{_libdir}/gnash/plugins/dejagnu.so

%files mysql-extension
%defattr(-,root,root,-)
%dir %{_libdir}/gnash
%dir %{_libdir}/gnash/plugins
%{_libdir}/gnash/plugins/mysql.so

%changelog
openSUSE Build Service is sponsored by