1 # 2 # spec file for package SUNWfirefox 3 # 4 # includes module(s): firefox 5 # 6 # Copyright 2007 Sun Microsystems, Inc. 7 # This file and all modifications and additions to the pristine 8 # package are under the same license as the package itself. 9 # 10 # Owner:davelam 11 # 12 # DO NOT REMOVE NEXT LINE 13 # PACKAGE NOT ARC REVIEWED BY SUN JDS TEAM 14 # 15 %include Solaris.inc 16 # use --without-apoc-adapter to disable building apoc adapter 17 # default: not build apoc adapter 18 %define with_apoc_adapter %{?_with_apoc_adapter:1}%{?!_with_apoc_adapter:0} 19 # use --without-moz-nss-nspr to not devlier Mozilla bundled nss, nspr libs 20 # default: with Mozilla bundled nss, nspr libs 21 %define without_moz_nss_nspr %{?_without_moz_nss_nspr:1}%{?!_without_moz_nss_nspr:0} 22 %use firefox = firefox.spec 23 24 ##################################### 25 ## Package Information Section ## 26 ##################################### 27 28 Name: SUNWfirefox 29 Summary: Mozilla Firefox Web browser 30 Version: %{firefox.version} 31 Source: %{name}-manpages-0.1.tar.gz 32 SUNW_BaseDir: %{_basedir} 33 SUNW_Category: FIREFOX,application,%{jds_version} 34 SUNW_Copyright:%{name}.copyright 35 BuildRoot: %{_tmppath}/%{name}-%{version}-build 36 37 ##################################### 38 ## Package Requirements Section ## 39 ##################################### 40 41 %include default-depend.inc 42 Requires: SUNWjdsrm 43 Requires: SUNWj5rt 44 Requires: SUNWgnome-base-libs 45 Requires: SUNWdtbas 46 Requires: SUNWfontconfig 47 Requires: SUNWfreetype2 48 Requires: SUNWgnome-config 49 Requires: SUNWgnome-libs 50 Requires: SUNWgnome-vfs 51 Requires: SUNWlibC 52 Requires: SUNWlibms 53 Requires: SUNWlibmsr 54 BuildRequires: SUNWzip 55 BuildRequires: SUNWgtar 56 BuildRequires: SUNWgnome-config-devel 57 BuildRequires: SUNWgnome-libs-devel 58 BuildRequires: SUNWgnome-vfs-devel 59 BuildRequires: SUNWgnome-component-devel 60 BuildRequires: SUNWgnome-base-libs-devel 61 Requires: SUNWpostrun 62 %if %option_with_indiana_branding 63 Requires: SUNWgetting-started-guide 64 %endif 65 %if %without_moz_nss_nspr 66 Requires: SUNWpr 67 Requires: SUNWprd 68 Requires: SUNWtls 69 Requires: SUNWtlsd 70 %endif 71 Requires: SUNWsqlite3 72 73 ##################################### 74 ## Package Description Section ## 75 ##################################### 76 77 %package devel 78 Summary: %{summary} - development files 79 SUNW_BaseDir: %{_basedir} 80 %include default-depend.inc 81 Requires: %{name} 82 83 %if %with_apoc_adapter 84 %package apoc-adapter 85 Summary: %{summary} - Apoc Adapter 86 SUNW_BaseDir: %{_basedir} 87 %include default-depend.inc 88 Requires: %{name} 89 %endif 90 91 ##################################### 92 ## Package Preparation Section ## 93 ##################################### 94 95 %prep 96 rm -rf %name-%version 97 mkdir -p %name-%version 98 %firefox.prep -d %name-%version 99 cd %{_builddir}/%name-%version 100 gzcat %SOURCE0 | tar xf - 101 102 ##################################### 103 ## Package Build Section ## 104 ##################################### 105 106 %build 107 export PKG_CONFIG_PATH=${_libdir}/pkgconfig:%{_pkg_config_path} 108 LDFLAGS="-z ignore" 109 %if %without_moz_nss_nspr 110 LDFLAGS="$LDFLAGS -R%{_libdir}/mps" 111 %endif 112 export LDFLAGS 113 export CFLAGS="-xlibmopt -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/X11/include" 114 export CXXFLAGS="-xlibmil -xlibmopt -lCrun -lCstd -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" 115 %if %option_with_fox 116 export CFLAGS="$CFLAGS -I/usr/X11/include" 117 %endif 118 119 %firefox.build -d %name-%version 120 121 %install 122 %firefox.install -d %name-%version 123 124 # create file list for SUNWfirefox to separate .autoreg(marked as 'v') 125 # and maybe libmozapoc.so if apoc enabled 126 cd $RPM_BUILD_ROOT%{_libdir} 127 find %{firefox.name} ! -type d | egrep -v "(libmozapoc.so|\.autoreg|xpidl|xpt_dump|xpt_link)" | \ 128 sed -e 's#{#\\{#g' -e 's#}#\\}#g' -e 's#^.*$#%{_libdir}/&#' \ 129 > %{_builddir}/%name-%version/%{name}.list 130 131 rm -rf $RPM_BUILD_ROOT%{_mandir} 132 cd %{_builddir}/%name-%version/sun-manpages 133 make install DESTDIR=$RPM_BUILD_ROOT 134 135 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} 136 137 %clean 138 rm -rf $RPM_BUILD_ROOT 139 140 ######################################### 141 ## Package Post[Un] Install Section ## 142 ######################################### 143 144 %post 145 test -x $BASEDIR/lib/postrun || exit 0 146 ( echo 'test -x /usr/bin/update-desktop-database || exit 0'; 147 echo '/usr/bin/update-desktop-database' 148 ) | $BASEDIR/lib/postrun -b -u -c JDS_wait 149 150 PKGCOND=/usr/bin/pkgcond 151 test -x $PKGCOND || exit 0 152 if $PKGCOND is_path_writable $BASEDIR/lib/%{firefox.name} > /dev/null 2>&1 ; then 153 touch $BASEDIR/lib/%{firefox.name}/.autoreg 154 155 for f in components/compreg.dat components/xpti.dat; do 156 test -f $BASEDIR/lib/%{firefox.name}/$f && \ 157 rm -f $BASEDIR/lib/%{firefox.name}/$f 158 done 159 fi 160 exit 0 161 162 163 %postun 164 test -x $BASEDIR/lib/postrun || exit 0 165 ( echo 'test -x /usr/bin/update-desktop-database || exit 0'; 166 echo '/usr/bin/update-desktop-database' 167 ) | $BASEDIR/lib/postrun -b -u -c JDS 168 169 PKGCOND=/usr/bin/pkgcond 170 test -x $PKGCOND || exit 0 171 if $PKGCOND is_path_writable $BASEDIR/lib/%{firefox.name} > /dev/null 2>&1 ; then 172 for f in components/compreg.dat components/xpti.dat; do 173 test -f $BASEDIR/lib/%{firefox.name}/$f && \ 174 rm -f $BASEDIR/lib/%{firefox.name}/$f 175 done 176 fi 177 exit 0 178 179 180 %if %with_apoc_adapter 181 %post apoc-adapter 182 PKGCOND=/usr/bin/pkgcond 183 test -x $PKGCOND || exit 0 184 if $PKGCOND is_path_writable $BASEDIR/lib/%{firefox.name} > /dev/null 2>&1 ; then 185 touch $BASEDIR/lib/%{firefox.name}/.autoreg 186 187 for f in components/compreg.dat components/xpti.dat; do 188 test -f $BASEDIR/lib/%{firefox.name}/$f && \ 189 rm -f $BASEDIR/lib/%{firefox.name}/$f 190 done 191 fi 192 exit 0 193 194 195 %postun apoc-adapter 196 PKGCOND=/usr/bin/pkgcond 197 test -x $PKGCOND || exit 0 198 if $PKGCOND is_path_writable $BASEDIR/lib/%{firefox.name} > /dev/null 2>&1 ; then 199 touch $BASEDIR/lib/%{firefox.name}/.autoreg 200 201 for f in components/compreg.dat components/xpti.dat; do 202 test -f $BASEDIR/lib/%{firefox.name}/$f && \ 203 rm -f $BASEDIR/lib/%{firefox.name}/$f 204 done 205 fi 206 exit 0 207 208 209 %endif 210 211 %files -f SUNWfirefox.list 212 213 %doc -d firefox README.txt LICENSE 214 %dir %attr (0755, root, other) %{_datadir}/doc 215 216 %defattr(-, root, bin) 217 %dir %attr (0755, root, bin) %{_bindir} 218 %{_bindir}/firefox 219 %dir %attr (0755, root, bin) %{_libdir} 220 %ghost %{_libdir}/%{firefox.name}/.autoreg 221 222 %dir %attr (0755, root, sys) %{_datadir} 223 %dir %attr (0755, root, other) %{_datadir}/applications 224 %{_datadir}/applications/firefox.desktop 225 %dir %attr (0755, root, other) %{_datadir}/pixmaps 226 %{_datadir}/pixmaps/firefox-icon.png 227 %dir %attr (0755, root, bin) %{_mandir} 228 %dir %attr (0755, root, bin) %{_mandir}/man1 229 %{_mandir}/man1/* 230 231 %files devel 232 %defattr(-, root, bin) 233 %dir %attr (0755, root, bin) %{_includedir} 234 %{_includedir}/%{firefox.name} 235 %dir %attr (0755, root, sys) %{_datadir} 236 %{_datadir}/idl/%{firefox.name} 237 %dir %attr (0755, root, other) %{_libdir}/pkgconfig 238 %{_libdir}/pkgconfig/* 239 %{_libdir}/firefox/xpidl 240 %{_libdir}/firefox/xpt_dump 241 %{_libdir}/firefox/xpt_link 242 243 %if %with_apoc_adapter 244 %files apoc-adapter 245 %defattr(-, root, bin) 246 %dir %attr (0755, root, bin) %{_libdir} 247 %{_libdir}/%{firefox.name}/components/libmozapoc.so 248 %endif 249 250 %changelog 251 * Wed Sep 17 2008 - ginn.chen@sun.com 252 - Remove /usr/lib/firefox/components/compreg.dat and /usr/lib/firefox/components/xpti.dat in postinstall and postremove 253 - Touch /usr/lib/firefox/.autoreg in postinstall 254 - Remove staroffice-mime.types.in, staroffice-mailcap.in 255 * Tue Aug 19 2008 - ginn.chen@sun.com 256 - Remove -xldscope=symbolic in CFLAGS, CXXFLAGS, use -xldscope=hidden in libpixman Makefile.in instead 257 * Mon Aug 18 2008 - dave.lin@sun.com 258 - Rename SUNWfirefox3.spec to SUNWfirefox.spec since FF2 has been replaced by FF3 in Nevada and OS for several builds 259 * Fri Aug 15 2008 - dave.lin@sun.com 260 - add -xldscope=symbolic in CFLAGS, CXXFLAGS to fix the cairo crash issue per Brian's request 261 * Thu Jul 17 2008 - dave.lin (at] sun.com 262 - Removed the unnecessary dependency SUNWsolaris-devel-docs(CR6700877), 263 SUNWfirefox. 264 * Thu May 22 2008 - dave.lin (at] sun.com 265 - Change to build pkg only if "--with-ff3" is specified, otherwise build nothing 266 - change to build as "SUNWfirefox" and as default browser 267 * Fri May 16 2008 - damien.carbery (at] sun.com 268 - Disable creation of symlink for firefox 3. This means that ff2 is left as 269 default browser. 270 * Thu Mar 13 2008 - damien.carbery (at] sun.com 271 - Add -I/usr/X11/include to CFLAGS after update of SUNWwinc. 272 * Mon Feb 25 2008 - alfred.peng (at] sun.com 273 - Add "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" in CXXFLAGS to fix CR#6516110 274 * Thu Feb 21 2008 - damien.carbery (at] sun.com 275 - Rename SUNWsqlite dependency to SUNWsqlite3 to match pkg from SFW. 276 * Wed Jan 09 2008 - dave.lin (at] sun.com 277 - renamed FF 3 spec to *firefox3 to let FF 3 coexist with FF 2 278 * Fri Dec 28 2007 - dave.lin (at] sun.com 279 - deliver .autoreg no matter apoc enabled or not 280 * Thu Dec 27 2007 - dave.lin (at] sun.com 281 - move to 3.0 beta2 282 - set not building apoc adapter as default 283 - remove SUNWfirefox-root pkg 284 - disable apoc adapter since it's not available for 3.0 285 * Thu Dec 27 2007 - dave.lin@sun.com 286 - set no apoc-adapter as default 287 * Sat Oct 20 2007 - laca@sun.com 288 - add indiana getting started guide dependency 289 * Fri Oct 12 2007 - laca@sun.com 290 - add /usr/X11/include to CFLAGS if built with FOX 291 * Fri Sep 28 2007 - laca@sun.com 292 - delete Nevada X deps 293 - disable developer guide dep if sun branding is not requested 294 * Tue Aug 21 2007 - dave.lin@sun.com 295 - made postremove/postinstall script more robust(CR#6594606) 296 * Tue Apr 24 2007 - laca@sun.com 297 - s/0755/-/ in defattr so that files are not made all executable 298 * Tue Apr 10 2007 - dave.lin@sun.com 299 - remove dependency on SUNWstaroffice-menuintegration from SUNWfirefox-root 300 since it caused CR#6530982 fixed failed(see details in bugster) 301 * Mon Mar 26 2007 - dave.lin@sun.com 302 - add new package SUNWfirefox-root to fix bug CR#6530982, the package 303 would just add staroffice entries in /etc/mime.types /etc/mailcap 304 in postinstall 305 * Tue Mar 20 2007 - dave.lin@sun.com 306 - fix bug CR#6521792 307 part1: add file ".autoreg" and add postinstall/postremove scripts in 308 SUNWfirefox-apoc-adapter 309 part2: add patch firefox-12-regenerate-compreg-file.diff 310 * Thu Dec 28 2006 - dave.lin@sun.com 311 - remove %preun to fix bug CR#6502253 312 * Fri Dec 8 2006 - laca@sun.com 313 - add SUNWsolaris-devel-docs dependency 314 * Tue Nov 28 2006 - dave.lin@sun.com 315 - add %if %with_apoc_adapter to conditinoally disable apoc adapter, 316 default: enable apoc adapter, use --without-apoc-adapter to disable it 317 * Mon Nov 27 - dave.lin@sun.com 318 - enable apoc adapter(SUNWfirefox-apoc-adapter), CR#6478680 319 * Tue Sep 05 2006 - Matt.Keenan@sun.com 320 - New Manpage tarball 321 * Thu Jul 27 2006 - damien.carbery@sun.com 322 - Remove 'aclocal' dir from %files as it is now empty. 323 * Fri Jul 14 2006 - laca@sun.com 324 - update %post/%postun/etc scripts to support diskless client setup, 325 part of 6448317 326 * Thu Jul 13 2006 - dave.lin@sun.com 327 - add "-lCrun -lCstd" in CXXFLAGS to improve the startup performance 328 * Thu Jun 29 2006 - laca@sun.com 329 - update postrun scripts 330 * Tue Jun 20 2006 - damien.carbery@sun.com 331 - Add SUNWpr and SUNWtls dependencies after check-deps.pl run. 332 * Mon Jun 12 2006 - dave.lin@sun.com 333 - changed to let firefox use nss,nspr in /usr/lib/mps required by ARC 334 - remove -R%{_libdir} 335 * Sun Jun 11 2006 - laca@sun.com 336 - change group from other to bin/sys 337 * Fri Jun 09 2006 - damien.carbery@sun.com 338 - Uncomment man page lines in %files. 339 * Thu Jun 08 2006 - dave.lin@sun.com 340 - add man page prepared by Leon Sha 341 * Thu Apr 13 2006 - dave.lin@sun.com 342 - changed installation location from "/usr/sfw/lib" to "/usr/lib" 343 * Fri Feb 24 2006 - dave.lin@sun.com 344 - Changed package category to FIREFOX 345 - Improved preremove script, using ${BASEDIR} instead of absolute path 346 * Mon Feb 20 2006 - damien.carbery@sun.com 347 - Update Build/Requires after running check-deps.pl script. 348 * Thu Jan 19 2006 - damien.carbery@sun.com 349 - Add BuildRequires SUNWgnome-base-libs-devel. 350 * Sat Dec 3 2005 - laca@sun.com 351 - add %post script that runs update-desktop-database 352 * Fri Dec 02 2005 - damien.carbery@sun.com 353 - Add .autoreg file introduced in 1.5. 354 * Mon Oct 31 2005 - laca@sun.com 355 - Merge share pkgs into base 356 * Mon Oct 24 2005 - damien.carbery@sun.com 357 - Add BuildRequires SUNWgtar because source tarball needs GNU tar. 358 * Mon Sep 26 2005 - halton.huo@sun.com 359 - Change version same with linux verion. 360 * Fri Sep 02 2005 - damien.carbery@sun.com 361 - Correct ownership of %{_libdir}/pkgconfig directory. 362 * Fri Aug 26 2005 - dave.lin@sun.com 363 - initial version of the spec file created 364