Author: blues                        Date: Sun May 14 11:29:37 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- started with browser plugins support, NFY

---- Files affected:
SPECS:
   totem.spec (1.77 -> 1.78) 

---- Diffs:

================================================================
Index: SPECS/totem.spec
diff -u SPECS/totem.spec:1.77 SPECS/totem.spec:1.78
--- SPECS/totem.spec:1.77       Sun Apr  2 16:10:33 2006
+++ SPECS/totem.spec    Sun May 14 13:29:31 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    mozilla_firefox # build with mozilla-firefox
@@ -17,7 +17,7 @@
 Summary(pl):   Odtwarzacz filmów dla GNOME 2 oparty na silniku gstreamer
 Name:          totem
 Version:       1.4.0
-Release:       1
+Release:       1.1
 License:       GPL
 Group:         Applications/Multimedia
 Source0:       
http://ftp.gnome.org/pub/gnome/sources/totem/1.4/%{name}-%{version}.tar.bz2
@@ -74,6 +74,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.
@@ -136,31 +141,24 @@
 %description static -l pl
 Statyczne biblioteki Totema.
 
-%package -n mozilla-firefox-plugin-totem
-Summary:       Totem's plugin for Mozilla Firefox
-Summary(pl):   Wtyczka Totema dla Mozilli Firefox
-Group:         Libraries
-%requires_eq   mozilla-firefox
+%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 mozilla-firefox-plugin-totem
-Totem's plugin for Mozilla Firefox.
-
-%description -n mozilla-firefox-plugin-totem -l pl
-Wtyczka Totema dla Mozilli Firefox.
-
-%package -n mozilla-plugin-totem
-Summary:       Totem's plugin for Mozilla
-Summary(pl):   Wtyczka Totema dla Mozilli
-Group:         Libraries
-Requires:      mozilla-embedded = %(rpm -q --qf '%{EPOCH}:%{VERSION}' 
--whatprovides mozilla-embedded)
-Requires:      %{name} = %{version}-%{release}
+%description -n browser-plugin-%{name}
+Totem's plugin for browsers.
 
-%description -n mozilla-plugin-totem
-Totem's plugin for Mozilla.
+Supported browsers: %{browsers}.
 
-%description -n mozilla-plugin-totem -l pl
-Wtyczka Totema dla Mozilli.
+%description -n browser-plugin-%{name} -l pl
+Wtyczka Totem do przeglądarek WWW.
 
 %prep
 %setup -q
@@ -219,6 +217,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
@@ -248,19 +278,19 @@
 %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
-%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
+#%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
+#%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
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -268,6 +298,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.78  2006/05/14 11:29:31  blues
+- started with browser plugins support, NFY
+
 Revision 1.77  2006/04/02 14:10:33  freetz
 - disable checking for runtime deps at builtime (patch), dropped
   gnome-desktop dependency (no required anymore)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/totem.spec?r1=1.77&r2=1.78&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to