[mozilla-firetray/f16] Update to 0.3.1

Hicham HAOUARI hicham at fedoraproject.org
Sun Sep 11 01:30:56 UTC 2011


commit 1bd3e020364809182a0a9f57149d125ef3848bf6
Author: Hicham HAOUARI <hicham.haouari at gmail.com>
Date:   Sun Sep 11 01:30:25 2011 +0000

    Update to 0.3.1

 .gitignore                                         |    1 +
 mozilla-firetray-0.2.8-add-chatzilla-support.patch |  145 --------------
 mozilla-firetray-0.2.8-fix-nspr-include.patch      |   19 --
 mozilla-firetray-0.2.8-fix-unread-mail-count.patch |   36 ----
 ...lla-firetray-0.2.8-fix-xpcom-registration.patch |  207 --------------------
 mozilla-firetray-0.2.8-use-our-icons.patch         |  102 ----------
 mozilla-firetray-0.2.8-use-system-cxxflags.patch   |   93 ---------
 mozilla-firetray-0.3.1-add-chatzilla-support.patch |   12 ++
 ...a-firetray-0.3.1-bump-max-version-numbers.patch |   16 ++
 ...-check-for-install-rdf-before-removing-it.patch |   14 ++
 ...lla-firetray-0.3.1-use-arch-dep-mozconfig.patch |   20 ++
 mozilla-firetray-0.3.1-use-first-window-icon.patch |   19 ++
 mozilla-firetray.spec                              |  128 ++++++-------
 sources                                            |    2 +-
 14 files changed, 141 insertions(+), 673 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index de2a728..0a55bb1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 firetray-0.2.8-src.zip
 /firetray-0.2.8-src.zip
