File xine-browser-plugin.spec of Package xine-browser-plugin
# Packmangroup: Multimedia
# Packmanpackagename: xine-browser-plugin
# Packman: Manfred Tremmel
# norootforbuild
%define major 2
%define libname libxine%{major}
%define libvers 1.2.0
Name: xine-browser-plugin
Summary: A Netscape/Mozilla plugin using xine engine for audio/video playback
Summary(de): Ein Netscape/Mozilla Plugin welches xine zur Wiedergabe von Audio/Videos nutzt
Version: 1.0.2
Release: 1699.6.pm.9
Group: Productivity/Networking/Web/Browsers
License: GPL-2.0
Url: http://www.xine-project.org/home
Source0: xine-plugin-1.0.2.tar.bz2
ExclusiveArch: %ix86 x86_64
Vendor: Packman
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: %{libname} >= %{libvers}
BuildRequires: %{libname} >= %{libvers}
BuildRequires: %{libname}-devel >= %{libvers}
BuildRequires: pkgconfig
BuildRequires: pkgconfig(x11)
BuildRequires: libjack0 >= 0.109
BuildRequires: libjack-devel >= 0.109
Obsoletes: xine-plugin, xine-mozilla-plugin
Provides: xine-plugin, xine-mozilla-plugin
%description
xine-browser-plugin provides multimedia capabilities to Netscape/Mozilla or
compatible browsers using xine engine.
%description -l de
xine-browser-plugin stellt Netscape/Mozilla und kompatiblen Browsern Multimediafähigkeiten
basierend auf der xine Bibliothek zur Verfügung.
%prep
%setup -n xine-plugin-%{version}
%build
export CFLAGS="${RPM_OPT_FLAGS}"
if [ ! -f configure ]; then
NO_CONFIGURE=1 ./autogen.sh
# NO_CONFIGURE=1 ./cvscompile.sh
fi
#
# currently we do not use %%configure as it seems to cause trouble with
# certain automake produced configure scripts - depending on automake version.
# Use BUILD_ARGS envvar to pass extra parameters to configure (like --enable-dha-mod/etc...)
#
./configure --build=%{_target_platform} --prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} --bindir=%{_bindir} \
--sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} --includedir=%{_includedir} \
--libdir=%{_libdir} --libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
--infodir=%{_infodir} PLUGIN_DIR=%{_libdir}/browser-plugins \
--enable-shared $BUILD_ARGS
make
%install
%{__mkdir_p} %{buildroot}%{_libdir}/browser-plugins/
%{__install} -m755 src/.libs/xineplugin.so %{buildroot}%{_libdir}/browser-plugins/
%{__install} -m644 misc/xine-logo.* %{buildroot}%{_libdir}/browser-plugins/
%post
if [ "$1" = "1" ] || [ "$1" = "2" ] ; then # install or update
# plugindirs to check
PLUGINDIRS='/opt/mozilla/%{_lib}/plugins /opt/MozillaFirefox/%{_lib}/plugins /opt/netscape/plugins /opt/mozilla/plugins %{_libdir}/firefox/plugins'
# pluginname
PLUGINNAME='xineplugin.so'
for PLUGINDIR in ${PLUGINDIRS}; do
if [ -d ${PLUGINDIR} ]; then
cd ${PLUGINDIR}
# check if plugin directory exists
if [ ! -L ${PLUGINNAME} ]; then
# add a symlink if it doesn't exists
%{__ln_s} %{_libdir}/browser-plugins/${PLUGINNAME} .
fi
cd -
fi
done
fi
%preun
if [ "$1" = "0" ]; then # remove
# plugindirs to check
PLUGINDIRS='/opt/mozilla/%{_lib}/plugins /opt/MozillaFirefox/%{_lib}/plugins /opt/netscape/plugins /opt/mozilla/plugins %{_libdir}/firefox/plugins'
# pluginname
PLUGINNAME='xineplugin.so'
for PLUGINDIR in ${PLUGINDIRS}; do
if [ -d ${PLUGINDIR} ]; then
cd ${PLUGINDIR}
# check if plugin directory exists
if [ -L ${PLUGINNAME} ]; then
# add a symlink if it doesn't exists
%{__rm} -f ${PLUGINNAME}
fi
cd -
fi
done
fi
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING README TODO
%{_libdir}/browser-plugins/xineplugin.so
%{_libdir}/browser-plugins/xine-logo.*
%changelog
* Tue May 14 2024 Manfred Hollstein <manfred.h@gmx.net>
- Switch to use pkgconfig(x11)
* Fri Jan 06 2012 Manfred Tremmel <Manfred.Tremmel@iiv.de> - 1.0.2-3
- compile against libxine2
* Sat Sep 12 2009 Manfred Tremmel <Manfred.Tremmel@iiv.de> - 1.0.2-1.pm.1
- cleanups where rpmlint wasn't so happy
* Sat Jul 26 2008 Manfred Tremmel <Manfred.Tremmel@iiv.de>
- Update to 1.0.2
* Thu Apr 03 2008 Manfred Tremmel <Manfred.Tremmel@iiv.de>
- Update to 1.0.1
* Sat Feb 10 2007 Manfred Tremmel <Manfred.Tremmel@iiv.de>
- Update to 1.0
* Mon Mar 24 2003 Manfred Tremmel <Manfred.Tremmel@iiv.de>
- first spec file