2007-03-06 Dave Lin <[email protected]> gnome-2-16
authordavelam
Tue, 06 Mar 2007 11:50:27 +0000
branchgnome-2-16
changeset 19025 de7c4e9aa84d
parent 19024 3ff59868a432
child 19026 85d09ed71e47
2007-03-06 Dave Lin <[email protected]> * thunderbird.spec: * Solaris/SUNWthunderbird.spec: Enable lightning extension(0.3.1) whith WCAP in Thunderbird, remove "Requires: SUNWfirefox" and "BuildRequires: SUNWfirefox-devel" since it's not necessary, remove -R%{_libdir}/firefox since is not necessary
ChangeLog
Solaris/ChangeLog
Solaris/SUNWthunderbird.spec
thunderbird.spec
--- a/ChangeLog	Mon Mar 05 12:18:35 2007 +0000
+++ b/ChangeLog	Tue Mar 06 11:50:27 2007 +0000
@@ -1,3 +1,7 @@
+2007-03-06  Dave Lin <[email protected]>
+
+	* thunderbird.spec: Enable Lightning 0.3.1 with WCAP in Thunderbird
+
 2007-03-05  Damien Carbery <[email protected]>
 
 	* SunDesktopVersion.spec: Change buildType from 'devel' to 'stable'.
--- a/Solaris/ChangeLog	Mon Mar 05 12:18:35 2007 +0000
+++ b/Solaris/ChangeLog	Tue Mar 06 11:50:27 2007 +0000
@@ -1,3 +1,10 @@
+2007-03-06  Dave Lin <[email protected]>
+
+	* Solaris/SUNWthunderbird.spec: Enable lightning extension(0.3.1)
+	  whith WCAP in Thunderbird, remove "Requires: SUNWfirefox" and 
+	  "BuildRequires: SUNWfirefox-devel" since it's not necessary, 
+	  remove -R%{_libdir}/firefox since is not necessary
+
 2007-02-26  Dermot McCluskey [email protected]
 
 	==== Vermillion Stable build 60 ====
--- a/Solaris/SUNWthunderbird.spec	Mon Mar 05 12:18:35 2007 +0000
+++ b/Solaris/SUNWthunderbird.spec	Tue Mar 06 11:50:27 2007 +0000
@@ -13,6 +13,9 @@
 # PACKAGE NOT ARC REVIEWED BY SUN JDS TEAM
 #
 %include Solaris.inc
+# use --without-lightning to disable building lightning
+# default: build lightning
+%define with_lightning %{?!_without_lightning:1}%{?_without_lightning:0}
 
 %use thunderbird = thunderbird.spec
 
@@ -47,7 +50,6 @@
 Requires: SUNWlibms
 Requires: SUNWxwrtl
 Requires: SUNWpostrun
-Requires: SUNWfirefox
 Requires: SUNWpr
 Requires: SUNWtls
 BuildRequires: SUNWzip
@@ -56,13 +58,21 @@
 BuildRequires: SUNWgnome-vfs-devel
 BuildRequires: SUNWgnome-component-devel
 BuildRequires: SUNWgnome-base-libs-devel
-BuildRequires: SUNWfirefox-devel
 
 #####################################
 ##   Package Description Section   ##
 #####################################
 # no devel package
 
+%if %with_lightning
+%package calendar
+Summary:       %{summary} - Calendar
+Version:       %{thunderbird.lightning_version}
+SUNW_BaseDir:  %{_basedir}
+%include default-depend.inc
+Requires:      SUNWthunderbird
+%endif
+
 #####################################
 ##   Package Preparation Section   ##
 #####################################
@@ -81,7 +91,7 @@
 %build
 export PKG_CONFIG_PATH=${_libdir}/pkgconfig:%{_pkg_config_path}
 export MSGFMT="/usr/bin/msgfmt"
-export LDFLAGS="-z ignore -L%{_libdir} -L/usr/sfw/lib -R'\$\$ORIGIN:\$\$ORIGIN/..' -R%{_libdir}/firefox -R%{_libdir}/mps -lXft -lfontconfig -lfreetype" 
+export LDFLAGS="-z ignore -L%{_libdir} -L/usr/sfw/lib -R'\$\$ORIGIN:\$\$ORIGIN/..' -R%{_libdir}/mps -lXft -lfontconfig -lfreetype" 
 export CFLAGS="-xlibmil"
 export CXXFLAGS="-norunpath -xlibmil -xlibmopt -features=tmplife -lCrun -lCstd"
 %ifarch sparc
@@ -97,6 +107,29 @@
 %install
 %thunderbird.install -d %name-%version
 
+%if %with_lightning
+# creat file list for SUNWthunderbird
+cd $RPM_BUILD_ROOT%{_libdir}
+find thunderbird ! -type d | sed -e 's#{#\\{#g' -e 's#}#\\}#g' \
+  -e 's#^.*$#%{_libdir}/&#' \
+  >  %{_builddir}/%name-%version/%{name}.list
+
+# install lightning under extensions directory
+install -d $RPM_BUILD_ROOT%{_libdir}/thunderbird/extensions/lightning_ext_id
+cd $RPM_BUILD_ROOT%{_libdir}/thunderbird/extensions/lightning_ext_id
+unzip %{_builddir}/%name-%version/thunderbird/dist/xpi-stage/wcap-enabler.xpi
+unzip -o %{_builddir}/%name-%version/thunderbird/dist/xpi-stage/lightning.xpi
+ext_id=`sed -n -e '/<em:id>/{h;}' -e '/<em:name>[Ll]ightning/{g;p;q;}' install.rdf | \
+  sed 's/^.*\({.*}\).*$/\1/'`
+cd ..
+mv lightning_ext_id $ext_id
+
+# creat file list for SUNWthunderbird-calendar
+find $ext_id ! -type d | sed -e 's#{#\\{#g' -e 's#}#\\}#g' \
+  -e 's#^.*$#%{_libdir}/thunderbird/extensions/&#' \
+  >  %{_builddir}/%name-%version/%{name}-calendar.list
+%endif
+
 rm -rf $RPM_BUILD_ROOT%{_mandir}
 cd %{_builddir}/%name-%version/sun-manpages
 make install DESTDIR=$RPM_BUILD_ROOT
