SPECS: djvulibre.spec - use triggers to handle browser plugins, rel 2
glen
glen at pld-linux.org
Tue Sep 6 18:46:59 CEST 2005
Author: glen Date: Tue Sep 6 16:46:59 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use triggers to handle browser plugins, rel 2
---- Files affected:
SPECS:
djvulibre.spec (1.31 -> 1.32)
---- Diffs:
================================================================
Index: SPECS/djvulibre.spec
diff -u SPECS/djvulibre.spec:1.31 SPECS/djvulibre.spec:1.32
--- SPECS/djvulibre.spec:1.31 Tue Jul 19 19:18:57 2005
+++ SPECS/djvulibre.spec Tue Sep 6 18:46:53 2005
@@ -1,4 +1,6 @@
# $Revision$, $Date$
+# TODO
+# - test and add other browsers
#
# Conditional build:
%bcond_without qt # disable qt wrapper
@@ -7,7 +9,7 @@
Summary(pl): DjVu - przeglądarki, dekodery oraz narzędzia
Name: djvulibre
Version: 3.5.15
-Release: 1
+Release: 2
License: GPL
Group: Applications/Graphics
Source0: http://dl.sourceforge.net/djvu/%{name}-%{version}.tar.gz
@@ -24,8 +26,10 @@
Obsoletes: djvu
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define mozdir /usr/%{_lib}/mozilla/plugins
-%define nsdir /usr/%{_lib}/netscape/plugins
+%define _plugindir %{_libdir}/browser-plugins
+
+# use macro, otherwise extra LF inserted along with the ifarch
+%define browsers mozilla, netscape
%description
DjVu is a web-centric format and software platform for distributing
@@ -105,32 +109,23 @@
%description djview -l pl
Oparta o Qt przeglądarka DjVu.
-%package -n mozilla-plugin-%{name}
-Summary: DjVu plugin for Mozilla
-Summary(pl): Wtyczka DjVu do Mozilli
+%package -n browser-plugin-%{name}
+Summary: DjVu browser plugin
+#Summary(pl): Wtyczka DjVu do Mozilli
Group: X11/Libraries
Requires: %{name}-djview = %{version}-%{release}
-Requires: mozilla-embedded
-
-%description -n mozilla-plugin-%{name}
-DjVu plugin for Mozilla and Mozilla-based browsers.
-
-%description -n mozilla-plugin-%{name} -l pl
-Wtyczka DjVu do Mozilli i przeglądarek na niej bazujących.
-
-%package -n netscape-plugin-%{name}
-Summary: DjVu plugin for Netscape
-Summary(pl): Wtyczka DjVu do Netscape
-Group: X11/Libraries
-Requires: %{name}-djview = %{version}-%{release}
-Requires: netscape-common
+Obsoletes: mozilla-plugin-djvulibre
+Obsoletes: netscape-plugin-djvulibre
Obsoletes: djview-netscape
+# for migrate purposes (greedy poldek upgrade)
+Provides: mozilla-plugin-djvulibre
+Provides: netscape-plugin-djvulibre
+#TODORequires: netscape-common
-%description -n netscape-plugin-%{name}
-DjVu plugin for Netscape.
+%description -n browser-plugin-%{name}
+DjVu plugin for Mozilla and Mozilla-based browsers.
-%description -n netscape-plugin-%{name} -l pl
-Wtyczka DjVu do Netscape.
+Supported browsers: %{browsers}.
%prep
%setup -q
@@ -151,12 +146,12 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{mozdir},%{nsdir}}
+install -d $RPM_BUILD_ROOT%{_plugindir}
# pass dtop_* to allow build w/o gnome/kde/etc. installed
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
- plugindir=%{mozdir} \
+ plugindir=%{_plugindir} \
dtop_applications=%{_desktopdir} \
dtop_icons=%{_iconsdir} \
dtop_mimelnk=%{_datadir}/mimelnk \
@@ -165,16 +160,24 @@
dtop_mime_info= \
dtop_application_registry=
-%if %{with qt}
-cp -f $RPM_BUILD_ROOT%{mozdir}/nsdejavu.so $RPM_BUILD_ROOT%{nsdir}
-%endif
-
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%triggerin -n browser-plugin-%{name} -- mozilla
+%nsplugin_install -d %{_libdir}/mozilla/plugins nsdejavu.so
+
+%triggerun -n browser-plugin-%{name} -- mozilla
+%nsplugin_uninstall -d %{_libdir}/mozilla/plugins nsdejavu.so
+
+%triggerin -n browser-plugin-%{name} -- netscape-common
+%nsplugin_install -d %{_libdir}/netscape/plugins nsdejavu.so
+
+%triggerun -n browser-plugin-%{name} -- netscape-common
+%nsplugin_uninstall -d %{_libdir}/netscape/plugins nsdejavu.so
+
%files
%defattr(644,root,root,755)
%doc COPYRIGHT NEWS README TODO doc/*
@@ -215,15 +218,13 @@
%{_iconsdir}/hicolor/*/mimetypes/djvu.png
%{_pixmapsdir}/djvu.png
-%files -n mozilla-plugin-%{name}
+%files -n browser-plugin-%{name}
%defattr(644,root,root,755)
-%attr(755,root,root) %{mozdir}/*.so
+%attr(755,root,root) %{_plugindir}/*.so
%{_mandir}/man1/nsdejavu.1*
%lang(ja) %{_mandir}/ja/man1/nsdejavu.1*
-%files -n netscape-plugin-%{name}
-%defattr(644,root,root,755)
-%attr(755,root,root) %{nsdir}/*.so
+#%attr(755,root,root) %{nsdir}/*.so
%endif
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -232,6 +233,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.32 2005/09/06 16:46:53 glen
+- use triggers to handle browser plugins, rel 2
+
Revision 1.31 2005/07/19 17:18:57 freetz
- 3.5.15, with qt not tested
@@ -325,9 +329,9 @@
- updated to 3.5.6, release 1
Revision 1.3 2002/05/21 23:12:56 kloczek
-perl -pi -e "s/^automake -a -c -f --foreing/\%\{__automake\}/; \
+- perl -pi -e "s/^automake -a -c -f --foreing/\%\{__automake\}/; \
s/^automake -a -c -f/\%\{__automake\}/; \
- s/^autoconf/\%\{__autoconf\}/"
+ s/^autoconf/\%\{__autoconf\}/"
Revision 1.2 2002/05/17 23:24:56 qboosh
- partially fixed, added opt patch
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/djvulibre.spec?r1=1.31&r2=1.32&f=u
More information about the pld-cvs-commit
mailing list