thunderbird.spec
author dcarbery
Fri, 24 Nov 2006 16:37:59 +0000
branch217update
changeset 19096 d542fc2c823e
parent 8611 2cb5eddbccd7
child 8898 cebfd6543458
child 18997 1ae9834834dd
permissions -rw-r--r--
Merged trunk changes r9797:9829 into 217update branch.

#
# Copyright (c) Sun Microsystems, Inc.
#
# Owner: davelam
#

#####################################
##   Package Information Section   ##
#####################################

Name:        thunderbird
Summary:     Mozilla Thunderbird Standalone E-mail and Newsgroup Client
Version:     1.5.0.8
%define tarball_version 1.5.0.8
Release:     1
Copyright:   MPL/LGPL
Group:       Applications/Internet
Distribution:Java Desktop System
Vendor:      Sun Microsystems, Inc.
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

# owner:davelam date:2005-08-22 type:bug
# change install dir from 'name-version' to 'name'
Patch1:      mozilla-01-change-install-dir.diff

# owner:davelam date:2006-04-14 type:l10n
# change startup script to support multi-language
Patch2:      thunderbird-08-locale.diff

# owner:davelam date:2005-09-01 type:bug
# let moz patch checker support S10 and S11
Patch3:      mozilla-02-no-patch-checker.diff

# owner:davelam date:2005-09-05 type:bug
# remove gtar specific options
Patch4:      mozilla-05-common-tar-option.diff

# owner:davelam date:2006-04-29 type:bug
# let firefox use system bundled nss,nspr
Patch5:      thunderbird-09-no-nss-nspr.diff

# owner:davelam date:2006-07-07 type:bug
# comment LD_LIBRARY_PATH setting
Patch6:      mozilla-07-no-ldlibpath.diff

# owner:davelam date:2006-09-07 type:bug
# remove moz patch checker from package
Patch7:      thunderbird-10-no-pkg-files.diff

# owner:davelam date:2006-11-13 type:bug
# add Makefile to fix build problem on S11
Patch8:      mozilla-03-s11s-smkfl.diff
Patch9:      mozilla-04-s11x-smkfl.diff

URL:         http://www.sun.com/software/javadesktopsystem/

BuildRoot:   %{_tmppath}/%{name}-%{tarball_version}-build
Prefix:      /usr
Provides:    webclient
Autoreqprov: on

#####################################
##     Package Defines Section     ##
#####################################

%define _unpackaged_files_terminate_build 0
%define _tbdir %{_libdir}/%{name}

#####################################
##  Package Requirements Section   ##
#####################################

BuildRequires: libpng-devel
BuildRequires: libjpeg
BuildRequires: zlib-devel
BuildRequires: zip
BuildRequires: perl
BuildRequires: autoconf
BuildRequires: libIDL-devel
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
Prereq: fileutils perl
Prereq: /usr/bin/killall

#####################################
##   Package Description Section   ##
#####################################

%description
Mozilla Thunderbird is a standalone e-mail and newsgroup client 
that can be used as a companion to Mozilla Firefox or by itself. 

#####################################
##   Package Preparation Section   ##
#####################################

%prep

%setup -q -c -n %{name}
cd ..
/bin/mv %{name} %{name}.tmp.$$
/bin/mv %{name}.tmp.$$/mozilla %{name}
rm -rf %{name}.tmp.$$
cd %{name}
%patch1 -p1
%patch2 -p1
%ifos solaris
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%endif

#####################################
##      Package Build Section      ##
#####################################

%build

%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

cat << "EOF" > .mozconfig
. $topsrcdir/mail/config/mozconfig
mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
ac_add_options --prefix=%{_prefix}
ac_add_options --libdir=%{_libdir}
ac_add_options --mandir=%{_mandir}
ac_add_options --enable-xft
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --disable-static
ac_add_options --enable-shared
ac_add_options --enable-official-branding
ac_add_options --disable-tests
ac_add_options --disable-freetype2
ac_add_options --disable-auto-deps
ac_add_options --disable-debug
EOF

BUILD_OFFICIAL=1 
MOZILLA_OFFICIAL=1
MOZ_PKG_FORMAT=BZ2
PKG_SKIP_STRIP=1
#CFLAGS=
#CXXFLAGS=
export BUILD_OFFICIAL MOZILLA_OFFICIAL MOZ_PKG_FORMAT PKG_SKIP_STRIP CFLAGS CXXFLAGS

./configure
make export
# FIXME: disabled parallel build as it seems to break the build sometimes
make libs

cd xpinstall/packager
make

%install
/bin/rm -rf $RPM_BUILD_ROOT

BUILDDIR=`pwd`
/bin/mkdir -p $RPM_BUILD_ROOT%{_libdir}
cd $RPM_BUILD_ROOT%{_libdir}
/usr/bin/bzip2 -dc $BUILDDIR/dist/thunderbird-*.tar.bz2 | /bin/tar -xf -

/bin/mkdir -p $RPM_BUILD_ROOT%{_bindir}
/bin/ln -s ../lib/thunderbird/thunderbird $RPM_BUILD_ROOT%{_bindir}/thunderbird

/bin/mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
/bin/mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -c -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/thunderbird-icon.png
install -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/applications/thunderbird.desktop

# install the man page
#/bin/mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
#install -c -m 644  %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/thunderbird.1

