/[packages]/cauldron/firefox-beta/current/SPECS/firefox-beta.spec
ViewVC logotype

Contents of /cauldron/firefox-beta/current/SPECS/firefox-beta.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30