? .build-1.1.92-1.fc9.log ? mugshot-1.1.92 ? mugshot-1.1.92-1.fc9.src.rpm ? mugshotspec.diff ? x86_64 Index: mugshot.spec =================================================================== RCS file: /cvs/extras/rpms/mugshot/devel/mugshot.spec,v retrieving revision 1.34 diff -d -u -p -r1.34 mugshot.spec --- mugshot.spec 20 Mar 2008 21:00:00 -0000 1.34 +++ mugshot.spec 26 Mar 2008 18:56:48 -0000 @@ -1,6 +1,9 @@ +%define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} +%define mugshot_ext_id firefox@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 @@ unset GCONF_DISABLE_MAKEFILE_SCHEMA_INST # 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 @@ desktop-file-install \ %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 @@ if [ $1 -gt 1 ] ; then 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 @@ touch --no-create %{_datadir}/icons/hico 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 @@ echo %{version} > %{_datadir}/mugshot/ve %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 @@ touch --no-create %{_datadir}/icons/hico 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 @@ fi %{_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 - 1.1.92-2 +- Ship the firefox extension in the system location + * Thu Mar 20 2008 Colin Walters - 1.1.92-1 - new upstream