+/firetray-0.3.1-src.zip
diff --git a/mozilla-firetray-0.3.1-add-chatzilla-support.patch b/mozilla-firetray-0.3.1-add-chatzilla-support.patch
new file mode 100644
index 0000000..ee09894
--- /dev/null
+++ b/mozilla-firetray-0.3.1-add-chatzilla-support.patch
@@ -0,0 +1,12 @@
+diff -Naur firetray-0.2.6/chrome/SConscript firetray/chrome/SConscript
+--- firetray-0.2.6/chrome/SConscript	2010-06-26 20:15:36.000000000 +0100
++++ firetray/chrome/SConscript	2010-06-26 20:45:02.000000000 +0100
+@@ -3,7 +3,7 @@ import os
+ Import('zipbld')
+ 
+ contents = []
+-content = 'core.js browserOverlay.xul mailOverlay.xul songOverlay.xul navigatorOverlay.xul options.xul options.js icon.png'
++content = 'core.js browserOverlay.xul mailOverlay.xul songOverlay.xul navigatorOverlay.xul ircOverlay.xul options.xul options.js icon.png'
+ for c in content.split(' '):
+     contents.append('content' + os.sep + c)
+ 
diff --git a/mozilla-firetray-0.3.1-bump-max-version-numbers.patch b/mozilla-firetray-0.3.1-bump-max-version-numbers.patch
new file mode 100644
index 0000000..24d04c8
--- /dev/null
+++ b/mozilla-firetray-0.3.1-bump-max-version-numbers.patch
@@ -0,0 +1,16 @@
+--- mozilla-firetray-0.3.1/generate_install_rdf.sh.old	2011-09-10 10:34:23.000000000 +0000
++++ mozilla-firetray-0.3.1/generate_install_rdf.sh	2011-09-10 10:34:53.000000000 +0000
+@@ -15,10 +15,10 @@ APP_SEPARATOR=';'
+ #SUPPORTED APPS:
+ # "name;id;min.ver;max.ver"
+ SUPPORTED_APPS=( \
+-"Mozilla Firefox;{ec8030f7-c20a-464f-9b0e-13a3a9e97384};3.0;5.*" \
+-"Mozilla Thunderbird;{3550f703-e582-4d05-9a08-453d09bdfdc6};3.0;5.*" \
++"Mozilla Firefox;{ec8030f7-c20a-464f-9b0e-13a3a9e97384};3.0;6.*" \
++"Mozilla Thunderbird;{3550f703-e582-4d05-9a08-453d09bdfdc6};3.0;6.*" \
+ "Songbird;songbird at songbirdnest.com;0.8;1.8.0" \
+-"SeaMonkey;{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a};2.0a1;2.0.*   " \
++"SeaMonkey;{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a};2.0a1;2.*   " \
+ "Sunbird;{718e30fb-e89b-41dd-9da7-e25a45638b28};1.0b1;1.0pre" \
+ "ChatZilla;{59c81df5-4b7a-477b-912d-4e0fdf64e5f2};0.8;0.9.*" \
+ )
diff --git a/mozilla-firetray-0.3.1-check-for-install-rdf-before-removing-it.patch b/mozilla-firetray-0.3.1-check-for-install-rdf-before-removing-it.patch
new file mode 100644
index 0000000..ab0d06f
--- /dev/null
+++ b/mozilla-firetray-0.3.1-check-for-install-rdf-before-removing-it.patch
@@ -0,0 +1,14 @@
+--- mozilla-0.3.1/build.sh.old	2011-09-10 17:57:40.000000000 +0000
++++ mozilla-0.3.1/build.sh	2011-09-10 17:59:31.000000000 +0000
+@@ -216,8 +216,9 @@ export LIB_ARCH=_`uname -m`
+ 
+ 
+ 
+-
+-rm install.rdf
++if [ -e install.rdf ];then
++  rm install.rdf
++fi
+ source ./generate_install_rdf.sh > install.rdf
+ 
+ FILE=firetray.xpi
diff --git a/mozilla-firetray-0.3.1-use-arch-dep-mozconfig.patch b/mozilla-firetray-0.3.1-use-arch-dep-mozconfig.patch
new file mode 100644
index 0000000..6a19721
--- /dev/null
+++ b/mozilla-firetray-0.3.1-use-arch-dep-mozconfig.patch
@@ -0,0 +1,20 @@
+--- mozilla-firetray-0.3.1/components/SConscript.use-arch-dep-mozconfig	2011-07-05 22:02:01.000000000 +0100
++++ mozilla-firetray-0.3.1/components/SConscript	2011-09-11 00:23:04.000000000 +0000
+@@ -1,4 +1,5 @@
+ import sys, os, string, re
++import platform as plat
+ 
+ platform = sys.platform
+ 
+@@ -55,9 +56,10 @@ except:
+         sys.exit(1)
+ 
+ # Hack to detect Mozilla version
++arch = plat.architecture()[0].split("bit")[0]
+ version_re = re.compile('#define MOZILLA_VERSION "(.*?)"')
+ xpcom_libs = ['xpcomglue_s']
+-with open(gecko_include + os.sep + 'mozilla-config.h', 'r') as f:
++with open(gecko_include + os.sep + 'mozilla-config' + arch + '.h', 'r') as f:
+     for line in f:
+         version_match = version_re.match(line)
+         if version_match:
diff --git a/mozilla-firetray-0.3.1-use-first-window-icon.patch b/mozilla-firetray-0.3.1-use-first-window-icon.patch
new file mode 100644
index 0000000..dad3bbe
--- /dev/null
+++ b/mozilla-firetray-0.3.1-use-first-window-icon.patch
@@ -0,0 +1,19 @@
+--- mozilla-firetray-0.3.1/components/nsTray.cpp.use-our-icons	2011-07-05 22:02:01.000000000 +0100
++++ mozilla-firetray-0.3.1/components/nsTray.cpp	2011-09-10 09:54:44.000000000 +0000
+@@ -749,7 +749,15 @@ NS_IMETHODIMP nsTray::SetDefaultXpmIcon(
+  this->default_icon = gdk_pixbuf_new_from_xpm_data((const char**)df_icon);
+  this->special_icon = gdk_pixbuf_new_from_xpm_data((const char**)sp_icon);
+ 
+- gtk_status_icon_set_from_pixbuf(GTK_STATUS_ICON(this->systray_icon), GDK_PIXBUF(this->default_icon));
++ GList*  list=gtk_window_list_toplevels();
++
++ if(list) {
++   GList* pos=g_list_first(list);
++   GtkWindow *w=(GtkWindow *)pos->data;
++   gtk_status_icon_set_from_pixbuf(GTK_STATUS_ICON(this->systray_icon), GDK_PIXBUF(gtk_window_get_icon(w)));
++ }
++ else
++   gtk_status_icon_set_from_pixbuf(GTK_STATUS_ICON(this->systray_icon), GDK_PIXBUF(this->default_icon));
+ /*
+  gtk_status_icon_set_tooltip(this->systray_icon, text);
+  gtk_status_icon_set_visible(this->systray_icon, TRUE);*/
diff --git a/mozilla-firetray.spec b/mozilla-firetray.spec
index c765cd2..a1294bb 100644
--- a/mozilla-firetray.spec
+++ b/mozilla-firetray.spec
@@ -1,4 +1,6 @@
-%define rel 5
+%global __jar_repack %{nil}
+
+%define rel 1
 
 %define svn 0
 
@@ -13,15 +15,17 @@
 %define ff_guid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
 %define tb_guid \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
 %define sm_guid \{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a\}
+%if %{fedora} < 16
 %define sb_guid \{718e30fb-e89b-41dd-9da7-e25a45638b28\}
+%endif
 %define cz_guid \{59c81df5-4b7a-477b-912d-4e0fdf64e5f2\}
 
 %define mz_ext_dir %{_libdir}/mozilla/extensions/
 
 Name:           mozilla-firetray
-Version:        0.2.8
+Version:        0.3.1
 %if %{svn}
-Release:        %{?pre}%{rel}.%{rev}svn%{?dist}.1
+Release:        %{?pre}%{rel}.%{rev}svn%{?dist}
 %else
 Release:        %{rel}%{?dist}  
 %endif      
@@ -40,40 +44,30 @@ Source0:        %{upname}-%{version}-%{rev}svn.tar.bz2
 %else
 Source0:        http://%{upname}.googlecode.com/files/%{upname}-%{version}-src.zip
 %endif
-BuildRoot:      %{_tmppath}/%{upname}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-# Patch0 : use nspr include path from pkg-config istead of a hardcoded one
-#          http://code.google.com/p/firetray/issues/detail?id=128
-Patch0:         %{name}-%{version}-fix-nspr-include.patch
-# Patch1:  fix wrong unread mail count in thunderbird and seamonkey
-#          http://code.google.com/p/firetray/issues/detail?id=120
-Patch1:         %{name}-%{version}-fix-unread-mail-count.patch
-# Patch2 : use the system's CXXFLAGS, fix backported from upstream's vcs
-#          https://bugzilla.redhat.com/show_bug.cgi?id=621683
-Patch2:    %{name}-%{version}-use-system-cxxflags.patch
-# Patch3 : use our own icons instead of the provided ones, except the newmail one
-#          http://code.google.com/p/firetray/issues/detail?id=109
-Patch3:         %{name}-%{version}-use-our-icons.patch
-# Patch4 : add support for chatzilla
-#          http://code.google.com/p/firetray/issues/detail?id=135
-Patch4:         %{name}-%{version}-add-chatzilla-support.patch
-#Patch5:   fix for the new way of registering xpcom components
-#          http://code.google.com/p/firetray/issues/detail?id=127
-Patch5:         %{name}-%{version}-fix-xpcom-registration.patch
 
+# Patch0:  Backported from upstream svn
+#          http://code.google.com/p/firetray/source/detail?r=125
+Patch0:    %{name}-%{version}-bump-max-version-numbers.patch
+# Patch1:  Check for install.rdf before removing it during the build
+Patch1:    %{name}-%{version}-check-for-install-rdf-before-removing-it.patch
+Patch2:    %{name}-%{version}-use-arch-dep-mozconfig.patch
+# Patch3 : use the window icon
+#          http://code.google.com/p/firetray/issues/detail?id=190
+Patch3:         %{name}-%{version}-use-first-window-icon.patch
+# Patch4 : Add a missing hunk that was missing during the merge
+#          http://code.google.com/p/firetray/issues/detail?id=189
+Patch4:    %{name}-%{version}-add-chatzilla-support.patch
 
 BuildRequires:  xulrunner-devel
-%if %{fedora} <= 12
-BuildRequires:  xulrunner-devel-unstable
-%endif
+
 BuildRequires:  scons
 BuildRequires:  zip unzip
 
 %description
 Firetray is a system tray addon for mozilla, current features are :
 
-- adds tray icon for both firefox and thunderbird
-- Show number of unread mails in the tray icon (Thunderbird)
+- adds tray icon for all mozilla based application
+- Show number of unread mails in the tray icon (Thunderbird, Seamonkey)
 - close button hides to tray
 - ability to start minimized to tray
 - when restoring if the window is iconified, deiconify it
@@ -83,26 +77,22 @@ Firetray is a system tray addon for mozilla, current features are :
 
 %package core
 Summary:        Core files for Mozilla Firetray Extension
+%if %{fedora} > 15
+Obsoletes:      mozilla-firetay-sunbird
+%endif
 
 %description core
+Firetray is a system tray addon for mozilla, this package contains
+the files needed for all mozilla applications to use the Firetray extension.
+But it doesn't do anything by itself.
 
-Firetray is a system tray addon for mozilla, current features are :
-
-- adds tray icon for both firefox and thunderbird
-- Show number of unread mails in the tray icon (Thunderbird)
-- close button hides to tray
-- ability to start minimized to tray
-- when restoring if the window is iconified, deiconify it
-- Custom tray icon
-- Hotkey for Hide/Unhide
-- Handle mouse scrolls on tray icon
-
-This package contains the files needed for all mozilla products
-to use the Firetray extension.
+If you want to enable firetray functionality for a mozilla application,
+install the corresponding package; for example, if you want to enable
+it for thunderbird, install mozilla-firetray-thunderbird package.
 
 %package firefox
 Summary:        System tray extension for firefox
-Requires:       firefox 
+Requires:       firefox >= 6.0
 Requires:       %{name}-core = %{version}-%{release}
 
 %description firefox
@@ -118,7 +108,7 @@ Firetray is a system tray addon for firefox, current features are :
 
 %package thunderbird
 Summary:        System tray extension for thunderbird
-Requires:       thunderbird 
+Requires:       thunderbird >= 6.0
 Requires:       %{name}-core = %{version}-%{release}
 
 %description thunderbird
@@ -135,7 +125,7 @@ Firetray is a system tray addon for thunderbird, current features are :
 
 %package seamonkey
 Summary:        System tray extension for seamonkey
-Requires:       seamonkey 
+Requires:       seamonkey >= 2.3
 Requires:       %{name}-core = %{version}-%{release}
 
 %description seamonkey
@@ -150,6 +140,7 @@ Firetray is a system tray addon for seamonkey, current features are :
 - Hotkey for Hide/Unhide
 - Handle mouse scrolls on tray icon
 
+%if %{fedora} < 16
 %package sunbird
 Summary:        System tray extension for sunbird
 Requires:       sunbird 
@@ -165,6 +156,7 @@ Firetray is a system tray addon for sunbird, current features are :
 - Custom tray icon
 - Hotkey for Hide/Unhide
 - Handle mouse scrolls on tray icon
+%endif
 
 %package chatzilla
 Summary:        System tray extension for chatzilla
@@ -189,37 +181,29 @@ Firetray is a system tray addon for chatzilla, current features are :
 %setup -q -c %{upname}-%{version}
 %endif
 
-%patch0 -p1 -b .fix-nspr-include
-%patch1 -p1 -b .fix-unread-mail-count
-%patch2 -p1 -b .use-system-cxxflags
+%patch0 -p1 -b .bump-max-version-numbers
+%patch1 -p1 -b .check-for-install-rdf-before-removing-it
+%patch2 -p1 -b .use-arch-dep-mozconfig
 %patch3 -p1 -b .use-our-icons
 %patch4 -p1 -b .add-chatzilla-support
-%patch5 -p1 -b .fix-xpcom-registration
 
 # Make sure we don't ship prebuilt stuff
 find . \( -name '*.xpi' -o -name '*.jar' -o -name '*.xpt' -o -name '*.so' \) -exec rm -f '{}' \;
 
-# Remove existing pixmaps except the newmail one
-mv components/pixmaps/newmail.xpm .
-rm -rf components/pixmaps
-
-%if %{fedora} >= 15
-sed -i 's|nsIGenericFactory.h|mozilla/ModuleUtils.h|g' components/nsTrayModue.cpp
-%endif
-
 %build
-export GECKO_SDK=$(pkg-config libxul --variable=sdkdir)
-export DYNAMIC_LINKING="dyn"
 export CXXFLAGS="%{optflags}"
-scons %{upname}.xpi
+sh build.sh --dynamic-linking \
+            --gecko19-compat \
+            --release-name=%{release}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-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%{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}
+unzip %{upname}-%{version}-%{release}.xpi -d $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}
 
 # rename changes file to ChangeLog
 mv changes ChangeLog
