rpms/mugshot/devel mugshot.spec,1.34,1.35
Christopher Aillon (caillon)
fedora-extras-commits at redhat.com
Wed Mar 26 18:59:56 UTC 2008
Author: caillon
Update of /cvs/extras/rpms/mugshot/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32566
Modified Files:
mugshot.spec
Log Message:
* Wed Mar 26 2008 Christopher Aillon <caillon at redhat.com> - 1.1.92-2
- Ship the firefox extension in the system location
Index: mugshot.spec
===================================================================
RCS file: /cvs/extras/rpms/mugshot/devel/mugshot.spec,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- mugshot.spec 20 Mar 2008 21:00:00 -0000 1.34
+++ mugshot.spec 26 Mar 2008 18:59:04 -0000 1.35
@@ -1,6 +1,9 @@
+%define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
+%define mugshot_ext_id firefox at mugshot.org
+
Name: mugshot
Version: 1.1.92
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Companion software for mugshot.org
Group: Applications/Internet
@@ -72,6 +75,10 @@
# Don't package a .la file for the component .so
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
+mkdir -p $RPM_BUILD_ROOT/%{_libdir}/mozilla/extensions/%{firefox_app_id}
+ln -s %{_libdir}/mugshot/firefox \
+ $RPM_BUILD_ROOT/%{_libdir}/mozilla/extensions/%{firefox_app_id}/%{mugshot_ext_id}
+
# Run desktop-file-install to so we get validation (and to make
# things fedora-packaging-guidelines compliant)
desktop-file-install \
@@ -86,34 +93,6 @@
%clean
rm -rf $RPM_BUILD_ROOT
-# Annoyingly, firefox installs itself into versioned directories,
-# so we have to make a new symlink into the right directory when
-# firefox is installed or upgraded. But we would rather not leave
-# our old symlinks behind, since that will cause the firefox
-# directories not to be removed. (flash-player leaves its old
-# symlinks behind, but that's no excuse for us to do the same...)
-#
-# Because I don't know any way of finding out what the new version
-# is on installation or old version on uninstallation, we have
-# to do things in a somewhat non-intuitive way
-#
-# The order on upgrade of firefox is:
-#
-# 1. new package installed
-# 2. triggerin for new package - we add all symlinks
-# 3. triggerun for old package - we remove all symlinks
-# 4. old package uninstalled
-# 5. triggerpostun for old package - we add all symlinks
-#
-# Triggers are also run on self-upgrade, in that case we do:
-#
-# 1. new package installed
-# 2. triggerin for new package - we add all symlinks
-# 3. triggerun for old package - we remove all symlinks
-# 4. old package uninstalled
-# 5. postun for old package - we add all symlinks
-# 6. triggerpostun for old package - NOT RUN (contrary to RPM docs)
-
%pre
# On upgrade, remove old schemas before installing the new ones
# Note that the SCHEMAS value should be the name of any schema
@@ -132,6 +111,10 @@
fi
%post
+# We now install our Firefox extension into a system wide location
+# This is here so we remove old copies from firefox specific version locations
+%{_datadir}/mugshot/firefox-update.sh remove
+
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
SCHEMAS="mugshot-uri-handler.schemas"
@@ -143,7 +126,6 @@
if [ -x /usr/bin/gtk-update-icon-cache ]; then
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
-%{_datadir}/mugshot/firefox-update.sh install
killall -q -HUP gconfd-2 || :
@@ -152,8 +134,6 @@
%preun
# On removal (but not upgrade), remove our schemas
if [ $1 = 0 ] ; then
- %{_datadir}/mugshot/firefox-update.sh remove
-
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
SCHEMAS="mugshot-uri-handler.schemas"
@@ -169,25 +149,6 @@
if [ -x /usr/bin/gtk-update-icon-cache ]; then
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
-# This is needed not to reverse the effect of our preun, which
-# is guarded against upgrade, but because of our triggerun,
-# which is run on self-upgrade, though triggerpostun isn't
-if [ "$1" != 0 ] ; then
- test -x %{_datadir}/mugshot/firefox-update.sh && %{_datadir}/mugshot/firefox-update.sh install
-fi
-
-%triggerin -- firefox
-%{_datadir}/mugshot/firefox-update.sh install
-
-%triggerun -- firefox
-%{_datadir}/mugshot/firefox-update.sh remove
-
-%triggerpostun -- firefox
-# Guard against being run post-self-uninstall, even though that
-# doesn't happen currently (see comment above)
-if [ "$1" != 0 ] ; then
- test -x %{_datadir}/mugshot/firefox-update.sh && %{_datadir}/mugshot/firefox-update.sh install
-fi
%files
%defattr(-,root,root,-)
@@ -205,11 +166,15 @@
%{_datadir}/mugshot
%ghost %{_datadir}/mugshot/version
%{_libdir}/mugshot
+%{_libdir}/mozilla/extensions/%{firefox_app_id}/%{mugshot_ext_id}
%{_datadir}/applications/mugshot.desktop
%{_datadir}/gnome/autostart/mugshot-autostart.desktop
%{_sysconfdir}/gconf/schemas/*.schemas
%changelog
+* Wed Mar 26 2008 Christopher Aillon <caillon at redhat.com> - 1.1.92-2
+- Ship the firefox extension in the system location
+
* Thu Mar 20 2008 Colin Walters <walters at redhat.com> - 1.1.92-1
- new upstream
More information about the fedora-extras-commits
mailing list