SUNWthunderbird.spec
author daniell
Wed, 13 Oct 2010 16:43:58 +0000
branchopensolaris-2009-06
changeset 20159 f18a6979f732
parent 14340 f57088bd958e
permissions -rw-r--r--
6965295 [CVE-2010-1205/CVE-2010-2249] Multiple security issues in libpng 1.2 versions before 1.2.44

#
# spec file for package SUNWthunderbird
#
# includes module(s): thunderbird
#
# Copyright 2007 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: davelam
#
# DO NOT REMOVE NEXT LINE
# 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

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

Name:          SUNWthunderbird
Summary:       Mozilla Thunderbird Email/Newsgroup Client
Version:       %{thunderbird.version}
Source:        %{name}-manpages-0.1.tar.gz
SUNW_BaseDir:  %{_basedir}
SUNW_Category: THUNDERBIRD,application,%{jds_version}
SUNW_Copyright:%{name}.copyright
BuildRoot:     %{_tmppath}/%{name}-%{version}-build

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

%include default-depend.inc
Requires: SUNWjdsrm
Requires: SUNWj5rt
Requires: SUNWgnome-base-libs
Requires: SUNWdtbas
Requires: SUNWfontconfig
Requires: SUNWfreetype2
Requires: SUNWgnome-config
Requires: SUNWgnome-libs
Requires: SUNWgnome-vfs
Requires: SUNWlibC
Requires: SUNWlibms
Requires: SUNWpostrun
Requires: SUNWpr
Requires: SUNWtls
BuildRequires: SUNWzip
BuildRequires: SUNWgnome-config-devel
BuildRequires: SUNWgnome-libs-devel
BuildRequires: SUNWgnome-vfs-devel
BuildRequires: SUNWgnome-component-devel
BuildRequires: SUNWgnome-base-libs-devel

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

%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   ##
#####################################

%prep
rm -rf %name-%version
mkdir -p %name-%version
%thunderbird.prep -d %name-%version
cd %{_builddir}/%name-%version
gzcat %SOURCE0 | tar xf -

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

%build
export PKG_CONFIG_PATH=${_libdir}/pkgconfig:%{_pkg_config_path}
export MSGFMT="/usr/bin/msgfmt"
export LDFLAGS="-z ignore -R'\$\$ORIGIN:\$\$ORIGIN/..' -R%{_libdir}/mps" 
export CFLAGS="-xlibmil"
export CXXFLAGS="-norunpath -xlibmil -xlibmopt -features=tmplife -lCrun -lCstd"
%ifarch sparc
export CFLAGS="$CFLAGS -xO5"
export CXXFLAGS="$CXXFLAGS -xO5"
%else
export CFLAGS="$CFLAGS -xO3"
export CXXFLAGS="$CXXFLAGS -xO3"
# Alternate optimization to workaround ss12 compiler error.
#export CFLAGS="$CFLAGS -Wu,-O~z"
#export CXXFLAGS="$CXXFLAGS -qoption ube -O~z"
%endif
%if %option_with_fox
export CFLAGS="$CFLAGS -I/usr/X11/include"
export CXXFLAGS="$CXXFLAGS -I/usr/X11/include"
%endif

%thunderbird.build -d %name-%version

%install
%thunderbird.install -d %name-%version

%if %with_lightning
# Lightning extension ID
ext_id=e2fda1a4-762b-4020-b5ad-a41df1933103

# creat file list for SUNWthunderbird, SUNWthunderbird-calendar(ie. Lightning)
cd $RPM_BUILD_ROOT%{_libdir}
find thunderbird ! -type d | \
  sed -e 's#{#\\{#g' -e 's#}#\\}#g' -e 's#^.*$#%{_libdir}/&#' \
  >  /tmp/%{name}-full.list

grep -v "{${ext_id}" /tmp/%{name}-full.list > \
  %{_builddir}/%name-%version/%{name}.list
grep "{${ext_id}" /tmp/%{name}-full.list > \
  %{_builddir}/%name-%version/%{name}-calendar.list

rm -f /tmp/%{name}-full.list
%endif

rm -rf $RPM_BUILD_ROOT%{_mandir}
cd %{_builddir}/%name-%version/sun-manpages
make install DESTDIR=$RPM_BUILD_ROOT

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

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

