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