File gnash.spec of Package gnash

#
# spec file for package gnash (Version 0.8.4)
#
# Copyright (c) 2008 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/
#

# norootforbuild

%bcond_without distributable

Name:           gnash
%define cvs_date 0
BuildRequires:  SDL-devel agg-devel boost-devel curl-devel gcc-c++ giflib-devel gstreamer010-devel gtk2-devel libjpeg-devel libstdc++-devel
%if !%{with distributable}
BuildRequires:  ffmpeg-devel
%endif
Summary:        Free Flash movie player
Version:        0.8.4
Release:        4
License:        GPL v2 or later
Group:          Productivity/Networking/Web/Browsers
%if %{cvs_date}
%define package_version %{version}.cvs%{cvs_date}
%else
%define package_version %{version}
%endif
Source:         %{name}-%{package_version}.tar.bz2
Patch:          gnash-0.8.4-cast-fixes.diff
Url:            http://www.gnu.org/software/gnash/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Gnash is a Free Flash movie player, which works either standalone, or
as a Firefox/Mozilla plugin.

Gnash supports the current Shockwave format, version 7. While all the
ActionScript classes exist, not all of the methods defined by the SWF
format documentation are implemented however, so not all flash movies
work 100% if they utilize any of the unimplemented methods. This is one
of the areas to work on to achieve full version 7 compliance.



Authors:
--------
    Rob Savoye <rob@senecass.com>

%prep
%if %{cvs_date}
%setup -q -n gnash
# exclude movies.all
for i in configure.ac testsuite/Makefile.am; do
  grep -v 'movies\.all' $i > $i.x
  mv $i.x $i
done
%else
%setup -q -n gnash-%{version}
%endif
%patch

%build
autoreconf -fi
# -fpermissive is for broken boost with gcc-4.3 (#353897)
CXXFLAGS="$RPM_OPT_FLAGS -fpermissive" \
%configure \
  --disable-static \
  --disable-ltdl-install \
  --disable-rpath \
  --enable-gui=gtk \
  --enable-renderer=agg \
%if %{with distributable}
  --enable-media=GST \
%else
  --enable-media=ffmpeg \
  --with-ffmpeg-incl=%{_includedir} \
%endif
%if %suse_version < 1030
  --with-gstreamer-lib=/opt/gnome/%{_lib} \
%endif
  --with-plugins-install=system \
  --with-plugindir=%{_libdir}/browser-plugins
make %{?jobs:-j %jobs}

%install
%makeinstall install-plugins
find $RPM_BUILD_ROOT%{_libdir} -name '*.la' | xargs rm
# move/install documents
mkdir -p $RPM_BUILD_ROOT%{_docdir}
mv $RPM_BUILD_ROOT%{_datadir}/doc/gnash $RPM_BUILD_ROOT%{_docdir}
install -c -m 0644 AUTHORS COPYING ChangeLog NEWS README TODO \
  $RPM_BUILD_ROOT%{_docdir}/gnash
