firefox.spec revision 10340
10139N/A#
10139N/A# Copyright (c) Sun Microsystems, Inc.
10139N/A#
10139N/A# Owner: davelam
10139N/A#
18953N/A#####################################
10139N/A## Package Information Section ##
10139N/A#####################################
10139N/A
17185N/AName: firefox
10139N/A%define code_name none
10139N/ASummary: Mozilla Firefox Web browser
10139N/AVersion: 2.0.0.3
17176N/A%define tarball_version 2.0.0.3
17176N/ARelease: 1
10139N/ACopyright: MPL/LGPL
10139N/AGroup: Applications/Internet
20321N/ADistribution:Java Desktop System
10139N/AVendor: Sun Microsystems, Inc.
10139N/ASource: http://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{tarball_version}/source/%{name}-%{tarball_version}-source.tar.bz2
18688N/ASource1: firefox-icon.png
18688N/ASource2: firefox.desktop
10139N/A%ifos linux
19013N/ASource4: firefox.1
19016N/A%endif
18593N/ASource6: firefox-preload.list.in
18953N/A%define with_apoc_adapter %{?!_without_apoc_adapter:1}%{?_without_apoc_adapter:0}
10139N/A%if %with_apoc_adapter
10139N/A%define apoc_tb_version 2.0
12636N/ASource7: firefox-%{apoc_tb_version}-apoc-adapter-verm54.tar.bz2
10139N/A%endif
10139N/A
10139N/A# owner:davelam date:2005-08-22 type:branding
19142N/A# change install dir from 'name-version' to 'name'
10139N/APatch1: mozilla-01-change-install-dir.diff
10139N/A
16584N/A# owner:laca date:2005-10-14 type:branding
10139N/A# add -lxpcom_core to libs which fixes the build of yelp
10139N/APatch2: firefox-01-mozilla-config.diff
10139N/A
10139N/A# owner:davelam date:2006-03-31 type:branding
10139N/A# change startup script to support multi-language
19142N/APatch3: firefox-06-locale.diff
10139N/A
10532N/A# owner:davelam date:2006-06-12 type:bug
10139N/A# bugster:6428445
10139N/APatch4: firefox-07-plugins.diff
10139N/A
10139N/A# owner:davelam date:2005-09-01 type:branding
10139N/A# let moz patch checker support S10 and S11
10139N/APatch5: mozilla-02-no-patch-checker.diff
10139N/A
10139N/A# owner:davelam date:2005-09-05 type:branding
17049N/A# remove gtar specific options
10139N/APatch6: mozilla-05-common-tar-option.diff
10139N/A
10139N/A# owner:davelam date:2006-02-24 type:branding
10139N/A# enable firefox preload mechanism
10139N/APatch7: firefox-05-preload.diff
10139N/A
10139N/A# owner:davelam date:2006-01-13 type:branding
10139N/A# let firefox use system bundled nss,nspr
10139N/APatch8: firefox-08-no-nss-nspr.diff
10139N/A
10139N/A# owner:davelam date:2006-07-07 type:branding
10139N/A# comment LD_LIBRARY_PATH setting
10139N/APatch9: mozilla-07-no-ldlibpath.diff
10139N/A
10139N/A# owner:davelam date:2006-09-07 type:branding
10139N/A# remove moz patch checker from package
10139N/APatch10: firefox-09-no-pkg-files.diff
10139N/A
10139N/A
10139N/A# owner:hawklu date:2006-11-27 type:bug
10139N/A# bugster:6478680
10139N/A# change to enable apoc adapter
10139N/A%if %with_apoc_adapter
10139N/APatch11: firefox-10-enable-apoc-adapter.diff
10139N/A%endif
10139N/A
10139N/A# owner:hawklu date:2006-12-07 type:branding
10139N/A# add "solaris user guide" to bookmark and default homepage
10139N/APatch12: firefox-11-developer-guide-bookmark.diff
10139N/A
10139N/A# owner:dcarbery date:2007-02-12 type:branding
10139N/APatch13: firefox-02-xpcom-mps-dir.diff
10139N/A
10139N/A# owner:hawklu date:2007-03-20 type:branding
10139N/A# bugster: 6521792
10139N/A%if %with_apoc_adapter
10139N/APatch14: firefox-12-regenerate-compreg-file.diff
10139N/A%endif
10139N/A
10139N/AURL: http://www.sun.com/software/javadesktopsystem/
10139N/A
10139N/ABuildRoot: %{_tmppath}/%{name}-%{tarball_version}-build
10139N/APrefix: /usr
10139N/AProvides: webclient
10139N/AAutoreqprov: on
10139N/A
10139N/A#####################################
10139N/A## Package Defines Section ##
10139N/A#####################################
10139N/A
10139N/A%define _unpackaged_files_terminate_build 0
10139N/A%define _ffdir %{_libdir}/%{name}
10139N/A%define nss_nspr_dir %{_libdir}/mps
10139N/A
10139N/A#####################################
10139N/A## Package Requirements Section ##
10139N/A#####################################
10139N/A
10139N/ABuildRequires: libpng-devel
10139N/ABuildRequires: libjpeg
10139N/ABuildRequires: zlib-devel
10139N/ABuildRequires: zip
10139N/ABuildRequires: perl
10139N/ABuildRequires: autoconf
10139N/ABuildRequires: libIDL-devel
10139N/ABuildRequires: glib2-devel
10139N/ABuildRequires: gtk2-devel
10139N/APrereq: fileutils perl
10139N/APrereq: /usr/bin/killall
10139N/A
10139N/A#####################################
10139N/A## Package Description Section ##
10139N/A#####################################
10139N/A
10139N/A%description
10139N/AMozilla Firefox is an open-source web browser, designed for standards
10139N/Acompliance, performance and portability.
10139N/A
10139N/A#####################################
10139N/A## Package Preparation Section ##
10139N/A#####################################
10139N/A
10139N/A%prep
10139N/A
10139N/A%if %with_apoc_adapter
10139N/A%setup -q -c -n %{name} -a7
10139N/A%else
10139N/A%setup -q -c -n %{name}
10139N/A%endif
10139N/A
10139N/Acd ..
10139N/A/bin/mv %{name} %{name}.tmp.$$
10139N/A/bin/mv %{name}.tmp.$$/mozilla %{name}
10139N/Arm -rf %{name}.tmp.$$
10139N/Acd %{name}
10139N/A%patch1 -p1
10139N/A%patch2 -p1
10139N/A%patch3 -p1
10139N/A%patch4 -p1
10139N/A%if %with_apoc_adapter
10139N/A%patch11 -p1
10139N/A%patch14 -p1
10139N/A%endif
10139N/A%ifos solaris
10139N/A%patch5 -p1
10139N/A%patch6 -p1
10139N/A%patch7 -p1
10139N/A%patch8 -p1
10139N/A%patch9 -p1
10139N/A%patch10 -p1
20213N/A%patch12 -p1
20213N/A%patch13 -p1
18953N/A%endif
18953N/A
18850N/A#####################################
18850N/A## Package Build Section ##
17134N/A#####################################
17134N/A
17049N/A%build
17049N/A
16770N/A%ifos linux
16770N/Aif [ -x /usr/bin/getconf ]; then
16584N/A CPUS=`getconf _NPROCESSORS_ONLN`
16584N/Afi
14143N/A%else
14143N/A CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
12636N/A%endif
12636N/Aif test "x$CPUS" = "x" -o $CPUS = 0; then
10532N/A CPUS=1
10532N/Afi
10307N/A
10307N/Acat << "EOF" > .mozconfig
10139N/A. $topsrcdir/browser/config/mozconfig
10139N/Amk_add_options BUILD_OFFICIAL=1
10139N/Amk_add_options MOZILLA_OFFICIAL=1
10139N/Aac_add_options --prefix=%{_prefix}
10139N/Aac_add_options --libdir=%{_libdir}
10139N/Aac_add_options --mandir=%{_mandir}
10139N/Aac_add_options --enable-xft
10139N/Aac_add_options --enable-default-toolkit=gtk2
10139N/Aac_add_options --enable-svg
10139N/Aac_add_options --enable-canvas
10139N/Aac_add_options --disable-static
10139N/Aac_add_options --enable-shared
10139N/Aac_add_options --enable-official-branding
10139N/Aac_add_options --enable-xinerama
10139N/Aac_add_options --disable-tests
10139N/Aac_add_options --disable-freetype2
10139N/Aac_add_options --disable-auto-deps
10139N/Aac_add_options --disable-debug
10139N/AEOF
10139N/A
10139N/A%if %with_apoc_adapter
10139N/Aecho "ac_add_options --enable-extensions=default,apoc" >> .mozconfig
10139N/A%endif
10139N/A
10139N/A# Enable timeline (profiling) features in nightly builds, per Brian Lu.
10139N/A%{?nightly:echo "ac_add_options --enable-timeline" >> .mozconfig}
10139N/A
10139N/ABUILD_OFFICIAL=1
10139N/AMOZILLA_OFFICIAL=1
10139N/AMOZ_PKG_FORMAT=BZ2
10139N/APKG_SKIP_STRIP=1
10139N/Aexport BUILD_OFFICIAL MOZILLA_OFFICIAL MOZ_PKG_FORMAT PKG_SKIP_STRIP CFLAGS CXXFLAGS
10139N/A
10139N/A./configure
10139N/Amake export
10139N/A# FIXME: disabled parallel build as it seems to break the build sometimes
10139N/Amake libs
10139N/A
10139N/Acd xpinstall/packager
10139N/Amake
10139N/A
10139N/A%install
10139N/A/bin/rm -rf $RPM_BUILD_ROOT
10139N/A
10139N/ADESTDIR=$RPM_BUILD_ROOT \
10139N/A make install
10139N/A/bin/rm -rf $RPM_BUILD_ROOT%{_ffdir}
10139N/ABUILDDIR=`pwd`
10139N/Acd $RPM_BUILD_ROOT%{_libdir}
10139N/Abzip2 -dc $BUILDDIR/dist/firefox-*.tar.bz2 | tar -xf -
19450N/A
19767N/A# Don't deliver nss, nspr header files on Solaris
%ifos linux
# copy the nss files to the right place
mkdir $RPM_BUILD_ROOT%{_includedir}/firefox/nss/
cd ${BUILDDIR}
/usr/bin/find security/nss/lib/ -name '*.h' -type f -exec /bin/cp {} \
$RPM_BUILD_ROOT/%{_includedir}/firefox/nss/ \;
%else
rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/nspr.m4
rmdir $RPM_BUILD_ROOT%{_datadir}/aclocal
rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/firefox-nss.pc
rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/firefox-nspr.pc
rm -rf $RPM_BUILD_ROOT/%{_includedir}/firefox/nss
rm -rf $RPM_BUILD_ROOT/%{_includedir}/firefox/pipnss
rm -rf $RPM_BUILD_ROOT/%{_includedir}/firefox/nspr
%endif
/bin/mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
/bin/mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
/bin/mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -c -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/firefox-icon.png
install -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/applications/firefox.desktop
/bin/mkdir -p $RPM_BUILD_ROOT%{_ffdir}
%ifos linux
# install the man page
install -c -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/firefox.1
%endif
/bin/rm -f $RPM_BUILD_ROOT%{_bindir}/firefox
/bin/ln -s ../lib/firefox/firefox $RPM_BUILD_ROOT%{_bindir}/firefox
# install preloaded library list that would be picked up by gdmprefetch
/usr/bin/sed -e 's,NSS_NSPR_DIR,%{nss_nspr_dir},g' \
-e 's,FIREFOX_LIB_DIR,%{_ffdir},g' %{SOURCE6} > \
$RPM_BUILD_ROOT%{_ffdir}/firefox-preload.list
%ifarch sparc
echo "%{nss_nspr_dir}/cpu/sparcv8plus/libnspr_flt4.so" >> \
$RPM_BUILD_ROOT%{_ffdir}/firefox-preload.list
%endif
/bin/chmod 644 $RPM_BUILD_ROOT%{_ffdir}/firefox-preload.list
# create symbol link libnssckbi.so -> /usr/lib/mps/libnssckbi.so
# to fix bug CR#6459752
ln -s ../mps/libnssckbi.so $RPM_BUILD_ROOT%{_ffdir}/libnssckbi.so
# 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%{_libdir}/firefox/cpu/sparcv8plus
rmdir $RPM_BUILD_ROOT%{_libdir}/firefox/cpu
%endif
%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
#####################################
## Package Files Section ##
#####################################
%files
%defattr(-,root,root)
%dir %{_ffdir}
%{_ffdir}/*
%{_bindir}/firefox
%{_mandir}/man1/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}-icon.png
%changelog
* Wed Mar 21 2007 - dave.lin@sun.com
- bump to 2.0.0.3
* Tue Mar 20 2007 - dave.lin@sun.com
- fix bug CR#6521792
part1: add file ".autoreg" and add postinstall/postremove scripts in
SUNWfirefox-apoc-adapter
part2: add patch firefox-12-regenerate-compreg-file.diff
* Sat Mar 03 2007 - dave.lin@sun.com
- removed patch firefox-12-bookmark-drag-and-drop.diff which has been
upstreamed in 2.0.0.2
* Mon Feb 26 2007 - dave.lin@sun.com
- bump version to 2.0.0.2
* Mon Feb 12 2007 - damien.carbery@sun.com
- Add patch, 02-xpcom-mps.diff, to add '-I/usr/include/mps' to firefox-xpcom.pc
to allow totem to find prtypes.h (as nscore.h includes this).
* Mon Feb 05 2007 - brian.lu@sun.com
- fix bug CR6519241:bookmark drag and drop crash firefox
- bugzilla id 367203. The patch has been put into upstream
* Fri Jan 26 2007 - dave.lin@sun.com
- enable xinerama support to fix bug CR6507236
* Thu Jan 18 2007 - damien.carbery@sun.com
- Fix 'patch7 -p0' - change to -p1 and change patch file too.
* Wed Jan 17 2007 - damien.carbery@sun.com
- Remove unneeded patch, firefox-02-font_Xft.diff.
* Fri Jan 05 2007 - dave.lin@sun.com
- remove firefox-rebuild-databases and %preun since it's unnecessary for
Firefox 2.0
* Thu Dec 28 2006 - dave.lin@sun.com
- change the patch type to branding for some patches in patch comments
- bump version to 2.0.0.1
* Thu Dec 07 2006 - brian.lu@sun.com
- Add "solaris developer guide" to bookmark and default home page etc
* Wed Nov 29 2006 - damien.carbery@sun.com
- Correct path to sparcv8plus dir. Enclose code within '%ifarch sparc'.
* Tue Nov 28 2006 - dave.lin@sun.com
- add %if %with_apoc_adapter to conditinoally disable building apoc
adapter, default: build apoc adapter, use
--without-apoc-adapter to disable it
- remove empty firefox/cpu/sparcv8plus and firefox/cpu
* Mon Nov 27 2006 - dave.lin@sun.com
- enable apoc adapter(CR#6478680)
- move manpage related part in "%ifos linux" since SUNWfirefox.spec
would cover that on Solaris
* Fri Nov 17 2006 - dave.lin@sun.com
- add patch comments
* Wed Oct 25 2006 - dave.lin@sun.com
- bump verion to 2.0(official release)
* Fri Oct 20 2006 - dave.lin@sun.com
- bump version to 2.0rc3
* Mon Oct 09 2006 - dave.lin@sun.com
- bump version to 2.0rc2
* Thu Sep 07 2006 - dave.lin@sun.com
- add patch firefox-09-no-pkg-files.diff to remove patch checker scripts
since it's unnecessary to deliver them with the bundled version
- change the version 2.0bx to 2.0 to comply WOS integration rules
- re-organize the patch list
* Mon Sep 04 2006 - dave.lin@sun.com
- bump version to 2.0 beta 2
* Mon Aug 28 2006 - dave.lin@sun.com
- create symbol link libnssckbi.so -> /usr/lib/mps/libnssckbi.so
to fix bug CR#6459752
* Tue Aug 08 2006 - dave.lin@sun.com
- bump version to 2.0b1
- remove the patch mozilla-03-s11s-smkfl.diff, mozilla-04-s11x-smkfl.diff,
firefox-03-yelp-hang.diff which have been fixed in 2.0b1
- change to xpinstall/packager to run make to make the binary tarball
* Tue Aug 08 2006 - dave.lin@sun.com
- fixed the preload list problem
* Thu Jul 27 2006 - damien.carbery@sun.com
- Remove 'aclocal' dir from %files as it is now empty.
* Wed Jul 26 2006 - matt.keenan@sun.com
- Remove firefox-10-gecko.m4.diff : yelp uses local copy now, and re-shuffled
the rest of the firefox-* patches to be in sequence.
* Fri Jul 07 2006 - dave.lin@sun.com
- add patch mozilla-07-no-ldlibpath.diff to remove the LD_LIBRARY_PATH in
the startup script
* Tue Jun 13 2006 - dave.lin@sun.com
- add patch firefox-15-no-nss-nspr.diff to let firefox use nss, nspr in
/usr/lib/mps required by ARC
- remove all nss, nspr header files in development package
* Mon Jun 12 2006 - dave.lin@sun.com
- add patch firefox-14-plugins.diff to add Mozilla plugins direcotry
(/usr/sfw/lib/mozilla/plugins) in Firefox plugin searching path(CR#6428445)
* Fri Jun 02 2006 - dave.lin@sun.com
- bump src version to 1.5.0.4
* Mon May 08 2006 - dave.lin@sun.com
- bump src version to 1.5.0.3
* Fri Apr 28 2006 - dave.lin@sun.com
- remove patch mozilla-06-skip-strip.diff, use another simple way to skip
strip instead, setting PKG_SKIP_STRIP=1
* Fri Apr 21 2006 - dave.lin@sun.com
- switch back to 1.5.0.2 since we're not get ARC approved yet
* Fri Apr 14 2006 - dave.lin@sun.com
- removed firefox-chrome-lang.txt per l10n team's request, firefox uses new
strategy to register chrome entries, so this file is useless
* Thu Apr 13 2006 - davelin@sun.com
- Changed the installation location from "/usr/sfw/lib" to "/usr/lib"
on Solaris
* Tue Apr 04 2006 - dave.lin@sun.com
- Bump version to 2.0 alpha1
- Remove Patch3,4,11 which have been upstreamed into this version
- Add patch mozilla-06-skip-strip.diff to make no stripped libraries
* Fri Mar 31 2006 - dave.lin@sun.com
- Add patch firefox-13-locale.diff to make firefox automatically
pick up locale setting from user environment and start up in
that locale
* Fri Feb 24 2006 - dave.lin@sun.com
- Add patch firefox-11-new-tab.diff to fix CR6368789
- Add patch firefox-12-preload.diff and extra source file
firefox-preload.list.in to enable firefox preload mechanism
- Remove useless file firefox-rebuild-databases since it's only
for Linux
- Remove useless sources and patch
* Thu Dec 15 2005 - dave.lin@sun.com
- Add patch firefox-09-yelp-hang.diff to fix yelp hang problem.
* Fri Dec 02 2005 - damien.carbery@sun.com
- Add Makefile.in patch to link fontconfig and Xft libraries.
- make from top directory to build nsIconChannel.o.
* Fri Dec 02 2005 - dave.lin@sun.com
- Bump tarball version to 1.5.
- Modify the configuration options
* Fri Nov 11 2005 - dave.lin@sun.com
- Bump tarball version to 1.5rc3.
* Fri Nov 11 2005 - halton.huo@sun.com
- Bump tarball version to 1.5rc2.
* Tue Nov 08 2005 - dave.lin@sun.com
- Bump tarball version to 1.5rc1
- Remove the patch mozilla-07-bz307041.diff since it's upstreamed in 1.5rc1 already
- Enalbe '--enalbe-timeline' in nightly builds
* Thu Nov 1 2005 - laca@sun.com
- change version to numeric and introduce %tarball_version
* Fri Oct 21 2005 - dave.lin@sun.com
- Update version from 1.5b1 to 1.5b2 and add patch 307041 from bugzilla
- Change configure option per Leo Sha from developer team
- Add nss header file in development package
* Mon Sep 26 2005 - <halton.huo@sun.com>
- Bump to 1.5b1.
- Move dir mozilla to firefox after tarball unpacking.
* Mon Sep 12 2005 - <laca@sun.com>
- get rid of %builddir as it would be different on Solaris
* Thu Sep 08 2005 - damien.carbery@sun.com
- Change BuildPrereq to BuildRequires, a format that build-gnome2 understands.
* Mon Sep 05 2005 - Dave Lin <dave.lin@sun.com>
- 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 01 2005 - damien.carbery@sun.com
- Change gtar to tar; add two necessary mkdir's.
* Mon Aug 22 2005 Dave Lin <dave.lin@sun.com>
- initial version of the spec file created