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