#
# spec file for package SUNWthunderbird
#
# includes module(s): thunderbird
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
#
# DO NOT REMOVE NEXT LINE
# PACKAGE NOT INCLUDED IN GNOME UMBRELLA ARC
#
%use thunderbird = thunderbird.spec
#####################################
## Package Information Section ##
#####################################
%define lang_list ca cs de es-AR es-ES fi fr he hu it ja ko lt nb-NO nl nn-NO pl pt-BR pt-PT ru sk sv-SE tr uk zh-CN zh-TW zh-HK
SUNW_BaseDir: %{_basedir}
#####################################
## Package Requirements Section ##
#####################################
#####################################
## Package Description Section ##
#####################################
SUNW_BaseDir: %{_basedir}
#####################################
## Package Preparation Section ##
#####################################
%prep
cd l10n
cd ..
#####################################
## Package Build Section ##
#####################################
# Lightning extension ID
# create file list for SUNWthunderbird, SUNWthunderbird-calendar(ie. Lightning)
cd $RPM_BUILD_ROOT%{_libdir}
find %{thunderbird.name} ! -type d | egrep -v "(%{thunderbird.lightning_dir}|xpidl|xpt_dump|xpt_link|libsoftokn3\.so|libnssdbm3\.so|libfreebl3\.so|libfreebl_32int_3\.so|libfreebl_32fpu_3\.so|libfreebl_32int64_3\.so)" | \
%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
# CR 7071032 re-sign these libraries after post process
SHLIBSIGN=%{_builddir}/%name-%version/%{thunderbird.name}/%{thunderbird.moz_objdir}/mozilla/nss/shlibsign
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib/thunderbird $SHLIBSIGN -v -i $RPM_BUILD_ROOT/usr/lib/thunderbird/libsoftokn3.so
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib/thunderbird $SHLIBSIGN -v -i $RPM_BUILD_ROOT/usr/lib/thunderbird/libnssdbm3.so
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib/thunderbird $SHLIBSIGN -v -i $RPM_BUILD_ROOT/usr/lib/thunderbird/libfreebl_32int_3.so
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib/thunderbird $SHLIBSIGN -v -i $RPM_BUILD_ROOT/usr/lib/thunderbird/libfreebl_32fpu_3.so
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib/thunderbird $SHLIBSIGN -v -i $RPM_BUILD_ROOT/usr/lib/thunderbird/libfreebl_32int64_3.so
%else
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib/thunderbird $SHLIBSIGN -v -i $RPM_BUILD_ROOT/usr/lib/thunderbird/libfreebl3.so
# L10n stuff
do
cp $lang.xpi $RPM_BUILD_ROOT/usr/lib/thunderbird/extensions/langpack-$lang@thunderbird.mozilla.org.xpi
done
#########################################
## Package Post[Un] Install Section ##
#########################################
%post
#####################################
## Package Files Section ##
#####################################
%else
- remove -R%{_libdir}/firefox since is not necessary
* Thu Dec 28 2006 - dave.lin@sun.com