File lightspark.spec of Package lightspark
#
# spec file for package lightspark
#
# Copyright (c) 2019 SUSE LINUX 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 https://bugs.opensuse.org/
#
%bcond_without ffmpeg
%bcond_with rtmp
Name: lightspark
Version: 0.8.2
Release: 0
Summary: Flash player implementation
License: LGPL-3.0+
Group: Productivity/Multimedia/Other
URL: https://lightspark.github.io/
Source0: %{name}-%{version}.tar.gz
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: ncurses-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(SDL2_mixer)
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(libcurl)
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libpcre)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libxml++-2.6) >= 2.33.1
BuildRequires: pkgconfig(pango)
BuildRequires: pkgconfig(pangocairo)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(zlib)
Requires(post): hicolor-icon-theme
Requires(post): update-desktop-files
Requires(postun): hicolor-icon-theme
Requires(postun): update-desktop-files
Recommends: %{_bindir}/gnash
Recommends: %{name}-lang
ExclusiveArch: %{ix86} x86_64
%if 0%{?suse_version} >= 1500
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_system-devel
%else
BuildRequires: boost-devel
%endif
%if %{with librtmp}
BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(librtmp)
BuildRequires: pkgconfig(libssl)
%endif
%if %{with ffmpeg}
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavresample)
BuildRequires: pkgconfig(libavutil)
%endif
%description
Lightspark is an Flash player implementation for playing files in SWF
format. Lightspark can run as a web browser plugin or as a standalone
application.
Lightspark supports SWF files written on the newest version of the
ActionScript language, ActionScript 3.0, which was introduced at the
same time as Flash Player 9.
%lang_package
%package plugin
Summary: NPAPI plugin for lightspark
Group: Productivity/Multimedia/Other
Requires: %{name} = %{version}
Enhances: browser(npapi)
Conflicts: flash-player
Conflicts: gnash-browser-plugin
%description plugin
NPAPI plugin for lightspark.
%prep
%setup -q
%build
%cmake \
-DPLUGIN_DIRECTORY=%{_libdir}/browser-plugins \
-DPPAPI_PLUGIN_DIRECTORY=%{_libdir}/browser-plugins \
-DENABLE_LIBAVCODEC=%{?with_ffmpeg:YES}%{!?with_ffmpeg:NO} \
-DENABLE_RTMP=%{?with_rtmp:YES}%{!?with_rtmp:NO} \
%ifarch x86_64 || %{ix86}
-DENABLE_SSE2=true \
%endif
-Wno-dev
make %{?_smp_mflags}
%install
%cmake_install
%find_lang %{name}
rm -f %{buildroot}%{_libdir}/%{name}/lib%{name}.so
mv %{buildroot}%{_libdir}/%{name}/* \
%{buildroot}%{_libdir}/
# Not in hicolor theme (lp#1000840)
rm -rf %{buildroot}%{_datadir}/icons/hicolor/20x20
%post -p /sbin/ldconfig
%if 0%{?suse_version} < 1500
%icon_theme_cache_post
%desktop_database_post
%endif
%postun -p /sbin/ldconfig
%if 0%{?suse_version} < 1500
%desktop_database_postun
%icon_theme_cache_postun
%endif
%files
%license COPYING.LESSER
%doc ChangeLog
%config(noreplace) %{_sysconfdir}/xdg/lightspark.conf
%attr(0755,root,root) %{_bindir}/lightspark
%{_datadir}/applications/lightspark.desktop
%{_datadir}/icons/hicolor/*/*/*
%{_mandir}/man1/lightspark.1*
%{_libdir}/lib%{name}.so*
%files lang -f %{name}.lang
%files plugin
%{_libdir}/browser-plugins/*.so
%{_libdir}/browser-plugins/manifest.json
%changelog