[mozilla-firetray/f13/master] Spec cleanup + Add workaround for rhbz #646523

Hicham HAOUARI hicham at fedoraproject.org
Thu Oct 28 10:57:11 UTC 2010


commit 8dc18cd27adbde3dbef9cf0e03cfd528ab4125c5
Author: Hicham HAOUARI <hicham.haouari at gmail.com>
Date:   Thu Oct 28 10:57:00 2010 +0000

    Spec cleanup + Add workaround for rhbz #646523

 mozilla-firetray.spec |   97 +++++++++++++------------------------------------
 1 files changed, 26 insertions(+), 71 deletions(-)
---
diff --git a/mozilla-firetray.spec b/mozilla-firetray.spec
index e7bcf60..58a1cfa 100644
--- a/mozilla-firetray.spec
+++ b/mozilla-firetray.spec
@@ -1,4 +1,4 @@
-%define rel 2
+%define rel 3
 
 %define svn 0
 
@@ -129,7 +129,6 @@ Firetray is a system tray addon for thunderbird, current features are :
 - Hotkey for Hide/Unhide
 - Handle mouse scrolls on tray icon
 
-%if %{fedora} >= 12
 %package seamonkey
 Summary:        System tray extension for seamonkey
 Requires:       seamonkey 
@@ -146,8 +145,6 @@ Firetray is a system tray addon for seamonkey, current features are :
 - Custom tray icon
 - Hotkey for Hide/Unhide
 - Handle mouse scrolls on tray icon
-%endif
-
 
 %package sunbird
 Summary:        System tray extension for sunbird
@@ -211,11 +208,10 @@ scons %{upname}.xpi
 %install
 rm -rf $RPM_BUILD_ROOT
 
-mkdir -p $RPM_BUILD_ROOT%{mz_ext_dir}{%{ff_guid}/%{ft_guid},%{tb_guid}/%{ft_guid},%{sb_guid},%{cz_guid}/%{ft_guid},%{ib_guid}/%{ft_guid}}
+mkdir -p $RPM_BUILD_ROOT%{mz_ext_dir}{%{ff_guid},%{tb_guid},%{sm_guid},%{sb_guid},%{cz_guid}}/%{ft_guid}/components
 mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}
 
 unzip %{upname}.xpi -d $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}
-chmod +x $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/components/libnptray.so
 
 # rename changes file to ChangeLog
 mv changes ChangeLog
@@ -227,69 +223,16 @@ ln -s %{_datadir}/doc/%{name}-core-%{version}/ChangeLog symdoc/ChangeLog
 
 #now symlink the products extension's directories to the core extension directory
 
