[mozilla-firetray] Spec cleanup + workaround for rhbz #646523
Hicham HAOUARI
hicham at fedoraproject.org
Thu Oct 28 10:19:42 UTC 2010
commit d9d173f5f9125e4f9284923ab7d4949b4150d1bf
Author: Hicham HAOUARI <hicham.haouari at gmail.com>
Date: Thu Oct 28 10:19:15 2010 +0000
Spec cleanup + workaround for rhbz #646523
mozilla-firetray.spec | 118 ++++++++++++------------------------------------
1 files changed, 30 insertions(+), 88 deletions(-)
---
diff --git a/mozilla-firetray.spec b/mozilla-firetray.spec
index c166b84..f1b6ca6 100644
--- a/mozilla-firetray.spec
+++ b/mozilla-firetray.spec
@@ -1,4 +1,4 @@
-%define rel 4
+%define rel 5
%define svn 0
@@ -103,7 +103,7 @@ to use the Firetray extension.
%package firefox
Summary: System tray extension for firefox
Requires: firefox
-Requires: %{name}-core = %{version}
+Requires: %{name}-core = %{version}-%{release}
%description firefox
Firetray is a system tray addon for firefox, current features are :
@@ -119,7 +119,7 @@ Firetray is a system tray addon for firefox, current features are :
%package thunderbird
Summary: System tray extension for thunderbird
Requires: thunderbird
-Requires: %{name}-core = %{version}
+Requires: %{name}-core = %{version}-%{release}
%description thunderbird
Firetray is a system tray addon for thunderbird, current features are :
@@ -133,11 +133,10 @@ 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
-Requires: %{name}-core = %{version}
+Requires: %{name}-core = %{version}-%{release}
%description seamonkey
Firetray is a system tray addon for seamonkey, current features are :
@@ -150,13 +149,11 @@ 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
Requires: sunbird
-Requires: %{name}-core = %{version}
+Requires: %{name}-core = %{version}-%{release}
%description sunbird
Firetray is a system tray addon for sunbird, current features are :
@@ -172,7 +169,7 @@ Firetray is a system tray addon for sunbird, current features are :
%package chatzilla
Summary: System tray extension for chatzilla
Requires: chatzilla
-Requires: %{name}-core = %{version}
+Requires: %{name}-core = %{version}-%{release}
%description chatzilla
Firetray is a system tray addon for chatzilla, current features are :
@@ -206,7 +203,7 @@ find . \( -name '*.xpi' -o -name '*.jar' -o -name '*.xpt' -o -name '*.so' \) -ex
mv components/pixmaps/newmail.xpm .
rm -rf components/pixmaps
-%if %{fedora} >= 14
+%if %{fedora} >= 15
sed -i 's|nsIGenericFactory.h|mozilla/ModuleUtils.h|g' components/nsTrayModue.cpp
%endif
@@ -219,7 +216,7 @@ 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}/%{ft_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}
@@ -234,81 +231,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
-#more symlink vodoo for sunbird since it crashes after the first start when using a whole symlinked extension directory
-pushd $RPM_BUILD_ROOT%{mz_ext_dir}%{sb_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
-
-# 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}
@@ -317,6 +249,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
@@ -333,12 +273,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,-)
@@ -352,6 +290,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Oct 28 2010 Hicham HAOUARI <hicham.haouari at gmail.com> - 0.2.8-5
+- Spec cleanup
+- Add workaround for rhbz #646523
+
* Wed Sep 29 2010 jkeating - 0.2.8-4
- Rebuilt for gcc bug 634757
More information about the scm-commits
mailing list