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