Home | History | Annotate | Download | only in gnome-2-16
      1 #
      2 # Copyright (c) Sun Microsystems, Inc.
      3 #
      4 # Owner: davelam
      5 #
      6 #####################################
      7 ##   Package Information Section   ##
      8 #####################################
      9 
     10 Name:        firefox
     11 %define code_name  none
     12 Summary:     Mozilla Firefox Web browser
     13 Version:     2.0.0.3
     14 %define tarball_version 2.0.0.3
     15 Release:     1
     16 Copyright:   MPL/LGPL
     17 Group:       Applications/Internet
     18 Distribution:Java Desktop System
     19 Vendor:      Sun Microsystems, Inc.
     20 Source:      http://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/%{tarball_version}/source/%{name}-%{tarball_version}-source.tar.bz2
     21 Source1:     firefox-icon.png
     22 Source2:     firefox.desktop
     23 Source3:     firefox-rebuild-databases.in
     24 %ifos linux
     25 Source4:     firefox.1
     26 %endif
     27 Source6:     firefox-preload.list.in
     28 %define apoc_tb_version 2.0
     29 Source7:     firefox-%{apoc_tb_version}-apoc-adapter-verm54.tar.bz2
     30 
     31 # owner:davelam date:2005-08-22 type:bug
     32 # change install dir from 'name-version' to 'name'
     33 Patch1:      mozilla-01-change-install-dir.diff
     34 
     35 # owner:laca date:2005-10-14 type:bug
     36 # add -lxpcom_core to libs which fixes the build of yelp
     37 Patch2:      firefox-01-mozilla-config.diff
     38 
     39 # owner:dcarbery date:2005-12-02 type:bug
     40 # change to link fontconfig and Xft libs
     41 Patch3:      firefox-02-font_Xft.diff
     42 
     43 # owner:davelam date:2006-03-31 type:l10n
     44 # change startup script to support multi-language
     45 Patch4:      firefox-06-locale.diff
     46 
     47 # owner:davelam date:2006-06-12 type:bug
     48 # bugster:6428445
     49 Patch5:      firefox-07-plugins.diff
     50 
     51 # owner:davelam date:2005-09-01 type:bug
     52 # let moz patch checker support S10 and S11
     53 Patch6:      mozilla-02-no-patch-checker.diff
     54 
     55 # owner:davelam date:2005-09-05 type:bug
     56 # remove gtar specific options 
     57 Patch7:      mozilla-05-common-tar-option.diff
     58 
     59 # owner:davelam date:2006-02-24 type:bug
     60 # enable firefox preload mechanism
     61 Patch8:      firefox-05-preload.diff
     62 
     63 # owner:davelam date:2006-01-13 type:bug
     64 # let firefox use system bundled nss,nspr
     65 Patch9:      firefox-08-no-nss-nspr.diff
     66 
     67 # owner:davelam date:2006-07-07 type:bug
     68 # comment LD_LIBRARY_PATH setting
     69 Patch10:     mozilla-07-no-ldlibpath.diff
     70 
     71 # owner:davelam date:2006-09-07 type:bug
     72 # remove moz patch checker from package
     73 Patch11:     firefox-09-no-pkg-files.diff
     74 
     75 # owner:hawklu date:2006-11-27 type:bug
     76 # bugster:6478680
     77 # change to enable apoc adapter
     78 Patch12:     firefox-10-enable-apoc-adapter.diff
     79 
     80 # owner:brian.lu:2006-12-07 type:bug
     81 # bugster: 6502311
     82 # add "solaris user guide" to bookmark and default homepage
     83 Patch13:     firefox-11-developer-guide-bookmark.diff
     84 
     85 URL:         http://www.sun.com/software/javadesktopsystem/
     86 
     87 BuildRoot:   %{_tmppath}/%{name}-%{tarball_version}-build
     88 Prefix:      /usr
     89 Provides:    webclient
     90 Autoreqprov: on
     91 
     92 #####################################
     93 ##     Package Defines Section     ##
     94 #####################################
     95 
     96 %define _unpackaged_files_terminate_build 0
     97 %define _ffdir %{_libdir}/%{name}
     98 %define nss_nspr_dir %{_libdir}/mps
     99 
    100 #####################################
    101 ##  Package Requirements Section   ##
    102 #####################################
    103 
    104 BuildRequires: libpng-devel
    105 BuildRequires: libjpeg
    106 BuildRequires: zlib-devel
    107 BuildRequires: zip
    108 BuildRequires: perl
    109 BuildRequires: autoconf
    110 BuildRequires: libIDL-devel
    111 BuildRequires: glib2-devel
    112 BuildRequires: gtk2-devel
    113 Prereq: fileutils perl
    114 Prereq: /usr/bin/killall
    115 
    116 #####################################
    117 ##   Package Description Section   ##
    118 #####################################
    119 
    120 %description
    121 Mozilla Firefox is an open-source web browser, designed for standards
    122 compliance, performance and portability.
    123 
    124 #####################################
    125 ##   Package Preparation Section   ##
    126 #####################################
    127 
    128 %prep
    129 
    130 %setup -q -c -n %{name} -a7
    131 cd ..
    132 /bin/mv %{name} %{name}.tmp.$$
    133 /bin/mv %{name}.tmp.$$/mozilla %{name}
    134 rm -rf %{name}.tmp.$$
    135 cd %{name}
    136 %patch1 -p1
    137 %patch2 -p1
    138 %patch3 -p1
    139 %patch4 -p1
    140 %patch5 -p1
    141 if [ -d extensions/apoc ]; then
    142 %patch12 -p1
    143 fi
    144 %ifos solaris
    145 %patch6 -p1
    146 %patch7 -p1
    147 %patch8 -p0
    148 %patch9 -p1
    149 %patch10 -p1
    150 %patch11 -p1
    151 %patch13 -p1
    152 %endif
    153 
    154 #####################################
    155 ##      Package Build Section      ##
    156 #####################################
    157 
    158 %build
    159 
    160 %ifos linux
    161 if [ -x /usr/bin/getconf ]; then
    162   CPUS=`getconf _NPROCESSORS_ONLN`
    163 fi
    164 %else
    165   CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
    166 %endif
    167 if test "x$CPUS" = "x" -o $CPUS = 0; then
    168   CPUS=1
    169 fi
    170 
    171 cat << "EOF" > .mozconfig
    172 . $topsrcdir/browser/config/mozconfig
    173 mk_add_options BUILD_OFFICIAL=1
    174 mk_add_options MOZILLA_OFFICIAL=1
    175 ac_add_options --prefix=%{_prefix}
    176 ac_add_options --libdir=%{_libdir}
    177 ac_add_options --mandir=%{_mandir} 
    178 ac_add_options --enable-xft
    179 ac_add_options --enable-default-toolkit=gtk2
    180 ac_add_options --enable-svg
    181 ac_add_options --enable-canvas
    182 ac_add_options --disable-static
    183 ac_add_options --enable-shared
    184 ac_add_options --enable-official-branding
    185 ac_add_options --disable-tests
    186 ac_add_options --disable-freetype2
    187 ac_add_options --disable-auto-deps
    188 ac_add_options --disable-debug
    189 EOF
    190 
    191 test -d extensions/apoc && \
    192      echo "ac_add_options --enable-extensions=default,apoc" \
    193          >> .mozconfig 
    194 
    195 # Enable timeline (profiling) features in nightly builds, per Brian Lu.
    196 %{?nightly:echo "ac_add_options --enable-timeline" >> .mozconfig}
    197 
    198 BUILD_OFFICIAL=1 
    199 MOZILLA_OFFICIAL=1
    200 MOZ_PKG_FORMAT=BZ2
    201 PKG_SKIP_STRIP=1
    202 export BUILD_OFFICIAL MOZILLA_OFFICIAL MOZ_PKG_FORMAT PKG_SKIP_STRIP CFLAGS CXXFLAGS
    203 
    204 ./configure
    205 make export
    206 # FIXME: disabled parallel build as it seems to break the build sometimes
    207 make libs
    208 
    209 cd xpinstall/packager
    210 make
    211 
    212 %install
    213 /bin/rm -rf $RPM_BUILD_ROOT
    214 
    215 DESTDIR=$RPM_BUILD_ROOT \
    216     make install
    217 /bin/rm -rf $RPM_BUILD_ROOT%{_ffdir}
    218 BUILDDIR=`pwd`
    219 cd $RPM_BUILD_ROOT%{_libdir}
    220 bzip2 -dc $BUILDDIR/dist/firefox-*.tar.bz2 | tar -xf -
    221 
    222 # Don't deliver nss, nspr header files on Solaris
    223 %ifos linux
    224 # copy the nss files to the right place
    225 mkdir $RPM_BUILD_ROOT%{_includedir}/firefox/nss/
    226 cd ${BUILDDIR}
    227 /usr/bin/find security/nss/lib/ -name '*.h' -type f -exec /bin/cp {} \
    228  $RPM_BUILD_ROOT/%{_includedir}/firefox/nss/ \;
    229 %else
    230 rm -f  $RPM_BUILD_ROOT%{_datadir}/aclocal/nspr.m4
    231 rmdir  $RPM_BUILD_ROOT%{_datadir}/aclocal
    232 rm -f  $RPM_BUILD_ROOT%{_libdir}/pkgconfig/firefox-nss.pc
    233 rm -f  $RPM_BUILD_ROOT%{_libdir}/pkgconfig/firefox-nspr.pc
    234 rm -rf $RPM_BUILD_ROOT/%{_includedir}/firefox/nss
    235 rm -rf $RPM_BUILD_ROOT/%{_includedir}/firefox/pipnss
    236 rm -rf $RPM_BUILD_ROOT/%{_includedir}/firefox/nspr
    237 %endif
    238 
    239 /bin/mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
    240 /bin/mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
    241 /bin/mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
    242 install -c -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/firefox-icon.png
    243 install -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/applications/firefox.desktop
    244 
    245 /bin/mkdir -p $RPM_BUILD_ROOT%{_ffdir}
    246 
    247 %ifos linux
    248 /bin/cat %{SOURCE3} | /usr/bin/sed -e 's,FFDIR,%{_ffdir},g' > \
    249   $RPM_BUILD_ROOT%{_ffdir}/firefox-rebuild-databases
    250 /bin/chmod 755 $RPM_BUILD_ROOT%{_ffdir}/firefox-rebuild-databases
    251 
    252 # install the man page
    253 install -c -m 644  %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/firefox.1
    254 %endif
    255 
    256 /bin/rm -f $RPM_BUILD_ROOT%{_bindir}/firefox
    257 /bin/ln -s ../lib/firefox/firefox $RPM_BUILD_ROOT%{_bindir}/firefox
    258 
    259 # install preloaded library list that would be picked up by gdmprefetch 
    260 /usr/bin/sed -e 's,NSS_NSPR_DIR,%{nss_nspr_dir},g' \
    261              -e 's,FIREFOX_LIB_DIR,%{_ffdir},g' %{SOURCE6} > \
    262   $RPM_BUILD_ROOT%{_ffdir}/firefox-preload.list
    263 %ifarch sparc
    264 echo "%{nss_nspr_dir}/cpu/sparcv8plus/libnspr_flt4.so" >> \
    265   $RPM_BUILD_ROOT%{_ffdir}/firefox-preload.list
    266 %endif
    267 /bin/chmod 644 $RPM_BUILD_ROOT%{_ffdir}/firefox-preload.list
    268 
    269 # create symbol link libnssckbi.so -> /usr/lib/mps/libnssckbi.so
    270 # to fix bug CR#6459752
    271 ln -s ../mps/libnssckbi.so $RPM_BUILD_ROOT%{_ffdir}/libnssckbi.so
    272 
    273 # remove the empty directories 
    274 # cpu/sparcv8plus/libnspr_flt4.so is not packaged 
    275 # since we use system bundled version of nss/nspr
    276 %ifarch sparc
    277 rmdir $RPM_BUILD_ROOT%{_libdir}/firefox/cpu/sparcv8plus
    278 rmdir $RPM_BUILD_ROOT%{_libdir}/firefox/cpu
    279 %endif
    280 
    281 %clean
    282 /bin/rm -rf $RPM_BUILD_ROOT
    283 
    284 #########################################
    285 ##  Package Post[Un] Install Section   ##
    286 #########################################
    287 
    288 %post
    289 # run ldconfig before regxpcom
    290 /sbin/ldconfig >/dev/null 2>/dev/null
    291 
    292 if [ -f %{_ffdir}/firefox-rebuild-databases ]; then
    293   %{_ffdir}/firefox-rebuild-databases
    294 fi
    295 
    296 %postun
    297 /sbin/ldconfig >/dev/null 2>/dev/null
    298 
    299 # was this an upgrade?
    300 if [ $1 -gt 0 ]; then
    301   if [ -f %{_ffdir}/firefox-rebuild-databases ]; then
    302     %{_ffdir}/firefox-rebuild-databases
    303   fi
    304 fi
    305 
    306 %preun
    307 if [ $1 -eq 0 ]; then
    308   /bin/rm -rf %{_ffdir}/chrome/overlayinfo
    309   /bin/rm -f  %{_ffdir}/chrome/*.rdf
    310   /bin/rm -f  %{_ffdir}/components/*.dat
    311   /bin/rm -f  %{_ffdir}/component.reg
    312   /bin/rm -rf %{_ffdir}/extensions
    313   /bin/rm -f  %{_ffdir}/components.ini
    314   /bin/rm -f  %{_ffdir}/defaults.ini
    315 fi
    316 
    317 #####################################
    318 ##      Package Files Section      ##
    319 #####################################
    320 
    321 %files
    322 %defattr(-,root,root)
    323 %dir %{_ffdir}
    324 %{_ffdir}/*
    325 %{_bindir}/firefox
    326 %{_mandir}/man1/*
    327 %{_datadir}/applications/%{name}.desktop
    328 %{_datadir}/pixmaps/%{name}-icon.png
    329 
    330 %changelog
    331 * Wed Mar 21 2007 - dave.lin@sun.com
    332 - bump version to 2.0.0.3(CR#6526694)
    333 * Fri Jan -5 2007 - dave.lin@sun.com
    334 - Bump version to 2.0.0.1(CR#6508381)
    335 * Thu Dec 07 2006 - brian.lu@sun.com
    336 - Add "solaris developer guide" to bookmark and default home page etc
    337 * Wed Nov 29 2006 - damien.carbery@sun.com
    338 - Port in %install changes from trunk to fix build error (to delete two empty
    339   dirs).
    340 * Mon Nov 27 2006 - dave.lin@sun.com
    341 - enable apoc adapter(CR#6478680)
    342 - move manpage related part in "%ifos linux" since SUNWfirefox.spec
    343   would cover that on Solaris
    344 * Fri Nov 17 2006 - dave.lin@sun.com
    345 - add patch comments
    346 * Wed Oct 25 2006 - dave.lin@sun.com
    347 - bump verion to 2.0(official release)
    348 * Fri Oct 20 2006 - dave.lin@sun.com
    349 - bump version to 2.0rc3
    350 * Mon Oct 09 2006 - dave.lin@sun.com
    351 - bump version to 2.0rc2
    352 * Thu Sep 07 2006 - dave.lin@sun.com
    353 - add patch firefox-09-no-pkg-files.diff to remove patch checker scripts 
    354   since it's unnecessary to deliver them with the bundled version
    355 - change the version 2.0bx to 2.0 to comply WOS integration rules
    356 - re-organize the patch list 
    357 * Mon Sep 04 2006 - dave.lin (at] sun.com
    358 - bump version to 2.0 beta 2
    359 * Mon Aug 28 2006 - dave.lin (at] sun.com
    360 - create symbol link libnssckbi.so -> /usr/lib/mps/libnssckbi.so
    361   to fix bug CR#6459752
    362 * Tue Aug 08 2006 - dave.lin (at] sun.com
    363 - bump version to 2.0b1
    364 - remove the patch mozilla-03-s11s-smkfl.diff, mozilla-04-s11x-smkfl.diff,
    365   firefox-03-yelp-hang.diff which have been fixed in 2.0b1
    366 - change to xpinstall/packager to run make to make the binary tarball
    367 * Tue Aug 08 2006 - dave.lin (at] sun.com
    368 - fixed the preload list problem
    369 * Thu Jul 27 2006 - damien.carbery (at] sun.com
    370 - Remove 'aclocal' dir from %files as it is now empty.
    371 * Wed Jul 26 2006 - matt.keenan (at] sun.com
    372 - Remove firefox-10-gecko.m4.diff : yelp uses local copy now, and re-shuffled
    373   the rest of the firefox-* patches to be in sequence.
    374 * Fri Jul 07 2006 - dave.lin (at] sun.com
    375 - add patch mozilla-07-no-ldlibpath.diff to remove the LD_LIBRARY_PATH in
    376   the startup script
    377 * Tue Jun 13 2006 - dave.lin (at] sun.com
    378 - add patch firefox-15-no-nss-nspr.diff to let firefox use nss, nspr in 
    379   /usr/lib/mps required by ARC
    380 - remove all nss, nspr header files in development package
    381 * Mon Jun 12 2006 - dave.lin (at] sun.com
    382 - add patch firefox-14-plugins.diff to add Mozilla plugins direcotry
    383   (/usr/sfw/lib/mozilla/plugins) in Firefox plugin searching path(CR#6428445)
    384 * Fri Jun 02 2006 - dave.lin (at] sun.com
    385 - bump src version to 1.5.0.4
    386 * Mon May 08 2006 - dave.lin (at] sun.com
    387 - bump src version to 1.5.0.3
    388 * Fri Apr 28 2006 - dave.lin (at] sun.com
    389 - remove patch mozilla-06-skip-strip.diff, use another simple way to skip
    390   strip instead, setting PKG_SKIP_STRIP=1
    391 * Fri Apr 21 2006 - dave.lin (at] sun.com
    392 - switch back to 1.5.0.2 since we're not get ARC approved yet
    393 * Fri Apr 14 2006 - dave.lin@sun.com
    394 - removed firefox-chrome-lang.txt per l10n team's request, firefox uses new
    395   strategy to register chrome entries, so this file is useless
    396 * Thu Apr 13 2006 - davelin (at] sun.com
    397 - Changed the installation location from "/usr/sfw/lib" to "/usr/lib"
    398   on Solaris
    399 
    400 * Tue Apr 04 2006 - dave.lin (at] sun.com
    401 - Bump version to 2.0 alpha1
    402 - Remove Patch3,4,11 which have been upstreamed into this version
    403 - Add patch mozilla-06-skip-strip.diff to make no stripped libraries 
    404 
    405 * Fri Mar 31 2006 - dave.lin (at] sun.com
    406 - Add patch firefox-13-locale.diff to make firefox automatically
    407   pick up locale setting from user environment and start up in
    408   that locale
    409 
    410 * Fri Feb 24 2006 - dave.lin (at] sun.com
    411 - Add patch firefox-11-new-tab.diff to fix CR6368789
    412 - Add patch firefox-12-preload.diff and extra source file 
    413   firefox-preload.list.in to enable firefox preload mechanism
    414 - Remove useless file firefox-rebuild-databases since it's only
    415   for Linux
    416 - Remove useless sources and patch
    417 
    418 * Thu Dec 15 2005 - dave.lin@sun.com
    419 - Add patch firefox-09-yelp-hang.diff to fix yelp hang problem.
    420 
    421 * Fri Dec 02 2005 - damien.carbery@sun.com
    422 - Add Makefile.in patch to link fontconfig and Xft libraries.
    423 - make from top directory to build nsIconChannel.o.
    424 
    425 * Fri Dec 02 2005 - dave.lin@sun.com
    426 - Bump tarball version to 1.5.
    427 - Modify the configuration options
    428 
    429 * Fri Nov 11 2005 - dave.lin@sun.com
    430 - Bump tarball version to 1.5rc3.
    431 
    432 * Fri Nov 11 2005 - halton.huo@sun.com
    433 - Bump tarball version to 1.5rc2.
    434 
    435 * Tue Nov 08 2005 - dave.lin@sun.com
    436 - Bump tarball version to 1.5rc1
    437 - Remove the patch mozilla-07-bz307041.diff since it's upstreamed in 1.5rc1 already
    438 - Enalbe '--enalbe-timeline' in nightly builds
    439 
    440 * Thu Nov  1 2005 - laca (at] sun.com
    441 - change version to numeric and introduce %tarball_version
    442 
    443 * Fri Oct 21 2005 - dave.lin (at] sun.com
    444 - Update version from 1.5b1 to 1.5b2 and add patch 307041 from bugzilla
    445 - Change configure option per Leo Sha from developer team
    446 - Add nss header file in development package
    447 
    448 * Mon Sep 26 2005 - <halton.huo (at] sun.com>
    449 - Bump to 1.5b1.
    450 - Move dir mozilla to firefox after tarball unpacking.
    451 
    452 * Mon Sep 12 2005 - <laca (at] sun.com>
    453 - get rid of %builddir as it would be different on Solaris
    454 
    455 * Thu Sep 08 2005 - damien.carbery (at] sun.com
    456 - Change BuildPrereq to BuildRequires, a format that build-gnome2 understands.
    457 
    458 * Mon Sep 05 2005 - Dave Lin <dave.lin (at] sun.com>
    459 - Add patches to remove the specific gtar options 
    460 - Set MOZ_PKG_FORMAT=BZ2 to keep consistent of tarball
    461   format between linux and solaris
    462 
    463 * Fri Sep 01 2005 - damien.carbery (at] sun.com
    464 - Change gtar to tar; add two necessary mkdir's.
    465  
    466 * Mon Aug 22 2005 Dave Lin <dave.lin@sun.com>
    467 - initial version of the spec file created
    468 
    469