@@ -231,24 +215,21 @@ ln -s %{_datadir}/doc/%{name}-core-%{version}/ChangeLog symdoc/ChangeLog
 
 #now symlink the products extension's directories to the core extension directory
 
-for i in {%{ff_guid},%{tb_guid},%{sm_guid},%{sb_guid},%{cz_guid}};do
+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
+    for j in components/{nsFireTrayHandler.js,nsITray.xpt,nsIFireTrayHandler.xpt,libnptray_%(uname -m).so};do
       ln -s %{_libdir}/%{name}-%{version}/$j $j
     done
   popd
 done
 
-# Install the newmail icon
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
-install -Dpm 644 newmail.xpm $RPM_BUILD_ROOT%{_datadir}/%{name}
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{fedora} < 16
 # workaround for rhbz #646523
 %pretrans sunbird -p <lua>
 st=posix.stat("%{mz_ext_dir}%{sb_guid}/%{ft_guid}")
@@ -256,12 +237,12 @@ 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
+%endif
 
 %files core
 %defattr(-,root,root,-)
 %doc symdoc/COPYING ChangeLog
 %{_libdir}/%{name}-%{version}
-%{_datadir}/%{name}
 
 %files firefox
 %defattr(-,root,root,-)
@@ -278,10 +259,12 @@ end
 %doc symdoc/COPYING symdoc/ChangeLog
 %{mz_ext_dir}%{sm_guid}/%{ft_guid}
 
+%if %{fedora} < 16
 %files sunbird
 %defattr(-,root,root,-)
 %doc symdoc/COPYING symdoc/ChangeLog
 %{mz_ext_dir}%{sb_guid}/%{ft_guid}
+%endif
 
 %files chatzilla
 %defattr(-,root,root,-)
@@ -290,8 +273,13 @@ end
 
 
 %changelog
-* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.8-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+* Thu Sep 08 2011 Hicham HAOUARI <hicham.haouari at gmail.com> - 0.3.1-1
+- Update to 0.3.1
+- Obsolete mozilla-firetray-sunbird on fedora >= 16, since sunbird have
+  been removed on these
+- Remove BuildRoot tag
+- Better fix to load the correct window icon on systray
+- Drop patches merged or that have better fixes upstream
 
 * Thu Oct 28 2010 Hicham HAOUARI <hicham.haouari at gmail.com> - 0.2.8-5
 - Spec cleanup
diff --git a/sources b/sources
index 6aa8df3..4a27db6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-cd71b82da69c8a626d1ac471b268a4fd  firetray-0.2.8-src.zip
+d907cb2f12ec8272597fc44821bb27fb  firetray-0.3.1-src.zip


More information about the scm-commits mailing list