%find_lang %{name}

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-, root, root)
%doc %{_mandir}/man?/*
%doc %{_docdir}/gnash
%{_libdir}/gnash
%{_libdir}/browser-plugins/*
%{_bindir}/*
%{_datadir}/gnash
%config(noreplace) /etc/gnashrc
%config(noreplace) /etc/gnashpluginrc

%changelog
* Thu Nov 20 2008 lnussel@suse.de
- use rpm conditional for distributable macro
* Fri Oct 24 2008 schwab@suse.de
- Fix broken casts.
* Wed Oct 15 2008 tiwai@suse.de
- updated to version 0.8.4:
  * The -d switch won't behave the same as in 0.8.3.
  * Support for MIT SHM X extention is disabled by default
  * Keep Adobe happy with our users and our users happy with us by
  changing "Flash player" into "SWF player" everywhere
  * The popular SWF Twitter badge now renders correctly
  * Fix parsing of urls containing multiple question marks
  * Fix support for movies embedding multiple sound streams
  * Support for loading PNG and GIF images added
  * Improved rendering of SWF movies
  * Support for writing RGB/RGBA PNG images and JPEG images
  * Works with Potlatch OpenStreetMap editor
  * New 'flvdumper' utility for analyzing FLV video files
  * XPI packaging support for Mozilla & Firefox.
  see NEWS for other details
* Mon Sep 29 2008 ro@suse.de
- disable autoreconf for new libtool
* Wed Jun 18 2008 tiwai@suse.de
- updated to version 0.8.3:
  * Native fullscreen support (from AS) implemented.
  * Long command-line options properly supported.
  * View detailed movie information from GTK gui.
  * Added an option in Preferences to initially display a movie
  as a blank ("Click here to start") screen.
  * Added "dump" GUI to dump a movie to disk.
  * Improved Cairo rendering performance.
  * Fix support for OpenOffice Impress SWF exporter (malformed..)
  See NEWS and ChangeLog for details.
* Thu Mar 13 2008 schwab@suse.de
- Remove strange libltdl rules from makefiles that fail with libtool-2.
* Fri Mar 07 2008 tiwai@suse.de
- updated to version 0.8.2
  * lots of fixes - see ChangeLog
  * reference documents in HTML
- clean up spec file
* Fri Jan 18 2008 tiwai@suse.de
- updated to CVS 2008.01.15 snapshot:
  * pre 0.8.2 version, including many fixes
- fix build with boost and gcc 4.3
* Wed Nov 28 2007 tiwai@suse.de
- updated to CVS 2007.11.28 snapshot
  * gcc 4.3 fixes have been merged
- fix build with older suse versions (for gstreamer lib path)
* Tue Oct 23 2007 tiwai@suse.de
- fix build with gcc 4.3
- updated to CVS 2007.10.23 snapshot
* Thu Aug 30 2007 tiwai@suse.de
- pick up version 0.8.1-final tarball
  including the previous build patch, no functional changes
* Mon Aug 13 2007 tiwai@suse.de
- version 0.8.1-pre:
  * install libraries to $libdir/gnash
  * fix audio sync
  * lots of other fixes, see ChangeLog.
* Thu Jun 21 2007 tiwai@suse.de
- use AGG renderer instead of openGL; it renders texts in better
  quality
* Tue Jun 12 2007 tiwai@suse.de
- fix gcc compile warning, comparison with string literals
- remove INSTALL, use find_lang to make rpmlint happy
* Mon Jun 11 2007 tiwai@suse.de
- updated to version 0.8.0:
  including previous fixes, see ChangeLog
* Wed May 23 2007 tiwai@suse.de
- updated to cvs 2007.05.23 snapshot
  * lots of fixes and improvements; see ChangeLog
- use gstreamer as (sound) media backend
* Thu Mar 29 2007 tiwai@suse.de
- updated to cvs 2007.03.28 snapshot
  * many new testsuites
  * fixes, improvements, see ChangeLog
* Tue Jan 30 2007 tiwai@suse.de
- updated to cvs 2007.01.30 snapshot
  * lots of fixes and changes, see ChangeLog
* Wed Dec 20 2006 schwab@suse.de
- Fix compilation.
* Wed Dec 20 2006 tiwai@suse.de
- updated to CVS 2006.12.20 snapshot
  * version bump to 0.7.2
  * lots of code fixes and optimizations
* Thu Oct 19 2006 tiwai@suse.de
- updated to CVS 2006.10.19 snapshot
  * sound backend fixes
  * AGG renderer support
  * rewritten m4 macros
  * more fixes, see ChangeLog
- fix configure options for distributable packages
* Thu Oct 05 2006 tiwai@suse.de
- updated to CVS 2006.10.05 snapshot
  * use boost lib
  * plugin invokes gnash with pipe without temp swf files now
  * many other fixes and improvements
- fixed buildrequires
- removed gnash-plugin-tmp-file-fix.diff
* Wed Sep 20 2006 tiwai@suse.de
- updated to CVS 2006.09.20 snapshot
  * pretty many bugfixes, see ChangeLog for details.
- updated gnash-plugin-tmp-file-fix.diff
  now reading ~/.gnashrc and use ~/.gnashtmp as default
* Wed Aug 23 2006 tiwai@suse.de
- initial version: 0.7.1 CVS 2006.08.22 snapshot