#/bin/cat %{SOURCE3} | /usr/bin/sed -e 's,FFDIR,%{_tbdir},g' > \
#  $RPM_BUILD_ROOT%{_tbdir}/thunderbird-rebuild-databases
#/bin/chmod 755 $RPM_BUILD_ROOT%{_tbdir}/thunderbird-rebuild-databases

# 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

%clean
/bin/rm -rf $RPM_BUILD_ROOT

#########################################
##  Package Post[Un] Install Section   ##
#########################################

%post
# run ldconfig before regxpcom
/sbin/ldconfig >/dev/null 2>/dev/null

%postun
/sbin/ldconfig >/dev/null 2>/dev/null

%preun

#####################################
##      Package Files Section      ##
#####################################

%files
%defattr(-,root,root)
%dir %{_tbdir}
%{_tbdir}/*
%{_bindir}/thunderbird
#%{_mandir}/man1/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}-icon.png

%changelog
* Fri Nov 17 2006 - [email protected]
- add patch comments
* Mon Nov 13 2006 - [email protected]
- change the version to 1.5.0.8 since 2.0a1 could not be able to integrated 
  into SNV, and add patches mozilla-03-s11s-smkfl.diff, mozilla-04-s11x-smkfl.diff 
  back because they're not upstreamed in the branch that for Thunderbird 1.5.x
* Thu Sep 07 2006 - [email protected]
- add patch thunderbird-10-no-pkg-files.diff to remove patch checker scripts
  since it's unnecessary to deliver them with the bundled version
- change the version 2.0a1 to 2.0 to comply WOS integration rules
- re-organize the patch list
* Mon Aug 28 2006 - [email protected]
- create symbol link libnssckbi.so -> /usr/lib/mps/libnssckbi.so
  to fix bug CR#6459752
* Tue Aug 08 2006 - [email protected]
- bump version to 2.0a1
- remove the patch mozilla-03-s11s-smkfl.diff, mozilla-04-s11x-smkfl.diff
  which have been fixed in 2.0a1
- change to xpinstall/packager to run the make to generate the binary tarball
* Mon Jul 31 2006 - [email protected]
- bump to 1.5.0.5
* Fri Jul 07 2006 - [email protected]
- add patch mozilla-07-no-ldlibpath.diff to remove the LD_LIBRARY_PATH in
- change to "disable-static, enable-shared" per Brian Lu
* Wed Jun 21 2006 - [email protected]
- remove patch thunderbird-07-ldap-prefs.diff to fix bug CR#6344861
* Fri Jun 02 2006 - [email protected]
- bump src version to 1.5.0.4
* Sat Apr 29 2006 - [email protected]
- Add patch thunderbird-09-no-nss-nspr.diff to not deliver the nss,nspr
* Fri Apr 27 2006 - [email protected]
- Remove patch 9 as it is not in svn and breaks build.
* Fri Apr 27 2006 - [email protected]
- change to not deliver the devel pkg
- add patch thunderbird-09-no-nss-nspr.diff to not deliver the nss,nspr
  libraries, and use firefox's instead 
- remove patch mozilla-06-skip-strip.diff, use another simple way to skip
  strip instead, setting PKG_SKIP_STRIP=1 
* Fri Apr 21 2006 - [email protected]
- bump to 1.5.0.2, remove patch 06 thunderbird-06-save-all-attach.diff,
  which is already upstreamed
* Fri Apr 14 2006 - [email protected]
- add patch mozilla-06-skip-strip.diff to make no stripped libraries 
- add patch firefox-13-locale.diff to make firefox automatically
  pick up locale setting from user environment and start up in
  that locale
* Thu Apr 13 2006 - [email protected]
- Changed the installation location from "/usr/sfw/lib" to "/usr/lib"
  on Solaris

* Fri Mar 10 2006 [email protected]
- Add patch thunderbird-06-save-all-attach.diff to fix 6373061.
- Add patch thunderbird-07-ldap-prefs.diff to fix CR6344861.

* Tue Jan 17 2006 - [email protected]
- Bump tarball version to 1.5
- add two configure options --enable-static, --disable-shared
- to get rid of intermedia shared libraries  
- disable parallel build option 

* Tue Nov 08 2005 - [email protected]
- Bump tarball version to 1.5rc1
- Remove the patch mozilla-07-bz307041.diff since it's upstreamed in 1.5rc1 already

* Thu Nov  1 2005 - [email protected]
- change version to numeric and introduce %tarball_version

* Fri Oct 21 2005 - <[email protected]>
- Bump to 1.5b2.
- Add patch 307041 from bugzilla.

* Mon Sep 26 2005 - <[email protected]>
- Bump to 1.5b1.
- Move dir mozilla to thunderbird after tarball unpacking.

* Thu Sep 08 2005 - [email protected]
- Change BuildPrereq to BuildRequires, a format that build-gnome2 understands.

* Mon Sep 05 2005 - Dave Lin <[email protected]>
- Add patches to remove the specific gtar options
- Set MOZ_PKG_FORMAT=BZ2 to keep consistent of tarball
  format between linux and solaris

* Fri Sep 02 2005 - [email protected]
- Change gtar to tar and rework tar command.

* Mon Aug 22 2005 - Dave Lin <[email protected]>
- initial version of the spec file created