17 # |
17 # |
18 |
18 |
19 # norootforbuild |
19 # norootforbuild |
20 |
20 |
21 %define major 4 |
21 %define major 4 |
22 %define mainver %major.0 |
22 %define mainver %major.2 |
|
23 %define use_xulrunner 1 |
|
24 %define xulrunner mozilla-xulrunner22 |
23 |
25 |
24 Name: MozillaFirefox |
26 Name: MozillaFirefox |
25 %define use_xulrunner 1 |
27 BuildRequires: autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm libproxy-devel |
26 %define xulrunner mozilla-xulrunner20 |
|
27 BuildRequires: autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm |
|
28 %if %suse_version > 1110 |
28 %if %suse_version > 1110 |
29 BuildRequires: libiw-devel |
29 BuildRequires: libiw-devel |
30 %else |
30 %else |
31 BuildRequires: wireless-tools |
31 BuildRequires: wireless-tools |
32 %endif |
32 %endif |
33 %if 0%{?use_xulrunner} |
33 %if 0%{?use_xulrunner} |
34 BuildRequires: %{xulrunner}-devel = 2.0.0 |
34 BuildRequires: %{xulrunner}-devel = 2.2a |
|
35 %else |
|
36 BuildRequires: mozilla-nspr-devel >= 4.8.6 |
|
37 BuildRequires: mozilla-nss-devel >= 3.12.8 |
|
38 BuildRequires: nss-shared-helper-devel |
35 %endif |
39 %endif |
36 License: MPLv1.1 or GPLv2+ or LGPLv2+ |
40 License: MPLv1.1 or GPLv2+ or LGPLv2+ |
37 Version: %{mainver}.0 |
41 Version: %{mainver}a |
38 Release: 1 |
42 Release: 1 |
39 Provides: web_browser |
43 Provides: web_browser |
40 Provides: firefox = %{version}-%{release} |
44 Provides: firefox = %{version}-%{release} |
41 Provides: firefox = %{mainver} |
45 Provides: firefox = %{mainver} |
42 %define releasedate 2011031700 |
46 %define releasedate 2011041100 |
43 Summary: Mozilla Firefox Web Browser |
47 Summary: Mozilla Firefox Web Browser |
44 Url: http://www.mozilla.org/ |
48 Url: http://www.mozilla.org/ |
45 Group: Productivity/Networking/Web/Browsers |
49 Group: Productivity/Networking/Web/Browsers |
46 Source: firefox-%{version}-source.tar.bz2 |
50 Source: firefox-%{version}-source.tar.bz2 |
47 Source1: MozillaFirefox.desktop |
51 Source1: MozillaFirefox.desktop |
54 Source8: firefox-mimeinfo.xml |
58 Source8: firefox-mimeinfo.xml |
55 Source9: firefox-lockdown.js |
59 Source9: firefox-lockdown.js |
56 Source10: compare-locales.tar.bz2 |
60 Source10: compare-locales.tar.bz2 |
57 Source11: firefox.1 |
61 Source11: firefox.1 |
58 Source12: mozilla-get-app-id |
62 Source12: mozilla-get-app-id |
|
63 Source13: add-plugins.sh.in |
|
64 Source14: create-tar.sh |
|
65 # Gecko/Toolkit |
59 Patch1: toolkit-download-folder.patch |
66 Patch1: toolkit-download-folder.patch |
60 Patch2: firefox-linkorder.patch |
67 Patch2: mozilla-nongnome-proxies.patch |
61 Patch3: firefox-browser-css.patch |
68 Patch3: mozilla-prefer_plugin_pref.patch |
62 Patch4: firefox-cross-desktop.patch |
69 Patch4: mozilla-shared-nss-db.patch |
63 Patch5: firefox-kde.patch |
70 Patch5: mozilla-kde.patch |
64 Patch6: firefox-kde-114.patch |
71 Patch6: mozilla-cairo-lcd.patch |
65 Patch7: firefox-ui-lockdown.patch |
72 Patch7: mozilla-language.patch |
66 Patch8: firefox-no-sync-l10n.patch |
73 Patch8: mozilla-gio.patch |
67 Patch9: firefox-libxulsdk-locales.patch |
74 Patch9: mozilla-cairo-return.patch |
68 Patch10: firefox-no-default-ualocale.patch |
75 Patch10: mozilla-ntlm-full-path.patch |
69 Patch11: firefox-multilocale-chrome.patch |
76 # Firefox/browser |
70 Patch12: firefox-shellservice.patch |
77 Patch30: firefox-linkorder.patch |
71 Patch13: firefox-branded-icons.patch |
78 Patch31: firefox-browser-css.patch |
|
79 Patch32: firefox-cross-desktop.patch |
|
80 Patch33: firefox-kde.patch |
|
81 Patch34: firefox-kde-114.patch |
|
82 Patch35: firefox-ui-lockdown.patch |
|
83 Patch36: firefox-no-sync-l10n.patch |
|
84 Patch37: firefox-libxulsdk-locales.patch |
|
85 Patch38: firefox-no-default-ualocale.patch |
|
86 Patch39: firefox-multilocale-chrome.patch |
|
87 Patch40: firefox-shellservice.patch |
|
88 Patch41: firefox-branded-icons.patch |
72 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
89 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
73 Requires(post): coreutils shared-mime-info desktop-file-utils |
90 Requires(post): coreutils shared-mime-info desktop-file-utils |
74 Requires(postun): shared-mime-info desktop-file-utils |
91 Requires(postun): shared-mime-info desktop-file-utils |
75 %if 0%{?use_xulrunner} |
92 %if 0%{?use_xulrunner} |
76 Requires: %{xulrunner} >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner}) |
93 Requires: %{xulrunner} >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner}) |
77 %requires_eq %{xulrunner} |
94 %requires_eq %{xulrunner} |
78 %ifarch %ix86 |
95 %ifarch %ix86 |
79 Requires: %{xulrunner}-32bit >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner}) |
96 Requires: %{xulrunner}-32bit >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner}) |
80 Requires: %{xulrunner}-32bit = %(rpm -q --queryformat '%{VERSION}' %{xulrunner}) |
97 Requires: %{xulrunner}-32bit = %(rpm -q --queryformat '%{VERSION}' %{xulrunner}) |
81 %endif |
98 %endif |
|
99 %else |
|
100 Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr) |
|
101 Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss) |
82 %endif |
102 %endif |
83 Requires: %{name}-branding >= 4.0 |
103 Requires: %{name}-branding >= 4.0 |
84 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
104 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
85 %define _use_internal_dependency_generator 0 |
105 %define _use_internal_dependency_generator 0 |
86 %define __find_requires sh %{SOURCE4} |
106 %define __find_requires sh %{SOURCE4} |
168 |
190 |
169 %description branding-upstream |
191 %description branding-upstream |
170 This package provides upstream look and feel for MozillaFirefox. |
192 This package provides upstream look and feel for MozillaFirefox. |
171 |
193 |
172 |
194 |
|
195 %if %crashreporter && !0%{?use_xulrunner} |
|
196 %package buildsymbols |
|
197 License: MPLv1.1 or GPLv2+ or LGPLv2+ |
|
198 Summary: Breakpad buildsymbols for %{name} |
|
199 Group: Development/Debug |
|
200 |
|
201 %description buildsymbols |
|
202 This subpackage contains the Breakpad created and compatible debugging |
|
203 symbols meant for upload to Mozilla's crash collector database. |
|
204 %endif |
|
205 |
|
206 |
173 %prep |
207 %prep |
174 %setup -q -n mozilla -b 7 -b 10 |
208 %setup -q -n mozilla -b 7 -b 10 |
175 cd $RPM_BUILD_DIR/mozilla |
209 cd $RPM_BUILD_DIR/mozilla |
176 %patch1 -p1 |
210 %patch1 -p1 |
177 %patch2 -p1 |
211 %patch2 -p1 |
178 %patch3 -p1 |
212 %patch3 -p1 |
179 %patch4 -p1 |
213 %patch4 -p1 |
180 %if %suse_version >= 1110 |
|
181 %patch5 -p1 |
214 %patch5 -p1 |
182 # install kde.js |
|
183 install -m 644 %{SOURCE6} browser/app/profile/kde.js |
|
184 %endif |
|
185 %if %suse_version >= 1140 |
|
186 %patch6 -p1 |
215 %patch6 -p1 |
187 %endif |
216 %patch7 -p1 |
188 #%patch7 -p1 |
|
189 %patch8 -p1 |
217 %patch8 -p1 |
190 %patch9 -p1 |
218 %patch9 -p1 |
191 %patch10 -p1 |
219 %patch10 -p1 |
192 %patch11 -p1 |
220 # |
193 %patch12 -p1 |
221 %patch30 -p1 |
194 %patch13 -p1 |
222 %patch31 -p1 |
|
223 %patch32 -p1 |
|
224 %if %suse_version >= 1110 |
|
225 %patch33 -p1 |
|
226 # install kde.js |
|
227 install -m 644 %{SOURCE6} browser/app/profile/kde.js |
|
228 %endif |
|
229 %if %suse_version >= 1140 |
|
230 %patch34 -p1 |
|
231 %endif |
|
232 #%patch35 -p1 |
|
233 %patch36 -p1 |
|
234 %patch37 -p1 |
|
235 %patch38 -p1 |
|
236 %patch39 -p1 |
|
237 %patch40 -p1 |
|
238 %patch41 -p1 |
195 |
239 |
196 %build |
240 %build |
|
241 %if !0%{?use_xulrunner} |
|
242 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
|
243 if test "$kdehelperversion" != %{kde_helper_version}; then |
|
244 echo fix kde helper version in the .spec file |
|
245 exit 1 |
|
246 fi |
|
247 %endif |
197 export MOZ_BUILD_DATE=%{releasedate} |
248 export MOZ_BUILD_DATE=%{releasedate} |
198 export MOZILLA_OFFICIAL=1 |
249 export MOZILLA_OFFICIAL=1 |
199 export BUILD_OFFICIAL=1 |
250 export BUILD_OFFICIAL=1 |
200 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" |
251 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" |
|
252 %ifarch ppc64 |
|
253 export CFLAGS="$CFLAGS -mminimal-toc" |
|
254 %endif |
201 export CXXFLAGS="$CFLAGS" |
255 export CXXFLAGS="$CFLAGS" |
202 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig |
256 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig |
203 SDKDIR=$(pkg-config --variable=sdkdir libxul) |
257 SDKDIR=$(pkg-config --variable=sdkdir libxul) |
204 cat << EOF > $MOZCONFIG |
258 cat << EOF > $MOZCONFIG |
205 mk_add_options MOZILLA_OFFICIAL=1 |
259 mk_add_options MOZILLA_OFFICIAL=1 |
233 %if %branding |
287 %if %branding |
234 cat << EOF >> $MOZCONFIG |
288 cat << EOF >> $MOZCONFIG |
235 ac_add_options --enable-official-branding |
289 ac_add_options --enable-official-branding |
236 EOF |
290 EOF |
237 %endif |
291 %endif |
238 %ifarch ppc ppc64 s390 s390x |
292 %if %suse_version > 1110 |
|
293 cat << EOF >> $MOZCONFIG |
|
294 ac_add_options --enable-libproxy |
|
295 EOF |
|
296 %endif |
|
297 %if ! %crashreporter |
|
298 cat << EOF >> $MOZCONFIG |
|
299 ac_add_options --disable-crashreporter |
|
300 EOF |
|
301 %endif |
|
302 %if ! %plugincontainer |
239 cat << EOF >> $MOZCONFIG |
303 cat << EOF >> $MOZCONFIG |
240 ac_add_options --disable-ipc |
304 ac_add_options --disable-ipc |
241 EOF |
305 EOF |
242 %endif |
306 %endif |
243 make -f client.mk build |
307 make -f client.mk build |
327 rm -f $RPM_BUILD_ROOT%{progdir}/removed-files |
391 rm -f $RPM_BUILD_ROOT%{progdir}/removed-files |
328 rm -f $RPM_BUILD_ROOT%{progdir}/README.txt |
392 rm -f $RPM_BUILD_ROOT%{progdir}/README.txt |
329 rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties |
393 rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties |
330 rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh |
394 rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh |
331 rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE |
395 rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE |
|
396 rm -f $RPM_BUILD_ROOT%{progdir}/precomplete |
332 # devel |
397 # devel |
333 mkdir -p %{buildroot}%{_bindir} |
398 mkdir -p %{buildroot}%{_bindir} |
334 install -m 755 %SOURCE12 %{buildroot}%{_bindir} |
399 install -m 755 %SOURCE12 %{buildroot}%{_bindir} |
335 # inspired by mandriva |
400 # inspired by mandriva |
336 mkdir -p %{buildroot}/etc/rpm |
401 mkdir -p %{buildroot}/etc/rpm |