SPECS (AC-branch): librsvg.spec - release 4 - browser plugins supp...

blues blues at pld-linux.org
Sun May 14 15:50:09 CEST 2006


Author: blues                        Date: Sun May 14 13:50:09 2006 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- release 4 - browser plugins support. STBR to AC

---- Files affected:
SPECS:
   librsvg.spec (1.98.2.1 -> 1.98.2.2) 

---- Diffs:

================================================================
Index: SPECS/librsvg.spec
diff -u SPECS/librsvg.spec:1.98.2.1 SPECS/librsvg.spec:1.98.2.2
--- SPECS/librsvg.spec:1.98.2.1	Thu May 11 17:41:25 2006
+++ SPECS/librsvg.spec	Sun May 14 15:50:04 2006
@@ -1,6 +1,6 @@
 # $Revision$, $Date$
 # TODO
-# - mozilla_firefox bcond/subpackage
+# - check what browsers can be supported by browser plugin
 #
 # Conditional build
 %bcond_without	libgsf		# build without libgsf (used for run-time decompression)
@@ -16,7 +16,7 @@
 Summary(uk):	SVG ÂŚÂĚŚĎÔĹËÁ
 Name:		librsvg
 Version:	2.12.7
-Release:	3
+Release:	4
 Epoch:		1
 License:	LGPL v2+
 Vendor:		GNOME
@@ -36,6 +36,7 @@
 BuildRequires:	libtool
 BuildRequires:	libxml2-devel >= 1:2.6.22
 %{?with_mozilla:BuildRequires:	mozilla-devel}
+%{?with_mozilla:BuildRequires:	rpmbuild(macros) >= 1.236}
 BuildRequires:	popt-devel >= 1.5
 BuildRequires:	pkgconfig
 BuildRequires:	xcursor-devel
@@ -52,7 +53,10 @@
 Obsoletes:	librsvg0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		mozilladir	%{_libdir}/mozilla
+%define		_plugindir	%{_libdir}/browser-plugins
+
+# list of supported browsers, in free form text
+%define		browsers	mozilla, mozilla-firefox, netscape, seamonkey
 
 %description
 An library to render SVG (scalable vector graphics), databased upon libart.
@@ -123,21 +127,27 @@
 Bibliotecas estáticas para o desenvolvimento de aplicaçőes com
 librsvg.
 
-%package -n mozilla-plugin-rsvg
-Summary:	Mozilla SVG plugin using librsvg
-Summary(pl):	Wtyczka Mozilli do SVG wykorzystująca librsvg
+%package -n browser-plugin-%{name}
+Summary:	SVG browse plugin using librsvg
+Summary(pl):	Wtyczka SVG do przeglądarski WWW wykorzystująca librsvg
 Group:		X11/Applications/Multimedia
+Requires:	browser-plugins(%{_target_base_arch})
 Requires:	%{name} = %{epoch}:%{version}-%{release}
-Requires:	mozilla
+Provides:	mozilla-plugin-rsvg
+Obsoletes:	mozilla-plugin-rsvg
 
-%description -n mozilla-plugin-rsvg
+%description -n browser-plugin-%{name}
 This plugin allows Mozilla-family browsers to view Scalable Vector
 Graphics content using librsvg.
 
-%description -n mozilla-plugin-rsvg -l pl
+Supported browsers: %{browsers}.
+
+%description -n browser-plugin-%{name} -l pl
 Ta wtyczka pozwala na oglądanie grafiki w formacie SVG (Scalable
 Vector Graphics) w przeglądarkach z rodziny Mozilli.
 
+Supported browsers: %{browsers}.
+
 %prep
 %setup -q
 
@@ -163,10 +173,11 @@
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT \
+	plugindir=%{_plugindir} \
 	pkgconfigdir=%{_pkgconfigdir}
 
 rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/2.*/{engines,loaders}/*.{la,a}
-rm -f $RPM_BUILD_ROOT%{mozilladir}/plugins/*.{la,a}
+rm -f $RPM_BUILD_ROOT%{_plugindir}/*.{la,a}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -181,6 +192,35 @@
 umask 022
 gdk-pixbuf-query-loaders > %{_sysconfdir}/gtk-2.0/gdk-pixbuf.loaders
 
+%triggerin -n browser-plugin-%{name} -- mozilla
+%nsplugin_install -d %{_libdir}/mozilla/plugins libmozsvgdec.so
+
+%triggerun -n browser-plugin-%{name} -- mozilla
+%nsplugin_uninstall -d %{_libdir}/mozilla/plugins libmozsvgdec.so
+
+%triggerin -n browser-plugin-%{name} -- mozilla-firefox
+%nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libmozsvgdec.so
+
+%triggerun -n browser-plugin-%{name} -- mozilla-forefox
+%nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libmozsvgdec.so
+
+%triggerin -n browser-plugin-%{name} -- netscape-common
+%nsplugin_install -d %{_libdir}/netscape/plugins libmozsvgdec.so
+
+%triggerun -n browser-plugin-%{name} -- netscape-common
+%nsplugin_uninstall -d %{_libdir}/netscape/plugins libmozsvgdec.so
+
+%triggerin -n browser-plugin-%{name} -- seamonkey
+%nsplugin_install -d %{_libdir}/seamonkey/plugins libmozsvgdec.so
+
+%triggerun -n browser-plugin-%{name} -- seamonkey
+%nsplugin_uninstall -d %{_libdir}/seamonkey/plugins libmozsvgdec.so
+
+# 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-rsvg
+%nsplugin_install -f -d %{_libdir}/mozilla/plugins libmozsvgdec.so
+
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog AUTHORS NEWS
@@ -204,9 +244,9 @@
 %{_libdir}/lib*.a
 
 %if %{with mozilla}
-%files -n mozilla-plugin-rsvg
+%files -n browser-plugin-%{name}
 %defattr(644,root,root,755)
-%attr(755,root,root) %{mozilladir}/plugins/*.so
+%attr(755,root,root) %{_plugindir}/*.so
 %endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -215,6 +255,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.98.2.2  2006/05/14 13:50:04  blues
+- release 4 - browser plugins support. STBR to AC
+
 Revision 1.98.2.1  2006/05/11 15:41:25  blues
 - better description
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/librsvg.spec?r1=1.98.2.1&r2=1.98.2.2&f=u



More information about the pld-cvs-commit mailing list