File lightspark.spec of Package lightspark
#
# spec file for package lightspark
#
# 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/
#
%bcond_with ffmpeg
%bcond_with rtmp
Name: lightspark
Version: 0.7.2
Release: 0
Summary: Modern, free, open-source flash player implementation
License: LGPL-3.0+
Group: Productivity/Multimedia/Other
Url: https://launchpad.net/lightspark/
Source0: https://launchpad.net/lightspark/trunk/lightspark-%{version}/+download/lightspark-%{version}.tar.gz
# PATCH-FIX-UPSTREAM lightspark-0.5.7-underlinking.patch lp#1000818 reddwarf@opensuse.org -- Link against GTK
Patch0: lightspark-0.5.7-underlinking.patch
# PATCH-FIX-UPSTREAM llvm-3.3.patch mhrusecky@suse.cz -- Upstream patch for llvm 3.3. support
Patch1: llvm-3.3.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: gettext-tools
BuildRequires: hicolor-icon-theme
BuildRequires: libjpeg-devel
BuildRequires: llvm-devel >= 2.8
BuildRequires: nasm
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(gdk-2.0)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(glibmm-2.4)
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libxml++-2.6) >= 2.33.1
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(pangocairo)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(zlib)
%if %{with rtmp}
BuildRequires: pkgconfig(librtmp)
%endif
%if %{with ffmpeg}
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
%endif
Recommends: %{_bindir}/gnash
%description
Lightspark is a modern, free, open-source flash player implementation.
%package plugin
Summary: NPAPI plugin for lightspark
Group: Productivity/Multimedia/Other
Requires: %{name} = %{version}
Enhances: browser(npapi)
%description plugin
NPAPI plugin for lightspark.
%prep
%setup -q
%patch0
%patch1
%build
export CFLAGS='%{optflags}'
export CXXFLAGS='%{optflags}'
mkdir build
cd build
cmake -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 \
-DCMAKE_VERBOSE_MAKEFILE=1 \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_SUFFIX=$(echo %{_lib} | cut -b4-) \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
-DPLUGIN_DIRECTORY=%{_libdir}/browser-plugins \
-DENABLE_LIBAVCODEC=%{?with_ffmpeg:YES}%{!?with_ffmpeg:NO} \
-DENABLE_RTMP=%{?with_rtmp:YES}%{!?with_rtmp:NO} ..
make %{?_smp_mflags}
%install
cd build
%make_install
cd ..
%find_lang %{name}
rm -f %{buildroot}%{_libdir}/%{name}/lib%{name}.so
# Not in hicolor theme (lp#1000840)
rm -rf %{buildroot}%{_datadir}/icons/hicolor/20x20
%post
%icon_theme_cache_post
%desktop_database_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files -f %{name}.lang
%defattr(0644,root,root,0755)
%doc COPYING.LESSER ChangeLog
%config(noreplace) %{_sysconfdir}/xdg/lightspark.conf
%attr(0755,root,root) %{_bindir}/lightspark
%attr(0755,root,root) %{_bindir}/tightspark
%{_datadir}/lightspark
%{_datadir}/applications/lightspark.desktop
%{_datadir}/icons/hicolor/*/*/*
%{_mandir}/man1/lightspark.1*
%{_libdir}/lightspark
%files plugin
%defattr(0644,root,root,0755)
%{_libdir}/browser-plugins/liblightsparkplugin.so
%changelog