-# firefox
-pushd $RPM_BUILD_ROOT%{mz_ext_dir}%{ff_guid}/%{ft_guid}
-    #more symlink vodoo for firefox since it crashes after the first start when using a whole symlinked extension directory
-    ln -s %{_libdir}/%{name}-%{version}/install.rdf install.rdf
-    ln -s %{_libdir}/%{name}-%{version}/chrome.manifest chrome.manifest
-    ln -s %{_libdir}//%{name}-%{version}/chrome chrome
-    ln -s %{_libdir}//%{name}-%{version}/defaults defaults
-
-    mkdir components
-    cd components
-        ln -s %{_libdir}/%{name}-%{version}/components/nsMinimize.js nsMinimize.js
-        ln -s %{_libdir}/%{name}-%{version}/components/nsITray.xpt nsITray.xpt
-        ln -s %{_libdir}/%{name}-%{version}/components/nsIMinimize.xpt nsIMinimize.xpt
-        ln -s %{_libdir}/%{name}-%{version}/components/libnptray.so libnptray.so
-    cd ..
-popd
-
-# thunderbird
-#more symlink vodoo for thunderbird since it crashes after the first start when using a whole symlinked extension directory
-pushd $RPM_BUILD_ROOT%{mz_ext_dir}%{tb_guid}/%{ft_guid}
-    ln -s %{_libdir}/%{name}-%{version}/install.rdf install.rdf
-    ln -s %{_libdir}/%{name}-%{version}/chrome.manifest chrome.manifest
-    ln -s %{_libdir}//%{name}-%{version}/chrome chrome
-    ln -s %{_libdir}//%{name}-%{version}/defaults defaults
-
-    mkdir components
-    cd components
-        ln -s %{_libdir}/%{name}-%{version}/components/nsMinimize.js nsMinimize.js
-        ln -s %{_libdir}/%{name}-%{version}/components/nsITray.xpt nsITray.xpt
-        ln -s %{_libdir}/%{name}-%{version}/components/nsIMinimize.xpt nsIMinimize.xpt
-        ln -s %{_libdir}/%{name}-%{version}/components/libnptray.so libnptray.so
-    cd ..
-popd
-
-%if %{fedora} >= 12
-#seamonkey
-mkdir -p $RPM_BUILD_ROOT%{mz_ext_dir}%{sm_guid}
-pushd $RPM_BUILD_ROOT%{mz_ext_dir}%{sm_guid}
-    ln -s %{_libdir}/%{name}-%{version} %{ft_guid}
-popd
-%endif
-
-#sunbird
-pushd $RPM_BUILD_ROOT%{mz_ext_dir}%{sb_guid}
-    ln -s %{_libdir}/%{name}-%{version} %{ft_guid}
-popd
-
-# chatzilla
-pushd $RPM_BUILD_ROOT%{mz_ext_dir}%{cz_guid}/%{ft_guid}
-    #more symlink vodoo for chatzilla also since it crashes after the first start when using a whole symlinked extension directory
-    ln -s %{_libdir}/%{name}-%{version}/install.rdf install.rdf
-    ln -s %{_libdir}/%{name}-%{version}/chrome.manifest chrome.manifest
-    ln -s %{_libdir}//%{name}-%{version}/chrome chrome
-    ln -s %{_libdir}//%{name}-%{version}/defaults defaults
-
-    mkdir components
-    cd components
-        ln -s %{_libdir}/%{name}-%{version}/components/nsMinimize.js nsMinimize.js
-        ln -s %{_libdir}/%{name}-%{version}/components/nsITray.xpt nsITray.xpt
-        ln -s %{_libdir}/%{name}-%{version}/components/nsIMinimize.xpt nsIMinimize.xpt
-        ln -s %{_libdir}/%{name}-%{version}/components/libnptray.so libnptray.so
-    cd ..
-popd
+for i in {%{ff_guid},%{tb_guid},%{sm_guid},%{sb_guid},%{cz_guid}};do
+  pushd $RPM_BUILD_ROOT%{mz_ext_dir}$i/%{ft_guid}
+    for j in {install.rdf,chrome.manifest,chrome,defaults};do
+      ln -s %{_libdir}/%{name}-%{version}/$j $j
+    done
+    for j in components/{nsMinimize.js,nsITray.xpt,nsIMinimize.xpt,libnptray.so};do
+      ln -s %{_libdir}/%{name}-%{version}/$j $j
+    done
+  popd
+done
 
 # Install the newmail icon
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
@@ -298,6 +241,14 @@ install -Dpm 644 newmail.xpm $RPM_BUILD_ROOT%{_datadir}/%{name}
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+# workaround for rhbz #646523
+%pretrans sunbird -p <lua>
+st=posix.stat("%{mz_ext_dir}%{sb_guid}/%{ft_guid}")
+if st and st.type == "link" then
+  os.remove("%{mz_ext_dir}%{sb_guid}/%{ft_guid}")
+  posix.mkdir("%{mz_ext_dir}%{sb_guid}/%{ft_guid}")
+end
+
 %files core
 %defattr(-,root,root,-)
 %doc symdoc/COPYING ChangeLog
@@ -314,12 +265,10 @@ rm -rf $RPM_BUILD_ROOT
 %doc symdoc/COPYING symdoc/ChangeLog
 %{mz_ext_dir}%{tb_guid}/%{ft_guid}
 
-%if %{fedora} >= 12
 %files seamonkey
 %defattr(-,root,root,-)
 %doc symdoc/COPYING symdoc/ChangeLog
 %{mz_ext_dir}%{sm_guid}/%{ft_guid}
-%endif
 
 %files sunbird
 %defattr(-,root,root,-)
@@ -333,6 +282,12 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sun Oct 24 2010 Hicham HAOUARI <hicham.haouari at gmail.com> - 0.2.8-3
+- Symlink the extension's directory for sunbird the same way of the
+  other applications using gecko >= 1.9.2, fixes rhbz #646185
+- Add workaround for rhbz #646523
+- Spec cleanup
+
 * Fri Aug 05 2010 Hicham HAOUARI <hicham.haouari at gmail.com> - 0.2.8-2
 - Backport patch from upstream svn to use the system's CXXFLAGS, fixes
   rhbz #621683


More information about the scm-commits mailing list