1 |
# Disable debug rpms (breaks build): |
2 |
%define _enable_debug_packages %{nil} |
3 |
%define debug_package %{nil} |
4 |
|
5 |
# (tpg) MOZILLA_FIVE_HOME |
6 |
%define mozillalibdir %{_libdir}/%{name}-%{version} |
7 |
%define pluginsdir %{_libdir}/mozilla/plugins |
8 |
%define firefox_channel beta |
9 |
|
10 |
%define prerel b2 |
11 |
|
12 |
Summary: Mozilla Firefox web browser |
13 |
Name: firefox-beta |
14 |
Version: 23.0 |
15 |
Release: %mkrel 0.%{prerel}.1 |
16 |
Provides: %{name} = %{version}-0.%{prerel} |
17 |
License: MPLv1+ |
18 |
Group: Networking/WWW |
19 |
Url: http://www.firefox.com/ |
20 |
Source0: http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}%prerel/source/firefox-%{version}%prerel.source.tar.bz2 |
21 |
Source4: %{name}.desktop |
22 |
Source8: firefox-searchengines-duckduckgo.xml |
23 |
Patch1: firefox-lang.patch |
24 |
Patch2: firefox-vendor.patch |
25 |
Patch3: firefox-disable-check-default-browser.patch |
26 |
# (OpenSuse) add patch to make firefox always use /usr/bin/firefox when "make firefox |
27 |
# the default web browser" is used fix mdv bug#58784 |
28 |
Patch5: firefox-3.6.3-appname.patch |
29 |
# (cjw) use system virtualenv |
30 |
Patch7: iceape-2.12-system-virtualenv.patch |
31 |
# (tv) fix build with system cairo (https://bugzilla.mozilla.org/show_bug.cgi?id=722975) |
32 |
Patch10: 722975.patch |
33 |
|
34 |
BuildRequires: gtk+2-devel |
35 |
BuildRequires: unzip |
36 |
BuildRequires: zip |
37 |
BuildRequires: libxinerama-devel |
38 |
BuildRequires: libjpeg-devel |
39 |
BuildRequires: libpng-devel |
40 |
BuildRequires: zlib-devel |
41 |
BuildRequires: glib2-devel |
42 |
BuildRequires: libIDL2-devel |
43 |
BuildRequires: makedepend |
44 |
BuildRequires: nss-devel >= 2:3.13.2 |
45 |
BuildRequires: nss-static-devel |
46 |
BuildRequires: nspr-devel >= 2:4.9.6 |
47 |
BuildRequires: startup-notification-devel |
48 |
BuildRequires: dbus-glib-devel |
49 |
BuildRequires: python |
50 |
BuildRequires: sqlite3-devel >= 3.7.13 |
51 |
%ifnarch %arm %mips |
52 |
BuildRequires: valgrind |
53 |
BuildRequires: java-rpmbuild |
54 |
BuildRequires: yasm >= 1.0.1 |
55 |
%endif |
56 |
%ifarch %arm |
57 |
BuildRequires: libffi-devel |
58 |
%endif |
59 |
BuildRequires: rootcerts |
60 |
BuildRequires: libxt-devel |
61 |
BuildRequires: hunspell-devel |
62 |
BuildRequires: doxygen |
63 |
BuildRequires: pkgconfig(libproxy-1.0) |
64 |
BuildRequires: pkgconfig(alsa) |
65 |
BuildRequires: wget |
66 |
BuildRequires: libnotify-devel |
67 |
BuildRequires: cairo-devel >= 1.10 |
68 |
BuildRequires: mesagl-devel |
69 |
BuildRequires: libvpx-devel |
70 |
BuildRequires: autoconf2.1 |
71 |
BuildRequires: libiw-devel |
72 |
BuildRequires: python-setuptools |
73 |
BuildRequires: python-virtualenv |
74 |
BuildRequires: gstreamer0.10-devel |
75 |
BuildRequires: libgstreamer0.10-plugins-base-devel |
76 |
BuildRequires: pkgconfig(opus) |
77 |
Obsoletes: firefox-aurora < %{version} |
78 |
|
79 |
Provides: webclient |
80 |
#Requires: indexhtml |
81 |
Requires: xdg-utils |
82 |
%define ff_deps myspell-en_US nspluginwrapper |
83 |
Suggests: %{ff_deps} |
84 |
|
85 |
%description |
86 |
The award-winning Web browser is now faster, more secure, and fully customizable |
87 |
to your online life. With Firefox(R), we've added powerful new features that |
88 |
make your online experience even better. It is an 'open source' product which is |
89 |
freely available, and is acquiring a growing proportion of international web |
90 |
browser usage. |
91 |
|
92 |
Firefox claims to offer a more secure web browsing experience than other products, |
93 |
with better protection against spyware and other Internet-based security threats. |
94 |
It includes all the standard features of a modern web browser, like Internet |
95 |
searching, tracking recently visited sites, setting up shortcuts to favourite |
96 |
sites, customising the software behaviour and so on. Firefox also includes |
97 |
features like 'tabbed browsing' (opening several web sites as sections within the |
98 |
same window) and methods for controlling pop-up windows, cookies and downloaded |
99 |
files. |
100 |
|
101 |
%package devel |
102 |
Summary: Development files for %{name} |
103 |
Group: Development/Other |
104 |
|
105 |
%description devel |
106 |
Files and macros mainly for building Firefox extensions. |
107 |
|
108 |
%prep |
109 |
%setup -qn mozilla-%{firefox_channel} |
110 |
%patch1 -p1 -b .lang |
111 |
%patch2 -p1 -b .vendor |
112 |
%patch3 -p1 -b .defaultbrowser |
113 |
|
114 |
#patch7 -p2 -b .system-virtualenv |
115 |
%patch10 -p1 -b .cairo |
116 |
|
117 |
# (tpg) remove ff bookmarks, use mdv ones |
118 |
rm -rf browser/locales/en-US/profile/bookmarks.html |
119 |
touch browser/locales/en-US/profile/bookmarks.html |
120 |
|
121 |
# needed to regenerate certdata.c |
122 |
pushd security/nss/lib/ckfw/builtins |
123 |
perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt |
124 |
popd |
125 |
|
126 |
|
127 |
%build |
128 |
|
129 |
# (gmoro) please dont enable all options by hand |
130 |
# we need to trust firefox defaults |
131 |
export MOZCONFIG=$PWD/mozconfig |
132 |
cat << EOF > $MOZCONFIG |
133 |
mk_add_options MOZILLA_OFFICIAL=1 |
134 |
mk_add_options BUILD_OFFICIAL=1 |
135 |
mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}" |
136 |
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj |
137 |
ac_add_options --host=%{_host} |
138 |
ac_add_options --target=%{_target_platform} |
139 |
ac_add_options --enable-optimize="%{optflags}" |
140 |
ac_add_options --prefix="%{_prefix}" |
141 |
ac_add_options --libdir="%{_libdir}" |
142 |
ac_add_options --sysconfdir="%{_sysconfdir}" |
143 |
ac_add_options --mandir="%{_mandir}" |
144 |
ac_add_options --includedir="%{_includedir}" |
145 |
ac_add_options --datadir="%{_datadir}" |
146 |
ac_add_options --with-system-nspr |
147 |
ac_add_options --with-system-nss |
148 |
ac_add_options --with-system-zlib |
149 |
ac_add_options --with-system-libvpx |
150 |
ac_add_options --enable-webm |
151 |
ac_add_options --enable-gstreamer |
152 |
ac_add_options --enable-gio |
153 |
ac_add_options --disable-gnomevfs |
154 |
ac_add_options --disable-installer |
155 |
ac_add_options --disable-updater |
156 |
ac_add_options --disable-tests |
157 |
ac_add_options --disable-debug |
158 |
ac_add_options --enable-official-branding |
159 |
ac_add_options --enable-libproxy |
160 |
ac_add_options --with-system-png |
161 |
ac_add_options --with-system-jpeg |
162 |
ac_add_options --enable-system-cairo |
163 |
ac_add_options --enable-system-sqlite |
164 |
ac_add_options --enable-startup-notification |
165 |
ac_add_options --enable-xinerama |
166 |
ac_add_options --with-distribution-id=org.mageia |
167 |
ac_add_options --disable-crashreporter |
168 |
ac_add_options --with-valgrind |
169 |
ac_add_options --with-java-include-path=%{java_home}/include |
170 |
ac_add_options --with-java-bin-path=%{java_home}/bin |
171 |
ac_add_options --enable-opus |
172 |
EOF |
173 |
|
174 |
export LDFLAGS="%ldflags" |
175 |
make -f client.mk build |
176 |
|
177 |
%install |
178 |
|
179 |
make -C %{_builddir}/obj/browser/installer STRIP=/bin/true |
180 |
|
181 |
# Copy files to buildroot |
182 |
%{__mkdir_p} %{buildroot}%{mozillalibdir} |
183 |
cp -rf %{_builddir}/obj/dist/firefox/* %{buildroot}%{mozillalibdir} |
184 |
|
185 |
%{__mkdir_p} %{buildroot}%{_bindir} |
186 |
ln -sf %{mozillalibdir}/firefox %{buildroot}%{_bindir}/firefox-%{firefox_channel} |
187 |
mkdir -p %{buildroot}%{mozillalibdir}/defaults/preferences/ |
188 |
|
189 |
# (tpg) desktop entry |
190 |
%{__mkdir_p} %{buildroot}%{_datadir}/applications |
191 |
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/firefox-%{firefox_channel}.desktop |
192 |
|
193 |
# (tpg) icons |
194 |
%{__cp} %{buildroot}%{mozillalibdir}/browser/chrome/icons/default/default16.png %{buildroot}/%{mozillalibdir}/browser/icons/ |
195 |
for i in 16 22 24 32 48 256; do |
196 |
%{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps |
197 |
%{__install} -m 644 browser/branding/official/default$i.png %{buildroot}%{_iconsdir}/hicolor/"$i"x"$i"/apps/firefox-%{firefox_channel}.png ; |
198 |
done |
199 |
|
200 |
# exclusions |
201 |
rm -f %{buildroot}%{mozillalibdir}/README.txt |
202 |
rm -f %{buildroot}%{mozillalibdir}/removed-files |
203 |
rm -f %{buildroot}%{mozillalibdir}/precomplete |
204 |
|
205 |
# this file is only used when creating a new user profile |
206 |
install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js |
207 |
cat << EOF >> %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js |
208 |
user_pref("browser.EULA.override", true); |
209 |
user_pref("browser.shell.checkDefaultBrowser", false); |
210 |
user_pref("browser.startup.homepage", "file:///usr/share/indexhtml/index.html"); |
211 |
user_pref("app.update.auto", false); |
212 |
user_pref("app.update.enabled", false); |
213 |
user_pref("app.update.autoInstallEnabled", false); |
214 |
user_pref("browser.showQuitWarning", true); |
215 |
EOF |
216 |
|
217 |
# display icon for Firefox button |
218 |
%{__mkdir_p} %{buildroot}%{mozillalibdir}/defaults/profile/chrome |
219 |
cat << EOF > %{buildroot}%{mozillalibdir}/defaults/profile/chrome/userChrome.css |
220 |
#appmenu-toolbar-button { |
221 |
list-style-image: url("chrome://branding/content/icon16.png"); |
222 |
} |
223 |
EOF |
224 |
|
225 |
# files in this directory are read on every startup, and can change/add |
226 |
# preferences for existing profiles |
227 |
# extensions.autoDisableScopes is a new preference added in firefox 8 |
228 |
# it defines "scopes" where newly installed addons are disabled by default |
229 |
# this is an additive bit field, and the value defaults to 15 (1+2+4+8) |
230 |
# we need to remove system scope (8) from it so language packs and other addons |
231 |
# which are installed systemwide won't get marked as 3rd party and disabled |
232 |
# documentation: http://kb.mozillazine.org/About:config_entries#Extensions. |
233 |
# or in toolkit/mozapps/extensions/AddonManager.jsm |
234 |
# we also need to disable the "disable addon selection dialog" |
235 |
cat << EOF > %{buildroot}%{mozillalibdir}/defaults/preferences/mga.js |
236 |
pref("extensions.autoDisableScopes", 0); |
237 |
pref("extensions.shownSelectionUI", true); |
238 |
EOF |
239 |
# FIXME: Add it back in mga.js when this search engine will be used by default. |
240 |
# user_pref("browser.search.selectedEngine","duckduckgo.com"); |
241 |
|
242 |
# use the system myspell dictionaries |
243 |
rm -fr %{buildroot}%{mozillalibdir}/dictionaries |
244 |
ln -s %{_datadir}/hunspell %{buildroot}%{mozillalibdir}/dictionaries |
245 |
|
246 |
# (lm) touch and %ghost bookmarks.html to a proper uninstall |
247 |
touch %{buildroot}%{mozillalibdir}/defaults/profile/bookmarks.html |
248 |
|
249 |
%find_lang %{name} |
250 |
|
251 |
mkdir -p %{buildroot}%{_sys_macros_dir} |
252 |
cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros |
253 |
# Macros from %{name} package |
254 |
%%firefox_major %{version} |
255 |
%%firefox_version %{version} |
256 |
%%firefox_mozillapath %{mozillalibdir} |
257 |
%%firefox_pluginsdir %{pluginsdir} |
258 |
%%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
259 |
%%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi) |
260 |
FIN |
261 |
cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/browser/searchplugins/duckduckgo.xml |
262 |
|
263 |
%pre |
264 |
if [ -d %{mozillalibdir}/dictionaries ]; then |
265 |
rm -fr %{mozillalibdir}/dictionaries |
266 |
fi |
267 |
|
268 |
%post |
269 |
if [ ! -r /etc/sysconfig/oem ]; then |
270 |
case `grep META_CLASS /etc/sysconfig/system` in |
271 |
*powerpack) bookmark="mozilla-powerpack.html" ;; |
272 |
*desktop) bookmark="mozilla-one.html";; |
273 |
*) bookmark="mozilla-download.html";; |
274 |
esac |
275 |
ln -s -f ../../../../share/mga/bookmarks/mozilla/$bookmark %{mozillalibdir}/defaults/profile/bookmarks.html |
276 |
fi |
277 |
|
278 |
%files -f %{name}.lang |
279 |
%{_bindir}/firefox-%{firefox_channel} |
280 |
%{_iconsdir}/hicolor/*/apps/*.png |
281 |
%{_datadir}/applications/*.desktop |
282 |
%{_libdir}/%{name}-%{version}* |
283 |
%ghost %{mozillalibdir}/defaults/profile/bookmarks.html |
284 |
|
285 |
%files devel |
286 |
%{_sys_macros_dir}/%{name}.macros |