%post
( echo 'test -x /usr/bin/update-desktop-database || exit 0';
  echo '/usr/bin/update-desktop-database'
) | $BASEDIR/lib/postrun -b -u -c JDS_wait

%postun
test -x $BASEDIR/lib/postrun || exit 0
( echo 'test -x /usr/bin/update-desktop-database || exit 0';
  echo '/usr/bin/update-desktop-database'
) | $BASEDIR/lib/postrun -b -u -c JDS

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

%if %with_lightning
%files -f SUNWthunderbird.list
%else
%files
%endif

%doc -d thunderbird README.txt LICENSE
%dir %attr (0755, root, other) %{_datadir}/doc

%defattr(-, 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
%ifarch sparc
%dir %attr (0755, root, bin) %{_libdir}/thunderbird/cpu
%dir %attr (0755, root, bin) %{_libdir}/thunderbird/cpu/sparcv8plus
%endif
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, other) %{_datadir}/applications
%{_datadir}/applications/thunderbird.desktop
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%{_datadir}/pixmaps/thunderbird-icon.png
%dir %attr (0755, root, bin) %{_mandir}
%dir %attr (0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/*

%if %with_lightning
%files calendar -f SUNWthunderbird-calendar.list
%defattr(-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%endif

%changelog
* Thu Sep 19 2008 - [email protected]
- add %doc section to generate new copyright files
* Thu Apr 24 2008 - [email protected]
- remove wcap-enable.xpi because WCAP is already part of lightning 0.8
* Fri Oct 12 2007 - [email protected]
- add /usr/X11/include to CFLAGS/CXXFLAGS if built with FOX
* Tue Apr 24 2007 - [email protected]
- s/0755/-/ in defattr so that files are not made all executable
* Sat Mar 03 2007 - [email protected]
- enable WCAP in lightning
* Fri Jan 26 2007 - [email protected]
- enable lightning extension(0.3) in Thunderbird
- remove BuildRequires: SUNWfirefox-devel since it's not necessary
- remove -R%{_libdir}/firefox since is not necessary
* Thu Dec 28 2006 - [email protected]
- remove "Requires:  SUNWfirefox" since it's not necessary
* Tue Sep 05 2006 - [email protected]
- New Manpage tarball
* Fri Jul 14 2006 - [email protected]
- update %post/%postun/etc scripts to support diskless client setup,
  part of 6448317
* Thu Jul 13 2006 - [email protected]
- add "-lCrun -lCstd" in CXXFLAGS to improve the startup performance
* Thu Jun 29 2006 - [email protected]
- update postrun scripts
* Tue Jun 20 2006 - [email protected]
- Add SUNWpr and SUNWtls dependencies after check-deps.pl run.

* Mon Jun 12 2006 - [email protected]
- changed to let thunderbird use nss,nspr in /usr/lib/mps required by ARC
- remove -R%{_libdir}

* Sun Jun 11 2006 - [email protected]
- change group from other to bin/sys

* Fri Jun 09 2006 - [email protected]
- Uncomment man page lines in %files.

* Thu Jun 08 2006 - [email protected]
- add man page prepared by Leon Sha

* Fri May 12 2006 - [email protected]
- Small update to dependency list after check-deps.pl run.

* Thu Apr 27 2006 - [email protected]
- remove the devel pkg since the it's almost the same as firefox's devel pkg
- set -R%{_libdir}/firefox to let thunderbird use the nss,nspr libs delivered
  by firefox
* Fri Apr 14 2006 - [email protected]
- changed pkg category to "THUNDERBIRD" to make it more clear
* Thu Apr 13 2006 - [email protected]
- changed the installation location from "/usr/sfw/lib" to "/usr/lib"

* Mon Feb 20 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.

* Thu Jan 18 2006 - [email protected]
- add "-lXft -lfontconfig -lfreetype" to support configure opt "enable-static"

* Sat Dec  3 2005 - [email protected]
- add %post script that runs update-desktop-database

* Mon Oct 31 2005 - [email protected]
- merge -share pkgs into base

* Mon Sep 26 2005 - [email protected]
- Change version same with linux verion.

* Thu Sep 22 2005 - [email protected]
- add %{_libdir} to %files so that we actually package thunderbird...

* Fri Sep 02 2005 - [email protected]
- Fix %files.

* Fri Aug 26 2005 - [email protected]
- initial version of the spec file created