MozillaFirefox/firefox-esr.spec
branchfirefox38
changeset 859 08af21f8c1f1
child 860 431252700c45
equal deleted inserted replaced
858:0bbf4b3a4272 859:08af21f8c1f1
       
     1 #
       
     2 # spec file for package firefox-esr
       
     3 #
       
     4 # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
       
     5 #               2006-2015 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 # changed with every update
       
    21 %define major 38
       
    22 %define mainver %major.0.6
       
    23 %define update_channel release
       
    24 %define releasedate 2015060500
       
    25 
       
    26 # general build definitions
       
    27 %if "%{update_channel}" != "aurora"
       
    28 %define progname firefox
       
    29 %define pkgname  firefox-esr
       
    30 %define appname  Firefox
       
    31 %else
       
    32 %define progname firefox-dev
       
    33 %define pkgname  firefox-dev-edition
       
    34 %define appname  Firefox Developer Edition
       
    35 %endif
       
    36 %define progdir %{_prefix}/%_lib/%{progname}
       
    37 %define gnome_dir     %{_prefix}
       
    38 %define desktop_file_name %{progname}
       
    39 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
       
    40 %define _use_internal_dependency_generator 0
       
    41 %define __find_requires sh %{SOURCE4}
       
    42 %global provfind sh -c "grep -v '.so' | %__find_provides"
       
    43 %global __find_provides %provfind
       
    44 %if 0%{?suse_version} > 1310
       
    45 %define gstreamer_ver 1.0
       
    46 %define gstreamer 1
       
    47 %else
       
    48 %define gstreamer_ver 0.10
       
    49 %endif
       
    50 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
       
    51 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution,
       
    52 # please get your own set of keys.
       
    53 %define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q
       
    54 %if %update_channel == "aurora"
       
    55 %define branding 0
       
    56 %else
       
    57 %define branding 1
       
    58 %endif
       
    59 %define localize 1
       
    60 %ifarch aarch64 ppc ppc64 ppc64le s390 s390x ia64 %arm
       
    61 %define crashreporter 0
       
    62 %else
       
    63 %define crashreporter 1
       
    64 %endif
       
    65 
       
    66 Name:           %{pkgname}
       
    67 BuildRequires:  Mesa-devel
       
    68 BuildRequires:  autoconf213
       
    69 BuildRequires:  dbus-1-glib-devel
       
    70 BuildRequires:  fdupes
       
    71 BuildRequires:  gcc-c++
       
    72 BuildRequires:  libcurl-devel
       
    73 BuildRequires:  libgnomeui-devel
       
    74 BuildRequires:  libidl-devel
       
    75 BuildRequires:  libiw-devel
       
    76 BuildRequires:  libnotify-devel
       
    77 BuildRequires:  libproxy-devel
       
    78 BuildRequires:  makeinfo
       
    79 BuildRequires:  mozilla-nspr-devel >= 4.10.8
       
    80 BuildRequires:  mozilla-nss-devel >= 3.18.1
       
    81 BuildRequires:  nss-shared-helper-devel
       
    82 BuildRequires:  python-devel
       
    83 BuildRequires:  startup-notification-devel
       
    84 BuildRequires:  unzip
       
    85 BuildRequires:  update-desktop-files
       
    86 BuildRequires:  xorg-x11-libXt-devel
       
    87 BuildRequires:  yasm
       
    88 BuildRequires:  zip
       
    89 BuildRequires:  pkgconfig(gstreamer-%gstreamer_ver)
       
    90 BuildRequires:  pkgconfig(gstreamer-app-%gstreamer_ver)
       
    91 BuildRequires:  pkgconfig(gstreamer-plugins-base-%gstreamer_ver)
       
    92 BuildRequires:  pkgconfig(libpulse)
       
    93 %if 0%{?gstreamer} == 1
       
    94 Requires:       libgstreamer-1_0-0
       
    95 Recommends:     gstreamer-fluendo-mp3
       
    96 Recommends:     gstreamer-plugins-libav
       
    97 %else
       
    98 Requires:       libgstreamer-0_10-0
       
    99 Recommends:     gstreamer-0_10-fluendo-mp3
       
   100 Recommends:     gstreamer-0_10-plugins-ffmpeg
       
   101 %endif
       
   102 Version:        %{mainver}
       
   103 Release:        0
       
   104 %if "%{name}" == "MozillaFirefox"
       
   105 Provides:       firefox-esr = %{mainver}
       
   106 Provides:       firefox-esr = %{version}-%{release}
       
   107 %endif
       
   108 Provides:       web_browser
       
   109 Provides:       browser(npapi)
       
   110 # this is needed to match this package with the kde4 helper package without the main package
       
   111 # having a hard requirement on the kde4 package
       
   112 %define kde_helper_version 6
       
   113 Provides:       mozilla-kde4-version = %{kde_helper_version}
       
   114 Conflicts:      firefox
       
   115 Summary:        Mozilla %{appname} Web Browser
       
   116 License:        MPL-2.0
       
   117 Group:          Productivity/Networking/Web/Browsers
       
   118 Url:            http://www.mozilla.org/
       
   119 Source:         firefox-%{version}-source.tar.xz
       
   120 Source1:        MozillaFirefox.desktop
       
   121 Source2:        MozillaFirefox-rpmlintrc
       
   122 Source3:        mozilla.sh.in
       
   123 Source4:        find-external-requires.sh
       
   124 Source5:        source-stamp.txt
       
   125 Source6:        kde.js
       
   126 Source7:        l10n-%{version}.tar.xz
       
   127 Source8:        firefox-mimeinfo.xml
       
   128 Source9:        firefox.js
       
   129 Source10:       compare-locales.tar.xz
       
   130 Source11:       firefox.1
       
   131 Source12:       mozilla-get-app-id
       
   132 Source13:       spellcheck.js
       
   133 Source14:       create-tar.sh
       
   134 Source15:       firefox-appdata.xml
       
   135 Source16:       MozillaFirefox.changes
       
   136 # Gecko/Toolkit
       
   137 Patch1:         toolkit-download-folder.patch
       
   138 Patch2:         mozilla-nongnome-proxies.patch
       
   139 Patch3:         mozilla-prefer_plugin_pref.patch
       
   140 Patch4:         mozilla-shared-nss-db.patch
       
   141 Patch5:         mozilla-kde.patch
       
   142 Patch6:         mozilla-preferences.patch
       
   143 Patch7:         mozilla-language.patch
       
   144 Patch8:         mozilla-ntlm-full-path.patch
       
   145 Patch9:         mozilla-repo.patch
       
   146 Patch10:        mozilla-icu-strncat.patch
       
   147 Patch11:        mozilla-arm-disable-edsp.patch
       
   148 Patch12:        mozilla-openaes-decl.patch
       
   149 Patch14:        mozilla-skia-be-le.patch
       
   150 Patch15:        mozilla-bmo1005535.patch
       
   151 Patch16:        mozilla-add-glibcxx_use_cxx11_abi.patch
       
   152 # Firefox/browser
       
   153 Patch101:       firefox-kde.patch
       
   154 Patch102:       firefox-no-default-ualocale.patch
       
   155 Patch103:       firefox-multilocale-chrome.patch
       
   156 Patch104:       firefox-branded-icons.patch
       
   157 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
       
   158 Requires(post):   coreutils shared-mime-info desktop-file-utils
       
   159 Requires(postun): shared-mime-info desktop-file-utils
       
   160 %if %branding
       
   161 Requires:       %{name}-branding > 20.0
       
   162 %endif
       
   163 Requires:       mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
       
   164 Requires:       mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
       
   165 Recommends:     libcanberra0
       
   166 Recommends:     libpulse0
       
   167 # addon leads to startup crash (bnc#908892)
       
   168 Obsoletes:      tracker-miner-firefox < 0.15
       
   169 # libproxy's mozjs pacrunner crashes FF (bnc#759123)
       
   170 %if 0%{?suse_version} < 1220
       
   171 Obsoletes:      libproxy1-pacrunner-mozjs <= 0.4.7
       
   172 %endif
       
   173 
       
   174 %description
       
   175 Mozilla Firefox is a standalone web browser, designed for standards
       
   176 compliance and performance.  Its functionality can be enhanced via a
       
   177 plethora of extensions.
       
   178 
       
   179 %package devel
       
   180 Summary:        Devel package for %{appname}
       
   181 Group:          Development/Tools/Other
       
   182 Provides:       firefox-devel = %{version}-%{release}
       
   183 Requires:       %{name} = %{version}
       
   184 Requires:       perl(Archive::Zip)
       
   185 Requires:       perl(XML::Simple)
       
   186 
       
   187 %description devel
       
   188 Development files for %{appname} to make packaging of addons easier.
       
   189 
       
   190 %if %localize
       
   191 %package translations-common
       
   192 Summary:        Common translations for %{appname}
       
   193 Group:          System/Localization
       
   194 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)
       
   195 Requires:       %{name} = %{version}
       
   196 Obsoletes:      %{name}-translations < %{version}-%{release}
       
   197 
       
   198 %description translations-common
       
   199 This package contains several common languages for the user interface
       
   200 of %{appname}.
       
   201 
       
   202 %package translations-other
       
   203 Summary:        Extra translations for %{appname}
       
   204 Group:          System/Localization
       
   205 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;uz;vi;zu)
       
   206 Requires:       %{name} = %{version}
       
   207 Obsoletes:      %{name}-translations < %{version}-%{release}
       
   208 
       
   209 %description translations-other
       
   210 This package contains rarely used languages for the user interface
       
   211 of %{appname}.
       
   212 %endif
       
   213 
       
   214 %if %branding
       
   215 %package branding-upstream
       
   216 Summary:        Upstream branding for %{appname}
       
   217 Group:          Productivity/Networking/Web/Browsers
       
   218 Provides:       %{name}-branding = %{version}
       
   219 Conflicts:      otherproviders(MozillaFirefox-branding)
       
   220 Supplements:    packageand(%{name}:branding-upstream)
       
   221 #BRAND: Provide three files -
       
   222 #BRAND: /usr/lib/firefox/browserconfig.properties that contains the
       
   223 #BRAND: default homepage and some other default configuration options
       
   224 #BRAND: /usr/lib/firefox/defaults/profile/bookmarks.html that contains
       
   225 #BRAND: the list of default bookmarks
       
   226 #BRAND: It's also possible to create a file
       
   227 #BRAND: /usr/lib/firefox/defaults/preferences/firefox-$vendor.js to set
       
   228 #BRAND: custom preference overrides.
       
   229 #BRAND: It's also possible to drop files in /usr/lib/firefox/searchplugins
       
   230 
       
   231 %description branding-upstream
       
   232 This package provides upstream look and feel for %{appname}.
       
   233 %endif
       
   234 
       
   235 %if %crashreporter
       
   236 %package buildsymbols
       
   237 Summary:        Breakpad buildsymbols for %{appname}
       
   238 Group:          Development/Debug
       
   239 
       
   240 %description buildsymbols
       
   241 This subpackage contains the Breakpad created and compatible debugging
       
   242 symbols meant for upload to Mozilla's crash collector database.
       
   243 %endif
       
   244 
       
   245 %prep
       
   246 %if %localize
       
   247 %setup -q -n mozilla -b 7 -b 10
       
   248 %else
       
   249 %setup -q -n mozilla
       
   250 %endif
       
   251 cd $RPM_BUILD_DIR/mozilla
       
   252 %patch1 -p1
       
   253 %patch2 -p1
       
   254 %patch3 -p1
       
   255 %patch4 -p1
       
   256 %patch5 -p1
       
   257 %patch6 -p1
       
   258 %patch7 -p1
       
   259 %patch8 -p1
       
   260 %patch9 -p1
       
   261 %patch10 -p1
       
   262 %patch11 -p1
       
   263 %patch12 -p1
       
   264 %patch14 -p1
       
   265 %patch15 -p1
       
   266 %patch16 -p1
       
   267 # Firefox
       
   268 %patch101 -p1
       
   269 %patch102 -p1
       
   270 %patch103 -p1
       
   271 %patch104 -p1
       
   272 
       
   273 %build
       
   274 # no need to add build time to binaries
       
   275 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/MozillaFirefox.changes")"
       
   276 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
       
   277 TIME="\"$(date -d "${modified}" "+%%R")\""
       
   278 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
       
   279 #
       
   280 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
       
   281 if test "$kdehelperversion" != %{kde_helper_version}; then
       
   282   echo fix kde helper version in the .spec file
       
   283   exit 1
       
   284 fi
       
   285 source %{SOURCE5}
       
   286 export MOZ_SOURCE_STAMP=$REV
       
   287 export SOURCE_REPO=$REPO
       
   288 export source_repo=$REPO
       
   289 export MOZ_SOURCE_REPO=$REPO
       
   290 export MOZ_BUILD_DATE=%{releasedate}
       
   291 export MOZILLA_OFFICIAL=1
       
   292 export BUILD_OFFICIAL=1
       
   293 export MOZ_TELEMETRY_REPORTING=1
       
   294 export MOZ_GOOGLE_API_KEY=%{_google_api_key}
       
   295 export CFLAGS="%{optflags} -fno-strict-aliasing"
       
   296 %ifarch %arm
       
   297 export CFLAGS="${CFLAGS/-g / }"
       
   298 %endif
       
   299 %ifarch %arm %ix86
       
   300 # Limit RAM usage during link
       
   301 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
       
   302 %endif
       
   303 %ifarch ppc64 ppc64le
       
   304 export CFLAGS="$CFLAGS -mminimal-toc"
       
   305 %endif
       
   306 export CXXFLAGS="$CFLAGS"
       
   307 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
       
   308 cat << EOF > $MOZCONFIG
       
   309 mk_add_options MOZILLA_OFFICIAL=1
       
   310 mk_add_options BUILD_OFFICIAL=1
       
   311 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
       
   312 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
       
   313 . \$topsrcdir/browser/config/mozconfig
       
   314 ac_add_options --prefix=%{_prefix}
       
   315 ac_add_options --libdir=%{_libdir}
       
   316 ac_add_options --sysconfdir=%{_sysconfdir}
       
   317 ac_add_options --mandir=%{_mandir}
       
   318 ac_add_options --includedir=%{_includedir}
       
   319 ac_add_options --enable-release
       
   320 ac_add_options --enable-stdcxx-compat
       
   321 %ifarch %ix86 %arm
       
   322 %if 0%{?suse_version} > 1230
       
   323 ac_add_options --disable-optimize
       
   324 %endif
       
   325 %endif
       
   326 %ifnarch ppc ppc64 ppc64le aarch64
       
   327 ac_add_options --enable-elf-hack
       
   328 %endif
       
   329 ac_add_options --with-system-nspr
       
   330 ac_add_options --with-system-nss
       
   331 %if %{localize}
       
   332 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
       
   333 %endif
       
   334 #ac_add_options --with-system-jpeg    # libjpeg-turbo is used internally
       
   335 #ac_add_options --with-system-png     # doesn't work because of missing APNG support
       
   336 ac_add_options --with-system-zlib
       
   337 ac_add_options --disable-installer
       
   338 ac_add_options --disable-updater
       
   339 ac_add_options --disable-tests
       
   340 ac_add_options --disable-debug
       
   341 ac_add_options --enable-startup-notification
       
   342 #ac_add_options --enable-chrome-format=jar
       
   343 ac_add_options --enable-update-channel=%{update_channel}
       
   344 %if 0%{?gstreamer} == 1
       
   345 ac_add_options --enable-gstreamer=1.0
       
   346 %endif
       
   347 %if %branding
       
   348 ac_add_options --enable-official-branding
       
   349 %endif
       
   350 ac_add_options --enable-libproxy
       
   351 %if ! %crashreporter
       
   352 ac_add_options --disable-crashreporter
       
   353 %endif
       
   354 # Disable neon for arm as it does not build correctly
       
   355 %ifarch %arm
       
   356 ac_add_options --disable-neon
       
   357 %endif
       
   358 %ifnarch %ix86 x86_64
       
   359 ac_add_options --disable-webrtc
       
   360 %endif
       
   361 # try to use OpenGL-ES on ARM
       
   362 %ifarch %arm aarch64
       
   363 ac_add_options --with-gl-provider=EGL
       
   364 %endif
       
   365 EOF
       
   366 make -f client.mk build
       
   367 
       
   368 %install
       
   369 cd $RPM_BUILD_DIR/obj
       
   370 source %{SOURCE5}
       
   371 export MOZ_SOURCE_STAMP=$REV
       
   372 export MOZ_SOURCE_REPO=$REPO
       
   373 # need to remove default en-US firefox-l10n.js before it gets
       
   374 # populated into browser's omni.ja; it only contains general.useragent.locale
       
   375 # which should be loaded from each language pack (set in firefox.js)
       
   376 rm dist/bin/browser/defaults/preferences/firefox-l10n.js
       
   377 make -C browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
       
   378 #DEBUG (break the build if searchplugins are missing / temporary)
       
   379 grep amazondotcom dist/firefox/browser/omni.ja
       
   380 # copy tree into RPM_BUILD_ROOT
       
   381 mkdir -p %{buildroot}%{progdir}
       
   382 cp -rf $RPM_BUILD_DIR/obj/dist/firefox/* %{buildroot}%{progdir}
       
   383 mkdir -p %{buildroot}%{progdir}/distribution/extensions
       
   384 mkdir -p %{buildroot}%{progdir}/browser/searchplugins
       
   385 mkdir -p %{buildroot}%{progdir}/browser/defaults/preferences/
       
   386 # install gre prefs
       
   387 install -m 644 %{SOURCE13} %{buildroot}%{progdir}/defaults/pref/
       
   388 # install browser prefs
       
   389 install -m 644 %{SOURCE6} %{buildroot}%{progdir}/browser/defaults/preferences/kde.js
       
   390 install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js
       
   391 # install additional locales
       
   392 %if %localize
       
   393 rm -f %{_tmppath}/translations.*
       
   394 touch %{_tmppath}/translations.{common,other}
       
   395 for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do
       
   396   case $locale in
       
   397    ja-JP-mac|en-US)
       
   398 	;;
       
   399    *)
       
   400    	pushd $RPM_BUILD_DIR/compare-locales
       
   401 	PYTHONPATH=lib \
       
   402 	  scripts/compare-locales -m ../l10n-merged/$locale \
       
   403 	  ../mozilla/browser/locales/l10n.ini ../l10n $locale
       
   404 	popd
       
   405 	LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
       
   406   	make -C browser/locales langpack-$locale
       
   407 	cp -rL dist/xpi-stage/locale-$locale \
       
   408 	       %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org
       
   409 	# remove prefs, profile defaults, and hyphenation from langpack
       
   410 	rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults
       
   411 	rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation
       
   412 	# check against the fixed common list and sort into the right filelist
       
   413 	_matched=0
       
   414 	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
       
   415 	  [ "$_match" = "$locale" ] && _matched=1
       
   416 	done
       
   417 	[ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
       
   418   	echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \
       
   419 	  >> %{_tmppath}/translations.$_l10ntarget
       
   420   esac
       
   421 done
       
   422 %endif
       
   423 # remove some executable permissions
       
   424 find %{buildroot}%{progdir} \
       
   425      -name "*.js" -o \
       
   426      -name "*.jsm" -o \
       
   427      -name "*.rdf" -o \
       
   428      -name "*.properties" -o \
       
   429      -name "*.dtd" -o \
       
   430      -name "*.txt" -o \
       
   431      -name "*.xml" -o \
       
   432      -name "*.css" | xargs chmod a-x
       
   433 # remove mkdir.done files from installed base
       
   434 find %{buildroot}%{progdir} -name ".mkdir.done" | xargs rm
       
   435 # overwrite the mozilla start-script and link it to /usr/bin
       
   436 mkdir --parents %{buildroot}/usr/bin
       
   437 sed "s:%%PREFIX:%{_prefix}:g
       
   438 s:%%PROGDIR:%{progdir}:g
       
   439 s:%%APPNAME:firefox:g
       
   440 s:%%PROFILE:.mozilla/firefox:g" \
       
   441   %{SOURCE3} > %{buildroot}%{progdir}/%{progname}.sh
       
   442 chmod 755 %{buildroot}%{progdir}/%{progname}.sh
       
   443 ln -sf ../..%{progdir}/%{progname}.sh %{buildroot}%{_bindir}/%{progname}
       
   444 # desktop file
       
   445 mkdir -p %{buildroot}%{_datadir}/applications
       
   446 sed "s:%%NAME:%{appname}:g
       
   447 s:%%EXEC:%{progname}:g
       
   448 s:%%ICON:%{progname}:g" \
       
   449   %{SOURCE1} > %{buildroot}%{_datadir}/applications/%{desktop_file_name}.desktop
       
   450 %suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK
       
   451 # additional mime-types
       
   452 mkdir -p %{buildroot}%{_datadir}/mime/packages
       
   453 cp %{SOURCE8} %{buildroot}%{_datadir}/mime/packages/%{progname}.xml
       
   454 # appdata
       
   455 %if "%{update_channel}" != "aurora"
       
   456 mkdir -p %{buildroot}%{_datadir}/appdata
       
   457 cp %{SOURCE15} %{buildroot}%{_datadir}/appdata/%{desktop_file_name}.appdata.xml
       
   458 %endif
       
   459 # install man-page
       
   460 mkdir -p %{buildroot}%{_mandir}/man1/
       
   461 cp %{SOURCE11} %{buildroot}%{_mandir}/man1/%{progname}.1
       
   462 ##########
       
   463 # ADDONS
       
   464 #
       
   465 mkdir -p %{buildroot}%{_datadir}/mozilla/extensions/%{firefox_appid}
       
   466 mkdir -p %{buildroot}%{_libdir}/mozilla/extensions/%{firefox_appid}
       
   467 mkdir -p %{buildroot}/usr/share/pixmaps/
       
   468 ln -sf %{progdir}/browser/icons/mozicon128.png %{buildroot}/usr/share/pixmaps/%{progname}.png
       
   469 ln -sf %{progdir}/browser/icons/mozicon128.png %{buildroot}/usr/share/pixmaps/%{progname}-gnome.png
       
   470 %if %branding
       
   471 for size in 16 22 24 32 48 256; do
       
   472 %else
       
   473 for size in 16 32 48; do
       
   474 %endif
       
   475   mkdir -p %{buildroot}%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/
       
   476   cp %{buildroot}%{progdir}/browser/chrome/icons/default/default$size.png \
       
   477          %{buildroot}%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/%{progname}.png
       
   478 done
       
   479 # excludes
       
   480 rm -f %{buildroot}%{progdir}/updater.ini
       
   481 rm -f %{buildroot}%{progdir}/removed-files
       
   482 rm -f %{buildroot}%{progdir}/README.txt
       
   483 rm -f %{buildroot}%{progdir}/old-homepage-default.properties
       
   484 rm -f %{buildroot}%{progdir}/run-mozilla.sh
       
   485 rm -f %{buildroot}%{progdir}/LICENSE
       
   486 rm -f %{buildroot}%{progdir}/precomplete
       
   487 rm -f %{buildroot}%{progdir}/dictionaries/en-US*
       
   488 rm -f %{buildroot}%{progdir}/update-settings.ini
       
   489 # devel
       
   490 mkdir -p %{buildroot}%{_bindir}
       
   491 install -m 755 %SOURCE12 %{buildroot}%{_bindir}
       
   492 # inspired by mandriva
       
   493 mkdir -p %{buildroot}%{_sysconfdir}/rpm
       
   494 cat <<'FIN' >%{buildroot}%{_sysconfdir}/rpm/macros.%{progname}
       
   495 # Macros from %{name} package
       
   496 %%firefox_major              %{major}
       
   497 %%firefox_version            %{version}
       
   498 %%firefox_mainver            %{mainver}
       
   499 %%firefox_mozillapath        %%{_libdir}/%{progname}
       
   500 %%firefox_pluginsdir         %%{_libdir}/browser-plugins
       
   501 %%firefox_appid              \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
       
   502 %%firefox_extdir             %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
       
   503 
       
   504 %%firefox_ext_install() \
       
   505    extdir="%%{buildroot}%%{firefox_extdir}/`mozilla-get-app-id '%%1'`" \
       
   506    mkdir -p "$extdir" \
       
   507    %%{__unzip} -q -d "$extdir" "%%1" \
       
   508    %%{nil}
       
   509 FIN
       
   510 # just dumping an xpi file there doesn't work...
       
   511 #%%firefox_ext_install() \
       
   512 #       extdir="%%{buildroot}%%{firefox_extdir}" \
       
   513 #       mkdir -p "$extdir" \
       
   514 #       cp "%%1" "$extdir" \
       
   515 #       %%{nil}
       
   516 # fdupes
       
   517 %fdupes %{buildroot}%{progdir}
       
   518 %fdupes %{buildroot}%{_datadir}
       
   519 # create breakpad debugsymbols
       
   520 %if %crashreporter
       
   521 SYMBOLS_NAME="firefox-%{version}-%{release}.%{_arch}-%{suse_version}-symbols"
       
   522 make buildsymbols \
       
   523   SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \
       
   524   SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \
       
   525   SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME"
       
   526 if [ -e dist/*symbols.zip ]; then
       
   527   mkdir -p %{buildroot}%{_datadir}/mozilla/
       
   528   cp dist/*symbols.zip %{buildroot}%{_datadir}/mozilla/
       
   529 fi
       
   530 %endif
       
   531 
       
   532 %clean
       
   533 rm -rf %{buildroot}
       
   534 %if %localize
       
   535 rm -rf %{_tmppath}/translations.*
       
   536 %endif
       
   537 
       
   538 %post
       
   539 # update mime and desktop database
       
   540 %mime_database_post
       
   541 %desktop_database_post
       
   542 %icon_theme_cache_post
       
   543 exit 0
       
   544 
       
   545 %postun
       
   546 %icon_theme_cache_postun
       
   547 %desktop_database_postun
       
   548 %mime_database_postun
       
   549 exit 0
       
   550 
       
   551 %files
       
   552 %defattr(-,root,root)
       
   553 %dir %{progdir}
       
   554 %dir %{progdir}/browser/
       
   555 %dir %{progdir}/browser/chrome/
       
   556 %dir %{progdir}/browser/extensions/
       
   557 %{progdir}/browser/components/
       
   558 %{progdir}/browser/defaults
       
   559 %{progdir}/browser/icons/
       
   560 %{progdir}/browser/chrome/icons
       
   561 %{progdir}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
       
   562 %{progdir}/browser/searchplugins/
       
   563 %{progdir}/browser/blocklist.xml
       
   564 %{progdir}/browser/chrome.manifest
       
   565 %{progdir}/browser/omni.ja
       
   566 %dir %{progdir}/distribution/
       
   567 %{progdir}/distribution/extensions/
       
   568 %{progdir}/components/
       
   569 %{progdir}/defaults/
       
   570 %{progdir}/dictionaries/
       
   571 %{progdir}/webapprt/
       
   572 %{progdir}/gmp-clearkey/
       
   573 %attr(755,root,root) %{progdir}/%{progname}.sh
       
   574 %{progdir}/firefox
       
   575 %{progdir}/firefox-bin
       
   576 %{progdir}/application.ini
       
   577 %{progdir}/dependentlibs.list
       
   578 %{progdir}/*.so
       
   579 %{progdir}/omni.ja
       
   580 %{progdir}/platform.ini
       
   581 %{progdir}/plugin-container
       
   582 %{progdir}/webapprt-stub
       
   583 %{progdir}/chrome.manifest
       
   584 %if %crashreporter
       
   585 %{progdir}/crashreporter
       
   586 %{progdir}/crashreporter.ini
       
   587 %{progdir}/Throbber-small.gif
       
   588 %{progdir}/browser/crashreporter-override.ini
       
   589 %endif
       
   590 %{_datadir}/applications/%{desktop_file_name}.desktop
       
   591 %{_datadir}/mime/packages/%{progname}.xml
       
   592 %{_datadir}/pixmaps/firefox*
       
   593 %dir %{_datadir}/mozilla
       
   594 %dir %{_datadir}/mozilla/extensions
       
   595 %dir %{_datadir}/mozilla/extensions/%{firefox_appid}
       
   596 %dir %{_libdir}/mozilla
       
   597 %dir %{_libdir}/mozilla/extensions
       
   598 %dir %{_libdir}/mozilla/extensions/%{firefox_appid}
       
   599 %{gnome_dir}/share/icons/hicolor/
       
   600 %{_bindir}/%{progname}
       
   601 %doc %{_mandir}/man1/%{progname}.1.gz
       
   602 %if "%{update_channel}" != "aurora"
       
   603 %{_datadir}/appdata/
       
   604 %endif
       
   605 
       
   606 %files devel
       
   607 %defattr(-,root,root)
       
   608 %{_bindir}/mozilla-get-app-id
       
   609 %config %{_sysconfdir}/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 %if %branding
       
   627 %files branding-upstream
       
   628 %defattr(-,root,root)
       
   629 %dir %{progdir}
       
   630 %endif
       
   631 
       
   632 %if %crashreporter
       
   633 %files buildsymbols
       
   634 %defattr(-,root,root)
       
   635 %{_datadir}/mozilla/*.zip
       
   636 %endif
       
   637 
       
   638 %changelog