@@ -125,12 +158,20 @@
 ##      Package Files Section      ##
 #####################################
 
-%files 
+%if %with_lightning
+%files -f SUNWthunderbird.list
+%else
+%files
+%endif
 %defattr(0755, root, bin)
 %dir %attr (0755, root, bin) %{_bindir}
 %{_bindir}/thunderbird
 %dir %attr (0755, root, bin) %{_libdir}
+%if %with_lightning
+#%{_libdir}/thunderbird
+%else
 %{_libdir}/thunderbird
+%endif
 %dir %attr (0755, root, sys) %{_datadir}
 %dir %attr (0755, root, other) %{_datadir}/applications
 %{_datadir}/applications/thunderbird.desktop
@@ -140,7 +181,18 @@
 %dir %attr (0755, root, bin) %{_mandir}/man1
 %{_mandir}/man1/*
 
+%if %with_lightning
+%files calendar -f SUNWthunderbird-calendar.list
+%defattr(0755, root, bin)
+%dir %attr (0755, root, bin) %{_libdir}
+%endif
+
 %changelog
+* Tue Mar 06 2007 - [email protected]
+- enable lightning extension(0.3.1) whith WCAP in Thunderbird
+- remove BuildRequires: SUNWfirefox-devel since it's not necessary
+- remove Requires: SUNWfirefox since it's not necessary
+- remove -R%{_libdir}/firefox since is not necessary
 * Tue Sep 05 2006 - [email protected]
 - New Manpage tarball
 * Fri Jul 14 2006 - [email protected]
--- a/thunderbird.spec	Mon Mar 05 12:18:35 2007 +0000
+++ b/thunderbird.spec	Tue Mar 06 11:50:27 2007 +0000
@@ -20,9 +20,11 @@
 Source:     http://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{tarball_version}/source/%{name}-%{tarball_version}-source.tar.bz2
 Source1:     thunderbird-icon.png
 Source2:     thunderbird.desktop
-#Source3:     thunderbird-rebuild-databases.in
-#Source4:     thunderbird.1
-#Source5:     thunderbird.sh.in
+%define with_lightning %{?!_without_lightning:1}%{?_without_lightning:0}
+%if %with_lightning
+%define lightning_version 0.3.1
+Source3:     http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/%{lightning_version}/source/lightning-%{lightning_version}.source.tar.bz2
+%endif
 
 # owner:davelam date:2005-08-22 type:bug
 # change install dir from 'name-version' to 'name'
@@ -101,6 +103,18 @@
 /bin/mv %{name} %{name}.tmp.$$
 /bin/mv %{name}.tmp.$$/mozilla %{name}
 rm -rf %{name}.tmp.$$
+%if %with_lightning
+/usr/sfw/bin/gtar -jxf %{SOURCE3} \
+  mozilla/calendar \
+  mozilla/extensions/lightning
+chmod -Rf a+rX,g-w,o-w mozilla
+rm -rf %{name}/calendar
+rm -rf %{name}/extensions/lightning
+mv mozilla/calendar %{name}/
+mv mozilla/extensions/lightning %{name}/extensions/
+rm -rf mozilla
+%endif
+
 cd %{name}
 %patch1 -p1
 %patch2 -p1
@@ -147,6 +161,10 @@
 ac_add_options --disable-debug
 EOF
 
+%if %with_lightning
+echo "ac_add_options --enable-extensions=default,lightning" >> .mozconfig
+%endif
+
 BUILD_OFFICIAL=1 
 MOZILLA_OFFICIAL=1
 MOZ_PKG_FORMAT=BZ2
@@ -187,6 +205,14 @@
 #  $RPM_BUILD_ROOT%{_tbdir}/thunderbird-rebuild-databases
 #/bin/chmod 755 $RPM_BUILD_ROOT%{_tbdir}/thunderbird-rebuild-databases
 
+# remove the empty directories
+# cpu/sparcv8plus/libnspr_flt4.so is not packaged
+# since we use system bundled version of nss/nspr
+%ifarch sparc
+rmdir $RPM_BUILD_ROOT%{_tbdir}/cpu/sparcv8plus
+rmdir $RPM_BUILD_ROOT%{_tbdir}/cpu
+%endif
+
 # create symbol link libnssckbi.so -> /usr/lib/mps/libnssckbi.so
 # to fix bug CR#6459752
 ln -s ../mps/libnssckbi.so $RPM_BUILD_ROOT%{_tbdir}/libnssckbi.so
@@ -221,6 +247,8 @@
 %{_datadir}/pixmaps/%{name}-icon.png
 
 %changelog
+* Tue Mar 06 2007 - [email protected]
+- enable lightning extension(0.3.1) with WCAP in Thunderbird
 * Wed Jan 24 2007 - [email protected]
 - bump version to 2.0b2
 * Fri Jan 05 2007 - [email protected]