MozillaFirefox/MozillaFirefox.spec
branchesr24
changeset 679 9fdff72b18fd
parent 678 d0329e10d68c
child 684 7627f28354d4
equal deleted inserted replaced
678:d0329e10d68c 679:9fdff72b18fd
     1 #
       
     2 # spec file for package MozillaFirefox
       
     3 #
       
     4 # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
       
     5 #               2006-2013 Wolfgang Rosenauer
       
     6 #
       
     7 # All modifications and additions to the file contributed by third parties
       
     8 # remain the property of their copyright owners, unless otherwise agreed
       
     9 # upon. The license for this file, and modifications and additions to the
       
    10 # file, is the same license as for the pristine package itself (unless the
       
    11 # license for the pristine package is not an Open Source License, in which
       
    12 # case the license is the MIT License). An "Open Source License" is a
       
    13 # license that conforms to the Open Source Definition (Version 1.9)
       
    14 # published by the Open Source Initiative.
       
    15 
       
    16 # Please submit bugfixes or comments via http://bugs.opensuse.org/
       
    17 #
       
    18 
       
    19 
       
    20 %define major 24
       
    21 %define mainver %major.0
       
    22 %define update_channel release
       
    23 
       
    24 %if %suse_version > 1220
       
    25 %define gstreamer_ver 0.10
       
    26 %else
       
    27 %define gstreamer_ver 0.10
       
    28 %endif
       
    29 
       
    30 Name:           MozillaFirefox
       
    31 BuildRequires:  Mesa-devel
       
    32 BuildRequires:  autoconf213
       
    33 BuildRequires:  dbus-1-glib-devel
       
    34 BuildRequires:  fdupes
       
    35 BuildRequires:  gcc-c++
       
    36 BuildRequires:  libcurl-devel
       
    37 BuildRequires:  libgnomeui-devel
       
    38 BuildRequires:  libidl-devel
       
    39 BuildRequires:  libnotify-devel
       
    40 BuildRequires:  python
       
    41 BuildRequires:  startup-notification-devel
       
    42 BuildRequires:  unzip
       
    43 BuildRequires:  update-desktop-files
       
    44 BuildRequires:  xorg-x11-libXt-devel
       
    45 BuildRequires:  yasm
       
    46 BuildRequires:  zip
       
    47 %if %suse_version > 1110
       
    48 BuildRequires:  libiw-devel
       
    49 BuildRequires:  libproxy-devel
       
    50 %else
       
    51 BuildRequires:  wireless-tools
       
    52 %endif
       
    53 BuildRequires:  mozilla-nspr-devel >= 4.10
       
    54 BuildRequires:  mozilla-nss-devel >= 3.15.1
       
    55 BuildRequires:  nss-shared-helper-devel
       
    56 %if %suse_version > 1210
       
    57 BuildRequires:  pkgconfig(gstreamer-%gstreamer_ver)
       
    58 BuildRequires:  pkgconfig(gstreamer-app-%gstreamer_ver)
       
    59 BuildRequires:  pkgconfig(gstreamer-plugins-base-%gstreamer_ver)
       
    60 Requires:       libgstreamer-0_10-0
       
    61 Recommends:     gstreamer-0_10-fluendo-mp3
       
    62 Recommends:     gstreamer-0_10-plugins-ffmpeg
       
    63 %endif
       
    64 Version:        %{mainver}
       
    65 Release:        0
       
    66 %define         releasedate 2013091200
       
    67 Provides:       firefox = %{mainver}
       
    68 Provides:       firefox = %{version}-%{release}
       
    69 Provides:       web_browser
       
    70 Provides:       browser(npapi)
       
    71 # this is needed to match this package with the kde4 helper package without the main package
       
    72 # having a hard requirement on the kde4 package
       
    73 %define kde_helper_version 6
       
    74 Provides:       mozilla-kde4-version = %{kde_helper_version}
       
    75 Summary:        Mozilla Firefox Web Browser
       
    76 License:        MPL-2.0
       
    77 Group:          Productivity/Networking/Web/Browsers
       
    78 Url:            http://www.mozilla.org/
       
    79 Source:         firefox-%{version}-source.tar.bz2
       
    80 Source1:        MozillaFirefox.desktop
       
    81 Source2:        MozillaFirefox-rpmlintrc
       
    82 Source3:        mozilla.sh.in
       
    83 Source4:        find-external-requires.sh
       
    84 Source5:        source-stamp.txt
       
    85 Source6:        kde.js
       
    86 Source7:        l10n-%{version}.tar.bz2
       
    87 Source8:        firefox-mimeinfo.xml
       
    88 Source9:        firefox.js
       
    89 Source10:       compare-locales.tar.bz2
       
    90 Source11:       firefox.1
       
    91 Source12:       mozilla-get-app-id
       
    92 Source13:       add-plugins.sh.in
       
    93 Source14:       create-tar.sh
       
    94 Source15:       gecko.js
       
    95 # Gecko/Toolkit
       
    96 Patch1:         toolkit-download-folder.patch
       
    97 Patch2:         mozilla-nongnome-proxies.patch
       
    98 Patch3:         mozilla-prefer_plugin_pref.patch
       
    99 Patch4:         mozilla-shared-nss-db.patch
       
   100 Patch5:         mozilla-kde.patch
       
   101 Patch6:         mozilla-preferences.patch
       
   102 Patch7:         mozilla-language.patch
       
   103 Patch8:         mozilla-ntlm-full-path.patch
       
   104 Patch9:         mozilla-repo.patch
       
   105 Patch10:        mozilla-sle11.patch
       
   106 Patch12:        mozilla-arm-disable-edsp.patch
       
   107 Patch13:        mozilla-ppc.patch
       
   108 Patch14:        mozilla-libproxy-compat.patch
       
   109 # Firefox/browser
       
   110 Patch30:        firefox-browser-css.patch
       
   111 Patch31:        firefox-kde.patch
       
   112 Patch32:        firefox-kde-114.patch
       
   113 Patch33:        firefox-no-default-ualocale.patch
       
   114 Patch34:        firefox-multilocale-chrome.patch
       
   115 Patch35:        firefox-branded-icons.patch
       
   116 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
       
   117 Requires(post):   coreutils shared-mime-info desktop-file-utils
       
   118 Requires(postun): shared-mime-info desktop-file-utils
       
   119 Requires:       %{name}-branding > 20.0
       
   120 Requires:       mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
       
   121 Requires:       mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
       
   122 Recommends:     libcanberra0
       
   123 # libproxy's mozjs pacrunner crashes FF (bnc#759123)
       
   124 %if %suse_version < 1220
       
   125 Obsoletes:      libproxy1-pacrunner-mozjs <= 0.4.7
       
   126 %endif
       
   127 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
       
   128 %define _use_internal_dependency_generator 0
       
   129 %define __find_requires sh %{SOURCE4}
       
   130 %global provfind sh -c "grep -v '.so' | %__find_provides"
       
   131 %global __find_provides %provfind
       
   132 %define progname firefox
       
   133 %define progdir %{_prefix}/%_lib/%{progname}
       
   134 %define gnome_dir     %{_prefix}
       
   135 %if %suse_version > 1130
       
   136 %define desktop_file_name firefox
       
   137 %else
       
   138 %define desktop_file_name %{name}
       
   139 %endif
       
   140 ### build options
       
   141 %define branding 1
       
   142 %define localize 1
       
   143 %ifarch ppc ppc64 s390 s390x ia64 %arm
       
   144 %define crashreporter 0
       
   145 %else
       
   146 %define crashreporter 1
       
   147 %endif
       
   148 ### build options end
       
   149 
       
   150 %description
       
   151 Mozilla Firefox is a standalone web browser, designed for standards
       
   152 compliance and performance.  Its functionality can be enhanced via a
       
   153 plethora of extensions.
       
   154 
       
   155 %package devel
       
   156 Summary:        Devel package for Firefox
       
   157 Group:          Development/Tools/Other
       
   158 Provides:       firefox-devel = %{version}-%{release}
       
   159 Requires:       %{name} = %{version}
       
   160 Requires:       perl(Archive::Zip)
       
   161 Requires:       perl(XML::Simple)
       
   162 
       
   163 %description devel
       
   164 Development files for Firefox to make packaging of addons easier.
       
   165 
       
   166 %if %localize
       
   167 
       
   168 %package translations-common
       
   169 Summary:        Common translations for Firefox
       
   170 Group:          System/Localization
       
   171 Provides:       locale(%{name}:ar;ca;cs;da;de;en_GB;el;es_AR;es_CL;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW)
       
   172 Requires:       %{name} = %{version}
       
   173 Obsoletes:      %{name}-translations < %{version}-%{release}
       
   174 
       
   175 %description translations-common
       
   176 This package contains several common languages for the user interface
       
   177 of Firefox.
       
   178 
       
   179 %package translations-other
       
   180 Summary:        Extra translations for Firefox
       
   181 Group:          System/Localization
       
   182 Provides:       locale(%{name}:ach;af;ak;as;ast;be;bg;bn_BD;bn_IN;br;bs;csb;cy;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;km;kn;ku;lg;lij;lt;lv;mai;mk;ml;mr;nn_NO;nso;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;ta_LK;te;th;tr;uk;vi;zu)
       
   183 Requires:       %{name} = %{version}
       
   184 Obsoletes:      %{name}-translations < %{version}-%{release}
       
   185 
       
   186 %description translations-other
       
   187 This package contains rarely used languages for the user interface
       
   188 of Firefox.
       
   189 %endif
       
   190 
       
   191 %package branding-upstream
       
   192 Summary:        Upstream branding for Firefox
       
   193 Group:          Productivity/Networking/Web/Browsers
       
   194 Provides:       %{name}-branding = %{version}
       
   195 Conflicts:      otherproviders(%{name}-branding)
       
   196 Supplements:    packageand(%{name}:branding-upstream)
       
   197 #BRAND: Provide three files -
       
   198 #BRAND: /usr/lib/firefox/browserconfig.properties that contains the
       
   199 #BRAND: default homepage and some other default configuration options
       
   200 #BRAND: /usr/lib/firefox/defaults/profile/bookmarks.html that contains
       
   201 #BRAND: the list of default bookmarks
       
   202 #BRAND: It's also possible to create a file
       
   203 #BRAND: /usr/lib/firefox/defaults/preferences/firefox-$vendor.js to set
       
   204 #BRAND: custom preference overrides.
       
   205 #BRAND: It's also possible to drop files in /usr/lib/firefox/searchplugins
       
   206 
       
   207 %description branding-upstream
       
   208 This package provides upstream look and feel for Firefox.
       
   209 
       
   210 
       
   211 %if %crashreporter
       
   212 
       
   213 %package buildsymbols
       
   214 Summary:        Breakpad buildsymbols for %{name}
       
   215 Group:          Development/Debug
       
   216 
       
   217 %description buildsymbols
       
   218 This subpackage contains the Breakpad created and compatible debugging
       
   219 symbols meant for upload to Mozilla's crash collector database.
       
   220 %endif
       
   221 
       
   222 %prep
       
   223 %setup -q -n mozilla -b 7 -b 10
       
   224 cd $RPM_BUILD_DIR/mozilla
       
   225 %patch1 -p1
       
   226 %patch2 -p1
       
   227 %patch3 -p1
       
   228 %patch4 -p1
       
   229 %patch5 -p1
       
   230 %patch6 -p1
       
   231 %patch7 -p1
       
   232 %patch8 -p1
       
   233 %patch9 -p1
       
   234 %if %suse_version < 1120
       
   235 %patch10 -p1
       
   236 %endif
       
   237 %patch12 -p1
       
   238 %patch13 -p1
       
   239 %patch14 -p1
       
   240 #
       
   241 %patch30 -p1
       
   242 %if %suse_version >= 1110
       
   243 %patch31 -p1
       
   244 %endif
       
   245 %if %suse_version >= 1140
       
   246 %patch32 -p1
       
   247 %endif
       
   248 %patch33 -p1
       
   249 %patch34 -p1
       
   250 %patch35 -p1
       
   251 
       
   252 %build
       
   253 # no need to add build time to binaries
       
   254 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
       
   255 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
       
   256 TIME="\"$(date -d "${modified}" "+%%R")\""
       
   257 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
       
   258 #
       
   259 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
       
   260 if test "$kdehelperversion" != %{kde_helper_version}; then
       
   261   echo fix kde helper version in the .spec file
       
   262   exit 1
       
   263 fi
       
   264 source %{SOURCE5}
       
   265 export MOZ_SOURCE_STAMP=$REV
       
   266 export SOURCE_REPO=$REPO
       
   267 export source_repo=$REPO
       
   268 export MOZ_SOURCE_REPO=$REPO
       
   269 export MOZ_BUILD_DATE=%{releasedate}
       
   270 export MOZILLA_OFFICIAL=1
       
   271 export BUILD_OFFICIAL=1
       
   272 export MOZ_TELEMETRY_REPORTING=1
       
   273 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing"
       
   274 %ifarch %arm
       
   275 export CFLAGS="${CFLAGS/-g / }"
       
   276 %endif
       
   277 %ifarch ppc64
       
   278 export CFLAGS="$CFLAGS -mminimal-toc"
       
   279 %endif
       
   280 export CXXFLAGS="$CFLAGS"
       
   281 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
       
   282 cat << EOF > $MOZCONFIG
       
   283 mk_add_options MOZILLA_OFFICIAL=1
       
   284 mk_add_options BUILD_OFFICIAL=1
       
   285 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
       
   286 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
       
   287 . \$topsrcdir/browser/config/mozconfig
       
   288 ac_add_options --prefix=%{_prefix}
       
   289 ac_add_options --libdir=%{_libdir}
       
   290 ac_add_options --sysconfdir=%{_sysconfdir}
       
   291 ac_add_options --mandir=%{_mandir}
       
   292 ac_add_options --includedir=%{_includedir}
       
   293 ac_add_options --with-system-nspr
       
   294 ac_add_options --with-system-nss
       
   295 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
       
   296 #ac_add_options --with-system-jpeg    # libjpeg-turbo is used internally
       
   297 #ac_add_options --with-system-png     # doesn't work because of missing APNG support
       
   298 ac_add_options --with-system-zlib
       
   299 ac_add_options --disable-installer
       
   300 ac_add_options --disable-updater
       
   301 ac_add_options --disable-tests
       
   302 ac_add_options --disable-debug
       
   303 ac_add_options --enable-startup-notification
       
   304 #ac_add_options --enable-chrome-format=jar
       
   305 ac_add_options --enable-update-channel=%{update_channel}
       
   306 EOF
       
   307 %if %suse_version > 1130
       
   308 cat << EOF >> $MOZCONFIG
       
   309 ac_add_options --disable-gnomevfs
       
   310 ac_add_options --enable-gio
       
   311 EOF
       
   312 %endif
       
   313 %if %suse_version < 1220
       
   314 cat << EOF >> $MOZCONFIG
       
   315 ac_add_options --disable-gstreamer
       
   316 EOF
       
   317 %endif
       
   318 %if %branding
       
   319 cat << EOF >> $MOZCONFIG
       
   320 ac_add_options --enable-official-branding
       
   321 EOF
       
   322 %endif
       
   323 %if %suse_version > 1110
       
   324 cat << EOF >> $MOZCONFIG
       
   325 ac_add_options --enable-libproxy
       
   326 EOF
       
   327 %endif
       
   328 %if ! %crashreporter
       
   329 cat << EOF >> $MOZCONFIG
       
   330 ac_add_options --disable-crashreporter
       
   331 EOF
       
   332 %endif
       
   333 # Disable neon for arm as it does not build correctly
       
   334 %ifarch %arm
       
   335 cat << EOF >> $MOZCONFIG
       
   336 ac_add_options --disable-neon
       
   337 EOF
       
   338 %endif
       
   339 %ifnarch %ix86 x86_64
       
   340 cat << EOF >> $MOZCONFIG
       
   341 ac_add_options --disable-webrtc
       
   342 EOF
       
   343 %endif
       
   344 make -f client.mk build
       
   345 
       
   346 %install
       
   347 cd $RPM_BUILD_DIR/obj
       
   348 source %{SOURCE5}
       
   349 export MOZ_SOURCE_STAMP=$REV
       
   350 export MOZ_SOURCE_REPO=$REPO
       
   351 make -C browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
       
   352 #DEBUG (break the build if searchplugins are missing / temporary)
       
   353 grep amazondotcom dist/firefox/browser/omni.ja
       
   354 # copy tree into RPM_BUILD_ROOT
       
   355 mkdir -p $RPM_BUILD_ROOT%{progdir}
       
   356 cp -rf $RPM_BUILD_DIR/obj/dist/firefox/* $RPM_BUILD_ROOT%{progdir}
       
   357 mkdir -p $RPM_BUILD_ROOT%{progdir}/distribution/extensions
       
   358 mkdir -p $RPM_BUILD_ROOT%{progdir}/browser/searchplugins
       
   359 mkdir -p $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/
       
   360 # install kde.js
       
   361 %if %suse_version >= 1110
       
   362 install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/kde.js
       
   363 install -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/firefox.js
       
   364 %endif
       
   365 # core configuration (e.g. temporary gstreamer pref)
       
   366 # this is expected to be just temporary and therefore not handled in openSUSE branding
       
   367 install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{progdir}/defaults/pref/gecko.js
       
   368 # install add-plugins.sh
       
   369 sed "s:%%PROGDIR:%{progdir}:g" \
       
   370   %{SOURCE13} > $RPM_BUILD_ROOT%{progdir}/add-plugins.sh
       
   371 chmod 755 $RPM_BUILD_ROOT%{progdir}/add-plugins.sh
       
   372 # install additional locales
       
   373 %if %localize
       
   374 rm -f %{_tmppath}/translations.*
       
   375 touch %{_tmppath}/translations.{common,other}
       
   376 for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do
       
   377   case $locale in
       
   378    ja-JP-mac|en-US)
       
   379 	;;
       
   380    *)
       
   381    	pushd $RPM_BUILD_DIR/compare-locales
       
   382 	PYTHONPATH=lib \
       
   383 	  scripts/compare-locales -m ../l10n-merged/$locale \
       
   384 	  ../mozilla/browser/locales/l10n.ini ../l10n $locale
       
   385 	popd
       
   386 	LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
       
   387   	make -C browser/locales langpack-$locale
       
   388 	cp -rL dist/xpi-stage/locale-$locale \
       
   389 	       $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org
       
   390 	# remove prefs, profile defaults, and hyphenation from langpack
       
   391 	rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults
       
   392 	rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation
       
   393 	# check against the fixed common list and sort into the right filelist
       
   394 	_matched=0
       
   395 	for _match in ar ca cs da de en-GB el es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do
       
   396 	  [ "$_match" = "$locale" ] && _matched=1
       
   397 	done
       
   398 	[ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
       
   399   	echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \
       
   400 	  >> %{_tmppath}/translations.$_l10ntarget
       
   401   esac
       
   402 done
       
   403 %endif
       
   404 # remove some executable permissions
       
   405 find $RPM_BUILD_ROOT%{progdir} \
       
   406      -name "*.js" -o \
       
   407      -name "*.jsm" -o \
       
   408      -name "*.rdf" -o \
       
   409      -name "*.properties" -o \
       
   410      -name "*.dtd" -o \
       
   411      -name "*.txt" -o \
       
   412      -name "*.xml" -o \
       
   413      -name "*.css" | xargs chmod a-x
       
   414 # remove mkdir.done files from installed base
       
   415 find $RPM_BUILD_ROOT%{progdir} -name ".mkdir.done" | xargs rm
       
   416 # overwrite the mozilla start-script and link it to /usr/bin
       
   417 mkdir --parents $RPM_BUILD_ROOT/usr/bin
       
   418 sed "s:%%PREFIX:%{_prefix}:g
       
   419 s:%%PROGDIR:%{progdir}:g
       
   420 s:%%APPNAME:firefox:g
       
   421 s:%%PROFILE:.mozilla/firefox:g" \
       
   422   %{SOURCE3} > $RPM_BUILD_ROOT%{progdir}/%{progname}.sh
       
   423 chmod 755 $RPM_BUILD_ROOT%{progdir}/%{progname}.sh
       
   424 ln -sf ../..%{progdir}/%{progname}.sh $RPM_BUILD_ROOT%{_bindir}/%{progname}
       
   425 # desktop definition
       
   426 mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
       
   427 install -m 644 %{SOURCE1} \
       
   428    $RPM_BUILD_ROOT%{_datadir}/applications/%{desktop_file_name}.desktop
       
   429 # additional mime-types
       
   430 mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime/packages
       
   431 cp %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/mime/packages/%{progname}.xml
       
   432 # install man-page
       
   433 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
       
   434 cp %{SOURCE11} $RPM_BUILD_ROOT%{_mandir}/man1/%{progname}.1
       
   435 ##########
       
   436 # ADDONS
       
   437 #
       
   438 mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_appid}
       
   439 mkdir -p $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{firefox_appid}
       
   440 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
       
   441 ln -sf %{progdir}/browser/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}.png
       
   442 ln -sf %{progdir}/browser/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}-gnome.png
       
   443 %if %branding
       
   444 for size in 16 22 24 32 48 256; do
       
   445 %else
       
   446 for size in 16 32 48; do
       
   447 %endif
       
   448   mkdir -p $RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/
       
   449   ln -sf %{progdir}/browser/chrome/icons/default/default$size.png \
       
   450          $RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/%{progname}.png
       
   451 done
       
   452 %suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK
       
   453 # excludes
       
   454 rm -f $RPM_BUILD_ROOT%{progdir}/updater.ini
       
   455 rm -f $RPM_BUILD_ROOT%{progdir}/removed-files
       
   456 rm -f $RPM_BUILD_ROOT%{progdir}/README.txt
       
   457 rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties
       
   458 rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh
       
   459 rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE
       
   460 rm -f $RPM_BUILD_ROOT%{progdir}/precomplete
       
   461 rm -f $RPM_BUILD_ROOT%{progdir}/dictionaries/en-US*
       
   462 rm -f $RPM_BUILD_ROOT%{progdir}/update-settings.ini
       
   463 # devel
       
   464 mkdir -p %{buildroot}%{_bindir}
       
   465 install -m 755 %SOURCE12 %{buildroot}%{_bindir}
       
   466 # inspired by mandriva
       
   467 mkdir -p %{buildroot}/etc/rpm
       
   468 cat <<'FIN' >%{buildroot}/etc/rpm/macros.%{progname}
       
   469 # Macros from %{name} package
       
   470 %%firefox_major              %{major}
       
   471 %%firefox_version            %{version}
       
   472 %%firefox_mainver            %{mainver}
       
   473 %%firefox_mozillapath        %%{_libdir}/%{progname}
       
   474 %%firefox_pluginsdir         %%{_libdir}/browser-plugins
       
   475 %%firefox_appid              \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
       
   476 %%firefox_extdir             %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
       
   477 
       
   478 %%firefox_ext_install() \
       
   479    extdir="%%{buildroot}%%{firefox_extdir}/`mozilla-get-app-id '%%1'`" \
       
   480    mkdir -p "$extdir" \
       
   481    %%{__unzip} -q -d "$extdir" "%%1" \
       
   482    %%{nil}
       
   483 FIN
       
   484 # just dumping an xpi file there doesn't work...
       
   485 #%%firefox_ext_install() \
       
   486 #       extdir="%%{buildroot}%%{firefox_extdir}" \
       
   487 #       mkdir -p "$extdir" \
       
   488 #       cp "%%1" "$extdir" \
       
   489 #       %%{nil}
       
   490 # fdupes
       
   491 %fdupes $RPM_BUILD_ROOT%{progdir}
       
   492 %fdupes $RPM_BUILD_ROOT%{_datadir}
       
   493 # create breakpad debugsymbols
       
   494 %if %crashreporter
       
   495 SYMBOLS_NAME="firefox-%{version}-%{release}.%{_arch}-%{suse_version}-symbols"
       
   496 make buildsymbols \
       
   497   SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \
       
   498   SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \
       
   499   SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME"
       
   500 if [ -e dist/*symbols.zip ]; then
       
   501   mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/
       
   502   cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/
       
   503 fi
       
   504 %endif
       
   505 
       
   506 %clean
       
   507 rm -rf $RPM_BUILD_ROOT
       
   508 %if %localize
       
   509 rm -rf %{_tmppath}/translations.*
       
   510 %endif
       
   511 
       
   512 %post
       
   513 # update mime and desktop database
       
   514 %if %suse_version > 1130
       
   515 %mime_database_post
       
   516 %desktop_database_post
       
   517 %icon_theme_cache_post
       
   518 %else
       
   519 if [ -f usr/bin/update-mime-database ] ; then
       
   520   usr/bin/update-mime-database %{_datadir}/mime > /dev/null || :
       
   521 fi
       
   522 if [ -f usr/bin/update-desktop-database ] ; then
       
   523   usr/bin/update-desktop-database > /dev/null || :
       
   524 fi
       
   525 %endif
       
   526 %{progdir}/add-plugins.sh > /dev/null 2>&1
       
   527 exit 0
       
   528 
       
   529 %postun
       
   530 %if %suse_version > 1130
       
   531 %icon_theme_cache_postun
       
   532 %desktop_database_postun
       
   533 %mime_database_postun
       
   534 %else
       
   535 if [ -f usr/bin/update-mime-database ] ; then
       
   536   usr/bin/update-mime-database %{_datadir}/mime > /dev/null || :
       
   537 fi
       
   538 if [ -f usr/bin/update-desktop-database ] ; then
       
   539   usr/bin/update-desktop-database > /dev/null || :
       
   540 fi
       
   541 %endif
       
   542 exit 0
       
   543 
       
   544 %posttrans
       
   545 [ -e %{progdir}/add-plugins.sh ] && \
       
   546   %{progdir}/add-plugins.sh > /dev/null 2>&1
       
   547 exit 0
       
   548 
       
   549 %preun
       
   550 rm -f %{progdir}/dictionaries/*
       
   551 exit 0
       
   552 
       
   553 %files
       
   554 %defattr(-,root,root)
       
   555 %dir %{progdir}
       
   556 %dir %{progdir}/browser/
       
   557 %dir %{progdir}/browser/chrome/
       
   558 %dir %{progdir}/browser/extensions/
       
   559 %{progdir}/browser/components/
       
   560 %{progdir}/browser/defaults
       
   561 %{progdir}/browser/icons/
       
   562 %{progdir}/browser/chrome/icons
       
   563 %{progdir}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
       
   564 %{progdir}/browser/searchplugins/
       
   565 %{progdir}/browser/blocklist.xml
       
   566 %{progdir}/browser/chrome.manifest
       
   567 %{progdir}/browser/omni.ja
       
   568 %dir %{progdir}/distribution/
       
   569 %{progdir}/distribution/extensions/
       
   570 %{progdir}/components/
       
   571 %{progdir}/defaults/
       
   572 %{progdir}/dictionaries/
       
   573 %{progdir}/webapprt/
       
   574 %attr(755,root,root) %{progdir}/%{progname}.sh
       
   575 %{progdir}/firefox
       
   576 %{progdir}/firefox-bin
       
   577 %{progdir}/add-plugins.sh
       
   578 %{progdir}/application.ini
       
   579 %{progdir}/dependentlibs.list
       
   580 %{progdir}/*.so
       
   581 %{progdir}/mozilla-xremote-client
       
   582 %{progdir}/omni.ja
       
   583 %{progdir}/platform.ini
       
   584 %{progdir}/plugin-container
       
   585 %{progdir}/webapprt-stub
       
   586 %{progdir}/chrome.manifest
       
   587 %if %crashreporter
       
   588 %{progdir}/crashreporter
       
   589 %{progdir}/crashreporter.ini
       
   590 %{progdir}/Throbber-small.gif
       
   591 %{progdir}/browser/crashreporter-override.ini
       
   592 %endif
       
   593 %{_datadir}/applications/%{desktop_file_name}.desktop
       
   594 %{_datadir}/mime/packages/%{progname}.xml
       
   595 %{_datadir}/pixmaps/firefox*
       
   596 %dir %{_datadir}/mozilla
       
   597 %dir %{_datadir}/mozilla/extensions
       
   598 %dir %{_datadir}/mozilla/extensions/%{firefox_appid}
       
   599 %dir %{_libdir}/mozilla
       
   600 %dir %{_libdir}/mozilla/extensions
       
   601 %dir %{_libdir}/mozilla/extensions/%{firefox_appid}
       
   602 %{gnome_dir}/share/icons/hicolor/
       
   603 %{_bindir}/%{progname}
       
   604 %doc %{_mandir}/man1/%{progname}.1.gz
       
   605 
       
   606 %files devel
       
   607 %defattr(-,root,root)
       
   608 %{_bindir}/mozilla-get-app-id
       
   609 %config /etc/rpm/macros.%{progname}
       
   610 
       
   611 %if %localize
       
   612 
       
   613 %files translations-common -f %{_tmppath}/translations.common
       
   614 %defattr(-,root,root)
       
   615 %dir %{progdir}
       
   616 %dir %{progdir}/browser/extensions/
       
   617 
       
   618 %files translations-other -f %{_tmppath}/translations.other
       
   619 %defattr(-,root,root)
       
   620 %dir %{progdir}
       
   621 %dir %{progdir}/browser/extensions/
       
   622 %endif
       
   623 
       
   624 # this package does not need to provide files but is needed to fulfill
       
   625 # requirements if no other branding package is to be installed
       
   626 
       
   627 %files branding-upstream
       
   628 %defattr(-,root,root)
       
   629 %dir %{progdir}
       
   630 
       
   631 %if %crashreporter
       
   632 
       
   633 %files buildsymbols
       
   634 %defattr(-,root,root)
       
   635 %{_datadir}/mozilla/*.zip
       
   636 %endif
       
   637 
       
   638 %changelog