18 |
18 |
19 # norootforbuild |
19 # norootforbuild |
20 |
20 |
21 |
21 |
22 Name: MozillaFirefox |
22 Name: MozillaFirefox |
23 %define use_xulrunner 1 |
23 %define use_xulrunner 0 |
24 %define xulrunner mozilla-xulrunner20 |
24 %define xulrunner mozilla-xulrunner20 |
25 BuildRequires: autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm |
25 BuildRequires: autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python startup-notification-devel unzip pkg-config update-desktop-files zip fdupes Mesa-devel yasm hunspell-devel nss-shared-helper-devel |
26 %if %suse_version > 1110 |
26 %if %suse_version > 1110 |
27 BuildRequires: libiw-devel |
27 BuildRequires: libiw-devel |
|
28 BuildRequires: libproxy-devel |
28 %else |
29 %else |
29 BuildRequires: wireless-tools |
30 BuildRequires: wireless-tools |
30 %endif |
31 %endif |
31 %if 0%{?use_xulrunner} |
32 %if 0%{?use_xulrunner} |
32 BuildRequires: %{xulrunner}-devel = 2.0b |
33 BuildRequires: %{xulrunner}-devel = 2.0b |
38 Release: 1 |
39 Release: 1 |
39 %define releasedate 2010083100 |
40 %define releasedate 2010083100 |
40 Summary: Mozilla Firefox Web Browser |
41 Summary: Mozilla Firefox Web Browser |
41 Url: http://www.mozilla.org/ |
42 Url: http://www.mozilla.org/ |
42 Group: Productivity/Networking/Web/Browsers |
43 Group: Productivity/Networking/Web/Browsers |
|
44 # this is needed to match this package with the kde4 helper package without the main package |
|
45 # having a hard requirement on the kde4 package |
|
46 %define kde_helper_version 6 |
|
47 Provides: mozilla-kde4-version = %{kde_helper_version} |
43 Source: firefox-%{version}-source.tar.bz2 |
48 Source: firefox-%{version}-source.tar.bz2 |
44 Source1: MozillaFirefox.desktop |
49 Source1: MozillaFirefox.desktop |
45 Source2: MozillaFirefox-rpmlintrc |
50 Source2: MozillaFirefox-rpmlintrc |
46 Source3: mozilla.sh.in |
51 Source3: mozilla.sh.in |
47 Source4: find-external-requires.sh |
52 Source4: find-external-requires.sh |
49 Source6: kde.js |
54 Source6: kde.js |
50 Source7: l10n-%{version}.tar.bz2 |
55 Source7: l10n-%{version}.tar.bz2 |
51 Source8: firefox-mimeinfo.xml |
56 Source8: firefox-mimeinfo.xml |
52 Source9: firefox-lockdown.js |
57 Source9: firefox-lockdown.js |
53 Source10: compare-locales.tar.bz2 |
58 Source10: compare-locales.tar.bz2 |
|
59 Source11: add-plugins.sh.in |
|
60 Source12: create-tar.sh |
|
61 Source13: toolkit-lockdown.js |
54 Source16: firefox.1 |
62 Source16: firefox.1 |
55 Patch1: firefox-libxul-sdk.patch |
63 # Gecko/Toolkit |
56 Patch2: firefox-credits.patch |
64 Patch1: toolkit-download-folder.patch |
57 Patch3: toolkit-download-folder.patch |
65 Patch2: mozilla-nongnome-proxies.patch |
58 Patch4: firefox-linkorder.patch |
66 Patch3: mozilla-prefer_plugin_pref.patch |
59 Patch5: firefox-browser-css.patch |
67 Patch4: mozilla-shared-nss-db.patch |
60 Patch6: firefox-cross-desktop.patch |
68 Patch5: mozilla-kde.patch |
61 Patch8: firefox-appname.patch |
69 Patch6: mozilla-gconf-backend.patch |
62 Patch9: firefox-kde.patch |
70 Patch7: gecko-lockdown.patch |
63 Patch10: firefox-ui-lockdown.patch |
71 Patch8: toolkit-ui-lockdown.patch |
64 Patch11: firefox-no-sync-l10n.patch |
72 Patch9: mozilla-cpuid.patch |
65 Patch12: firefox-sync-system-nss.patch |
73 Patch10: mozilla-buildsymbols.patch |
66 Patch13: firefox-sync-build.patch |
74 Patch11: mozilla-cairo-lcd.patch |
67 Patch14: firefox-tabview.patch |
75 # Firefox/browser |
|
76 Patch30: firefox-libxul-sdk.patch |
|
77 Patch31: firefox-credits.patch |
|
78 Patch32: firefox-linkorder.patch |
|
79 Patch33: firefox-browser-css.patch |
|
80 Patch34: firefox-cross-desktop.patch |
|
81 Patch35: firefox-appname.patch |
|
82 Patch36: firefox-kde.patch |
|
83 Patch37: firefox-ui-lockdown.patch |
|
84 Patch38: firefox-no-sync-l10n.patch |
|
85 Patch39: firefox-sync-system-nss.patch |
|
86 Patch40: firefox-sync-build.patch |
|
87 Patch41: firefox-tabview.patch |
68 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
88 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
69 Requires(post): coreutils shared-mime-info desktop-file-utils |
89 Requires(post): coreutils shared-mime-info desktop-file-utils |
70 Requires(postun): shared-mime-info desktop-file-utils |
90 Requires(postun): shared-mime-info desktop-file-utils |
71 %if 0%{?use_xulrunner} |
91 %if 0%{?use_xulrunner} |
72 Requires: %{xulrunner} >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner}) |
92 Requires: %{xulrunner} >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner}) |
153 #BRAND: It's also possible to drop files in /usr/lib/firefox/searchplugins |
175 #BRAND: It's also possible to drop files in /usr/lib/firefox/searchplugins |
154 |
176 |
155 %description branding-upstream |
177 %description branding-upstream |
156 This package provides upstream look and feel for MozillaFirefox. |
178 This package provides upstream look and feel for MozillaFirefox. |
157 |
179 |
|
180 %if %crashreporter && !0%{?use_xulrunner} |
|
181 %package buildsymbols |
|
182 License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+ |
|
183 Summary: Breakpad buildsymbols for %{name} |
|
184 Group: Development/Debug |
|
185 |
|
186 %description buildsymbols |
|
187 This subpackage contains the Breakpad created and compatible debugging |
|
188 symbols meant for upload to Mozilla's crash collector database. |
|
189 %endif |
158 |
190 |
159 %prep |
191 %prep |
160 %setup -q -n mozilla -b 7 -b 10 |
192 %setup -q -n mozilla -b 7 -b 10 |
161 cd $RPM_BUILD_DIR/mozilla |
193 cd $RPM_BUILD_DIR/mozilla |
|
194 # Gecko/Toolkit |
162 %patch1 -p1 |
195 %patch1 -p1 |
163 %patch2 -p1 |
196 %patch2 -p1 |
164 %patch3 -p1 |
197 %patch3 -p1 |
165 %patch4 -p1 |
198 %patch4 -p1 |
166 %patch5 -p1 |
199 %patch5 -p1 |
167 %patch6 -p1 |
200 #%patch6 -p1 |
168 %patch8 -p1 |
201 #%patch7 -p1 |
|
202 #%patch8 -p1 |
|
203 %patch9 -p1 |
|
204 %patch10 -p1 |
|
205 #%patch11 -p1 |
|
206 # Firefox/browser |
|
207 %patch30 -p1 |
|
208 %patch31 -p1 |
|
209 %patch32 -p1 |
|
210 %patch33 -p1 |
|
211 %patch34 -p1 |
|
212 %patch35 -p1 |
169 %if %suse_version >= 1110 |
213 %if %suse_version >= 1110 |
170 %patch9 -p1 |
214 %patch36 -p1 |
171 # install kde.js |
215 # install kde.js |
172 install -m 644 %{SOURCE6} browser/app/profile/kde.js |
216 install -m 644 %{SOURCE6} browser/app/profile/kde.js |
173 %endif |
217 %endif |
174 #%patch10 -p1 |
218 #%patch37 -p1 |
175 %patch11 -p1 |
219 %patch38 -p1 |
176 %patch12 -p1 |
220 %patch39 -p1 |
177 %patch13 -p1 |
221 %patch40 -p1 |
178 %patch14 -p1 |
222 %patch41 -p1 |
179 |
223 |
180 %build |
224 %build |
|
225 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
|
226 if test "$kdehelperversion" != %{kde_helper_version}; then |
|
227 echo fix kde helper version in the .spec file |
|
228 exit 1 |
|
229 fi |
181 export MOZ_BUILD_DATE=%{releasedate} |
230 export MOZ_BUILD_DATE=%{releasedate} |
182 export MOZILLA_OFFICIAL=1 |
231 export MOZILLA_OFFICIAL=1 |
183 export BUILD_OFFICIAL=1 |
232 export BUILD_OFFICIAL=1 |
184 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" |
233 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" |
|
234 %ifarch ppc64 |
|
235 export CFLAGS="$CFLAGS -mminimal-toc" |
|
236 %endif |
185 export CXXFLAGS="$CFLAGS" |
237 export CXXFLAGS="$CFLAGS" |
186 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig |
238 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig |
|
239 %if 0%{?use_xulrunner} |
187 SDKDIR=$(pkg-config --variable=sdkdir libxul) |
240 SDKDIR=$(pkg-config --variable=sdkdir libxul) |
|
241 %endif |
188 cat << EOF > $MOZCONFIG |
242 cat << EOF > $MOZCONFIG |
189 mk_add_options MOZILLA_OFFICIAL=1 |
243 mk_add_options MOZILLA_OFFICIAL=1 |
190 mk_add_options BUILD_OFFICIAL=1 |
244 mk_add_options BUILD_OFFICIAL=1 |
|
245 mk_add_options MOZ_MILESTONE_RELEASE=1 |
191 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} |
246 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} |
192 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj |
247 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj |
193 . \$topsrcdir/browser/config/mozconfig |
248 . \$topsrcdir/browser/config/mozconfig |
194 ac_add_options --prefix=%{_prefix} |
249 ac_add_options --prefix=%{_prefix} |
195 ac_add_options --libdir=%{_libdir} |
250 ac_add_options --libdir=%{_libdir} |
200 ac_add_options --with-system-nss |
255 ac_add_options --with-system-nss |
201 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n |
256 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n |
202 ac_add_options --with-system-jpeg |
257 ac_add_options --with-system-jpeg |
203 #ac_add_options --with-system-png # doesn't work because of missing APNG support |
258 #ac_add_options --with-system-png # doesn't work because of missing APNG support |
204 ac_add_options --with-system-zlib |
259 ac_add_options --with-system-zlib |
|
260 ac_add_options --enable-startup-notification |
|
261 ac_add_options --enable-system-hunspell |
205 ac_add_options --disable-installer |
262 ac_add_options --disable-installer |
206 ac_add_options --disable-updater |
263 ac_add_options --disable-updater |
207 ac_add_options --disable-tests |
264 ac_add_options --disable-tests |
208 ac_add_options --disable-debug |
|
209 ac_add_options --enable-update-channel=beta |
265 ac_add_options --enable-update-channel=beta |
|
266 #ac_add_options --enable-debug |
210 EOF |
267 EOF |
211 %if 0%{?use_xulrunner} |
268 %if 0%{?use_xulrunner} |
212 cat << EOF >> $MOZCONFIG |
269 cat << EOF >> $MOZCONFIG |
213 ac_add_options --with-libxul-sdk=$SDKDIR |
270 ac_add_options --with-libxul-sdk=$SDKDIR |
214 EOF |
271 EOF |
215 %endif |
272 %endif |
216 %if %branding |
273 %if %branding |
217 cat << EOF >> $MOZCONFIG |
274 cat << EOF >> $MOZCONFIG |
218 ac_add_options --enable-official-branding |
275 ac_add_options --enable-official-branding |
|
276 EOF |
|
277 %endif |
|
278 %if %suse_version > 1110 |
|
279 cat << EOF >> $MOZCONFIG |
|
280 ac_add_options --enable-libproxy |
|
281 EOF |
|
282 %endif |
|
283 %if ! %crashreporter |
|
284 cat << EOF >> $MOZCONFIG |
|
285 ac_add_options --disable-crashreporter |
|
286 EOF |
|
287 %endif |
|
288 %if ! %plugincontainer |
|
289 cat << EOF >> $MOZCONFIG |
|
290 # Chromium IPC is not ported to Power,S/390 and Itanium (currently just x86,x86_64 and arm) |
|
291 ac_add_options --disable-ipc |
219 EOF |
292 EOF |
220 %endif |
293 %endif |
221 make -f client.mk build |
294 make -f client.mk build |
222 |
295 |
223 %install |
296 %install |
301 rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh |
374 rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh |
302 rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE |
375 rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE |
303 # fdupes |
376 # fdupes |
304 %fdupes $RPM_BUILD_ROOT%{progdir} |
377 %fdupes $RPM_BUILD_ROOT%{progdir} |
305 %fdupes $RPM_BUILD_ROOT%{_datadir} |
378 %fdupes $RPM_BUILD_ROOT%{_datadir} |
|
379 # create breakpad debugsymbols |
|
380 %if %crashreporter && !0%{?use_xulrunner} |
|
381 SYMBOLS_NAME="firefox-%{version}-%{release}.%{_arch}-%{suse_version}-symbols" |
|
382 make buildsymbols \ |
|
383 SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \ |
|
384 SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \ |
|
385 SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME" |
|
386 if [ -e dist/*symbols.zip ]; then |
|
387 mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/ |
|
388 cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/ |
|
389 fi |
|
390 %endif |
306 |
391 |
307 %clean |
392 %clean |
308 rm -rf $RPM_BUILD_ROOT |
393 rm -rf $RPM_BUILD_ROOT |
309 %if %localize |
394 %if %localize |
310 rm -rf %{_tmppath}/translations.* |
395 rm -rf %{_tmppath}/translations.* |
322 %else |
407 %else |
323 if [ -f opt/gnome/bin/update-mime-database ] ; then |
408 if [ -f opt/gnome/bin/update-mime-database ] ; then |
324 opt/gnome/bin/update-mime-database > /dev/null || : |
409 opt/gnome/bin/update-mime-database > /dev/null || : |
325 fi |
410 fi |
326 %endif |
411 %endif |
327 # move plugins to new location |
|
328 if [ "$1" = "2" ]; then |
|
329 if [ -d /opt/MozillaFirefox/%{_lib}/plugins ]; then |
|
330 rm -rf /opt/MozillaFirefox/%{_lib}/plugins/libnullplugin.so |
|
331 cp -fud /opt/MozillaFirefox/%{_lib}/plugins/* %{progdir}/plugins |
|
332 rm -rf /opt/MozillaFirefox/%{_lib}/plugins |
|
333 fi |
|
334 fi |
|
335 exit 0 |
412 exit 0 |
336 |
413 |
337 %postun |
414 %postun |
338 if [ -f usr/bin/update-mime-database ] ; then |
415 if [ -f usr/bin/update-mime-database ] ; then |
339 usr/bin/update-mime-database %{_datadir}/mime > /dev/null || : |
416 usr/bin/update-mime-database %{_datadir}/mime > /dev/null || : |