File gnash.spec of Package gnash

# spec file for package gnash
# Copyright (c) 2011 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

%bcond_without distributable

Name:           gnash
%define cvs_date 0
BuildRequires:  SDL-devel
BuildRequires:  agg-devel
BuildRequires:  boost-devel
BuildRequires:  curl-devel
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  giflib-devel
BuildRequires:  gstreamer-0_10-plugins-base-devel
BuildRequires:  gstreamer010-devel
BuildRequires:  gtk2-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libstdc++-devel
BuildRequires:  speex-devel
%if !%{with distributable}
BuildRequires:  ffmpeg-devel
Version:        0.8.8
Release:        2
License:        GPLv2+
Summary:        Free Flash movie player
Group:          Productivity/Networking/Web/Browsers
%if %{cvs_date}
%define package_version %{version}.cvs%{cvs_date}
%define package_version %{version}
Source:         %{name}-%{package_version}.tar.bz2
Source1:        %{name}-rpmlintrc
# PATCH-FIX-UPSTREAM gnash-0.8.5-build-fixes.diff
Patch:          gnash-0.8.5-build-fixes.diff
Patch1:         gnash-fix-insecure-temp-files.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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.

%package devel
License:        GPLv2+
Summary:        Gnash include files
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
Include files for developing with gnash.

%if %{cvs_date}
%setup -q -n gnash
# exclude movies.all
for i in testsuite/; do
  grep -v 'movies\.all' $i > $i.x
  mv $i.x $i
%setup -q -n gnash-%{version}
%patch -p1
%patch1 -p1

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

%makeinstall install-plugins
find %{buildroot}%{_libdir} -name '*.la' -delete
# move/install documents
mkdir -p %{buildroot}%{_docdir}
mv %{buildroot}%{_datadir}/doc/gnash %{buildroot}%{_docdir}
install -c -m 0644 AUTHORS COPYING ChangeLog* NEWS README TODO \
%find_lang %{name}
%fdupes -s %{buildroot}%{_datadir}/locale

rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-, root, root)
%doc %{_mandir}/man?/*
%doc %{_docdir}/gnash
%config(noreplace) %{_sysconfdir}/gnashrc
%config(noreplace) %{_sysconfdir}/gnashpluginrc

%files devel
%dir %{_includedir}/%{name}/

openSUSE Build Service is sponsored by