SPECS (AC-branch): totem.spec - browser plugins support. Seems to ...
blues
blues at pld-linux.org
Sun May 14 14:32:00 CEST 2006
Author: blues Date: Sun May 14 12:32:00 2006 GMT
Module: SPECS Tag: AC-branch
---- Log message:
- browser plugins support. Seems to be working
---- Files affected:
SPECS:
totem.spec (1.72 -> 1.72.2.1)
---- Diffs:
================================================================
Index: SPECS/totem.spec
diff -u SPECS/totem.spec:1.72 SPECS/totem.spec:1.72.2.1
--- SPECS/totem.spec:1.72 Sun Dec 11 22:58:15 2005
+++ SPECS/totem.spec Sun May 14 14:31:55 2006
@@ -1,7 +1,7 @@
# $Revision$, $Date$
#
# TODO:
-# - switch to common plugins dir (better known as glen's nsplugins dir ;)
+# - what more bowsers can be supported?
#
# Conditional build
%bcond_with gstreamer # build with gstreamer instead xine-lib
@@ -17,7 +17,7 @@
Summary(pl): Odtwarzacz filmów dla GNOME 2 oparty na silniku gstreamer
Name: totem
Version: 1.2.1
-Release: 1
+Release: 2
License: GPL
Group: Applications/Multimedia
Source0: http://ftp.gnome.org/pub/gnome/sources/totem/1.2/%{name}-%{version}.tar.bz2
@@ -76,6 +76,11 @@
%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _plugindir %{_libdir}/browser-plugins
+
+# list of supported browsers, in free form text
+%define browsers mozilla, mozilla-firefox, netscape, seamonkey
+
%if %{with gstreamer}
%description
Totem is simple movie player for the GNOME desktop based on gstreamer.
@@ -164,6 +169,27 @@
%description -n mozilla-plugin-totem -l pl
Wtyczka Totema dla Mozilli.
+%package -n browser-plugin-%{name}
+Summary: Totem's browser plugin
+Summary(pl): Wtyczka Totema do przeglądarek WWW
+Group: X11/Libraries
+Requires: browser-plugins(%{_target_base_arch})
+Requires: %{name} = %{version}-%{release}
+Provides: mozilla-plugin-totem
+Obsoletes: mozilla-plugin-totem
+Provides: mozilla-firefox-plugin-totem
+Obsoletes: mozilla-firefox-plugin-totem
+
+%description -n browser-plugin-%{name}
+Totem's plugin for browsers.
+
+Supported browsers: %{browsers}.
+
+%description -n browser-plugin-%{name} -l pl
+Wtyczka Totem do przeglądarek WWW.
+
+Obsługiwane przeglądarki: %{browsers}.
+
%prep
%setup -q
%patch0 -p1
@@ -190,10 +216,11 @@
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
+ plugindir=%{_plugindir} \
+ typelibdir=%{_plugindir} \
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
-rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/*.{la,a}
-rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla-firefox/plugins/*.{la,a}
+rm -f $RPM_BUILD_ROOT%{_plugindir}/*.{la,a}
rm -f $RPM_BUILD_ROOT%{_libdir}/nautilus/extensions-1.0/*.{la,a}
rm -r $RPM_BUILD_ROOT%{_datadir}/locale/no
@@ -221,6 +248,38 @@
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
+%triggerin -n browser-plugin-%{name} -- mozilla
+%nsplugin_install -d %{_libdir}/mozilla/plugins libtotem_mozilla.{so,xpt}
+
+%triggerun -n browser-plugin-%{name} -- mozilla
+%nsplugin_uninstall -d %{_libdir}/mozilla/plugins libtotem_mozilla.{so,xpt}
+
+%triggerin -n browser-plugin-%{name} -- mozilla-firefox
+%nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libtotem_mozilla.{so,xpt}
+
+%triggerun -n browser-plugin-%{name} -- mozilla-forefox
+%nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libtotem_mozilla.{so,xpt}
+
+%triggerin -n browser-plugin-%{name} -- netscape-common
+%nsplugin_install -d %{_libdir}/netscape/plugins libtotem_mozilla.{so,xpt}
+
+%triggerun -n browser-plugin-%{name} -- netscape-common
+%nsplugin_uninstall -d %{_libdir}/netscape/plugins libtotem_mozilla.{so,xpt}
+
+%triggerin -n browser-plugin-%{name} -- seamonkey
+%nsplugin_install -d %{_libdir}/seamonkey/plugins libtotem_mozilla.{so,xpt}
+
+%triggerun -n browser-plugin-%{name} -- seamonkey
+%nsplugin_uninstall -d %{_libdir}/seamonkey/plugins libtotem_mozilla.{so,xpt}
+
+# as rpm removes the old obsoleted package files after the triggers
+# are ran, add another trigger to make the links there.
+%triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-%{name}
+%nsplugin_install -f -d %{_libdir}/mozilla/plugins libtotem_mozilla.{so,xpt}
+
+%triggerpostun -n browser-plugin-%{name} -- mozilla-firefox-plugin-%{name}
+%nsplugin_install -f -d %{_libdir}/netscape/plugins libtotem_mozilla.{so,xpt}
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README TODO
@@ -250,19 +309,11 @@
%defattr(644,root,root,755)
%{_libdir}/libtotem-plparser.a
-%if %{with mozilla_firefox}
-%files -n mozilla-firefox-plugin-totem
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/totem-mozilla-viewer
-%attr(755,root,root) %{_libdir}/mozilla-firefox/plugins/*.so
-%{_libdir}/mozilla-firefox/plugins/*.xpt
-%else
-%files -n mozilla-plugin-totem
+%files -n browser-plugin-%{name}
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/totem-mozilla-viewer
-%attr(755,root,root) %{_libdir}/mozilla/plugins/*.so
-%{_libdir}/mozilla/plugins/*.xpt
-%endif
+%attr(755,root,root) %{_plugindir}/*.so
+%attr(755,root,root) %{_plugindir}/*.xpt
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -270,6 +321,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.72.2.1 2006/05/14 12:31:55 blues
+- browser plugins support. Seems to be working
+
Revision 1.72 2005/12/11 21:58:15 freetz
- 1.2.1
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/totem.spec?r1=1.72&r2=1.72.2.1&f=u
More information about the pld-cvs-commit
mailing list