SPECS (AC-branch): gplflash2.spec - use browser plugins, rel .2

glen glen at pld-linux.org
Thu May 4 23:44:36 CEST 2006


Author: glen                         Date: Thu May  4 21:44:36 2006 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- use browser plugins, rel .2

---- Files affected:
SPECS:
   gplflash2.spec (1.11 -> 1.11.2.1) 

---- Diffs:

================================================================
Index: SPECS/gplflash2.spec
diff -u SPECS/gplflash2.spec:1.11 SPECS/gplflash2.spec:1.11.2.1
--- SPECS/gplflash2.spec:1.11	Mon Nov 14 13:28:03 2005
+++ SPECS/gplflash2.spec	Thu May  4 23:44:31 2006
@@ -1,10 +1,11 @@
 # $Revision$, $Date$
+%define	_rel	2
 %define	_snap	20051113
 Summary:	Flash animations redering library
 Summary(pl):	Biblioteka renderująca animacje Flash
 Name:		gplflash2
 Version:	0.1.0
-Release:	0.%{_snap}.1
+Release:	0.%{_snap}.%{_rel}
 License:	GPL
 Group:		Libraries
 Source0:	%{name}-%{_snap}.tar.bz2
@@ -28,6 +29,8 @@
 Obsoletes:	flash
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		_plugindir	%{_libdir}/browser-plugins
+
 %description
 GPLFLash is based on Olivier Debons original work, which hasn't had a
 release since June 2000. This project hope to bring GPLFlash back as a
@@ -74,21 +77,34 @@
 %description static -l pl
 Statyczna biblioteka gplflash2.
 
-%package -n mozilla-plugin-%{name}
-Summary:	Mozilla plugin for Flash rendering
-Summary(pl):	Wtyczka Mozilli wuświetlająca animacje Flash
+%package -n browser-plugin-%{name}
+Summary:	Browser plugin for Flash rendering
+Summary(pl):	Wtyczka przeglądarki wyświetlająca animacje Flash
 Group:		X11/Libraries
 Requires:	%{name} = %{version}-%{release}
+Requires:	browser-plugins(%{_target_base_arch})
 Obsoletes:	mozilla-plugin-flash
+Obsoletes:	mozilla-plugin-gplflash2
+
+# use macro, otherwise extra LF inserted along with the ifarch
+%ifarch %{ix86} ppc sparc sparc64
+%define	browsers mozilla, mozilla-firefox, opera, konqueror
+%else
+%define	browsers mozilla, mozilla-firefox, konqueror
+%endif
 
-%description -n mozilla-plugin-%{name}
-Mozilla plugin for rendering of Flash animations based on gplflash2
+%description -n browser-plugin-%{name}
+Browser plugin for rendering of Flash animations based on gplflash2
 library.
 
-%description -n mozilla-plugin-%{name} -l pl
-Wtyczka Mozilli wyświetlająca animacje Flash bazująca na bibliotece
+Supported browsers: %{browsers}.
+
+%description -n browser-plugin-%{name} -l pl
+Wtyczka przeglądarki wyświetlająca animacje Flash oparta na bibliotece
 gplflash2.
 
+Obsługiwane przeglądarki: %{browsers}.
+
 %prep
 %setup -q -n %{name}
 %patch0 -p1
@@ -103,7 +119,7 @@
 %{__autoconf}
 %{__automake}
 %configure \
-	--with-plugin-dir=%{_libdir}/mozilla/plugins \
+	--with-plugin-dir=%{_plugindir} \
 	--enable-static
 %{__make}
 
@@ -113,7 +129,7 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-rm -f $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins/*.{la,a}
+rm -f $RPM_BUILD_ROOT%{_plugindir}/*.{la,a}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -121,6 +137,43 @@
 %post	-p /sbin/ldconfig
 %postun	-p /sbin/ldconfig
 
+%triggerin -n browser-plugin-%{name} -- mozilla-firefox
+%nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libnpflash.so
+
+%triggerun -n browser-plugin-%{name} -- mozilla-firefox
+%nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libnpflash.so
+
+%triggerin -n browser-plugin-%{name} -- mozilla
+%nsplugin_install -d %{_libdir}/mozilla/plugins libnpflash.so
+
+%triggerun -n browser-plugin-%{name} -- mozilla
+%nsplugin_uninstall -d %{_libdir}/mozilla/plugins libnpflash.so
+
+%ifarch %{ix86} ppc sparc sparc64
+%triggerin -n browser-plugin-%{name} -- opera
+%nsplugin_install -d %{_libdir}/opera/plugins libnpflash.so
+
+%triggerun -n browser-plugin-%{name} -- opera
+%nsplugin_uninstall -d %{_libdir}/opera/plugins libnpflash.so
+%endif
+
+%triggerin -n browser-plugin-%{name} -- konqueror
+%nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libnpflash.so
+
+%triggerun -n browser-plugin-%{name} -- konqueror
+%nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libnpflash.so
+
+%triggerin -n browser-plugin-%{name} -- seamonkey
+%nsplugin_install -d %{_libdir}/seamonkey/plugins libnpflash.so
+
+%triggerun -n browser-plugin-%{name} -- seamonkey
+%nsplugin_uninstall -d %{_libdir}/seamonkey/plugins libnpflash.so
+
+# as rpm removes the old obsoleted package files after the triggers
+# above are ran, add another trigger to make the links there.
+%triggerpostun -- mozilla-plugin-gplflash2
+%nsplugin_install -f -d %{_libdir}/mozilla/plugins libnpflash.so
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS NEWS README TODO
@@ -137,9 +190,9 @@
 %defattr(644,root,root,755)
 %{_libdir}/lib*.a
 
-%files -n mozilla-plugin-%{name}
+%files -n browser-plugin-%{name}
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/mozilla/plugins/lib*flash.so
+%attr(755,root,root) %{_plugindir}/libnpflash.so
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -147,6 +200,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.11.2.1  2006/05/04 21:44:31  glen
+- use browser plugins, rel .2
+
 Revision 1.11  2005/11/14 12:28:03  qboosh
 - readded includedir fix to link patch, removed hack from spec
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/gplflash2.spec?r1=1.11&r2=1.11.2.1&f=u



More information about the pld-cvs-commit mailing list