]>
Commit | Line | Data |
---|---|---|
82f606de | 1 | # NOTE: PLD distributes iceweasel instead |
dfdf0ac8 | 2 | # |
0d00fa1b | 3 | # TODO: |
cec5c010 ER |
4 | # - (12:22:58) patrys: can you also move _libdir/mozilla-firefox to just _libdir/firefox? |
5 | # (12:23:25) patrys: it's not like we ship official firefox | |
0af918cf | 6 | # - fix wrapper script to allow playing with profiles (must not use -remote) |
2f695f11 | 7 | # |
ca6a7239 | 8 | # Conditional build: |
4ab16c9e | 9 | %bcond_with tests # enable tests (whatever they check) |
a9334f16 | 10 | %bcond_with gtk3 # GTK+ 3.x instead of 2.x |
2a673919 | 11 | %bcond_without kerberos # disable krb5 support |
08ccc3c5 JB |
12 | %bcond_with xulrunner # system xulrunner [no longer supported] |
13 | # - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964 | |
37413542 | 14 | %bcond_with shared_js # shared libmozjs library [broken] |
2a673919 | 15 | |
d97ddc70 JB |
16 | %if %{without xulrunner} |
17 | # The actual sqlite version (see RHBZ#480989): | |
18 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
19 | %endif | |
20 | ||
08ccc3c5 JB |
21 | %define nspr_ver 4.10.6 |
22 | %define nss_ver 3.17.1 | |
96ef4151 | 23 | |
52dbdf60 | 24 | Summary: Firefox Community Edition web browser |
948d1385 | 25 | Summary(pl.UTF-8): Firefox Community Edition - przeglądarka WWW |
ea721d92 | 26 | Name: mozilla-firefox |
37413542 | 27 | Version: 33.0.2 |
e6902292 | 28 | Release: 1 |
a9334f16 | 29 | License: MPL v2.0 |
51c0f20a | 30 | Group: X11/Applications/Networking |
96ef4151 | 31 | Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.bz2 |
37413542 | 32 | # Source0-md5: 385ad037451f141b68515c73cad01704 |
96ef4151 JB |
33 | Source3: %{name}.desktop |
34 | Source4: %{name}.sh | |
c5cd9be2 JB |
35 | Source5: vendor.js |
36 | Source6: vendor-ac.js | |
64fa34f7 | 37 | Patch0: %{name}-branding.patch |
64fa34f7 JB |
38 | Patch7: %{name}-prefs.patch |
39 | Patch9: %{name}-no-subshell.patch | |
96ef4151 JB |
40 | Patch11: %{name}-middle_click_paste.patch |
41 | Patch12: %{name}-packaging.patch | |
96ef4151 | 42 | Patch13: %{name}-system-virtualenv.patch |
c5cd9be2 | 43 | Patch15: %{name}-Disable-Firefox-Health-Report.patch |
5f561b4c | 44 | URL: http://www.mozilla.org/projects/firefox/ |
0fca8d8d | 45 | BuildRequires: OpenGL-devel |
d97ddc70 | 46 | BuildRequires: alsa-lib-devel |
e933d2a8 | 47 | BuildRequires: automake |
d97ddc70 | 48 | BuildRequires: bzip2-devel |
0fca8d8d | 49 | BuildRequires: cairo-devel >= 1.10.2-5 |
09328230 | 50 | BuildRequires: dbus-glib-devel >= 0.60 |
37413542 | 51 | BuildRequires: freetype-devel >= 1:2.1.8 |
c5cd9be2 | 52 | BuildRequires: gcc-c++ >= 6:4.4 |
96ef4151 | 53 | BuildRequires: glib2-devel >= 1:2.20 |
08ccc3c5 JB |
54 | BuildRequires: gstreamer-devel >= 1.0 |
55 | BuildRequires: gstreamer-plugins-base-devel >= 1.0 | |
a9334f16 JB |
56 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.14} |
57 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} | |
2a673919 | 58 | %{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1} |
37413542 | 59 | BuildRequires: hunspell-devel >= 1.2.3 |
8a88dcf7 | 60 | BuildRequires: libIDL-devel >= 0.8.0 |
d97ddc70 | 61 | BuildRequires: libdnet-devel |
0fca8d8d | 62 | BuildRequires: libevent-devel >= 1.4.7 |
4ac83cfe JB |
63 | # standalone libffi 3.0.9 or gcc's from 4.5(?)+ |
64 | BuildRequires: libffi-devel >= 6:3.0.9 | |
a9334f16 | 65 | BuildRequires: libicu-devel >= 50.1 |
96ef4151 | 66 | # requires libjpeg-turbo implementing at least libjpeg 6b API |
ea721d92 | 67 | BuildRequires: libjpeg-devel >= 6b |
96ef4151 | 68 | BuildRequires: libjpeg-turbo-devel |
2a673919 | 69 | BuildRequires: libpng(APNG)-devel >= 0.10 |
08ccc3c5 | 70 | BuildRequires: libpng-devel >= 2:1.6.10 |
c5cd9be2 | 71 | BuildRequires: libstdc++-devel >= 6:4.4 |
a9334f16 | 72 | BuildRequires: libvpx-devel >= 1.3.0 |
96ef4151 JB |
73 | BuildRequires: nspr-devel >= 1:%{nspr_ver} |
74 | BuildRequires: nss-devel >= 1:%{nss_ver} | |
08ccc3c5 | 75 | BuildRequires: pango-devel >= 1:1.22.0 |
a9334f16 | 76 | BuildRequires: pixman-devel >= 0.19.2 |
56cf7ebf | 77 | BuildRequires: perl-modules >= 5.004 |
1bb00684 | 78 | BuildRequires: pkgconfig |
b73005e5 | 79 | BuildRequires: pkgconfig(libffi) >= 3.0.9 |
08ccc3c5 | 80 | BuildRequires: pulseaudio-devel |
37413542 JB |
81 | BuildRequires: python-modules >= 1:2.5 |
82 | BuildRequires: python-virtualenv >= 1.9.1-4 | |
08ccc3c5 | 83 | BuildRequires: readline-devel |
6b1581cf | 84 | BuildRequires: rpm >= 4.4.9-56 |
9df03825 | 85 | BuildRequires: rpmbuild(macros) >= 1.601 |
08ccc3c5 | 86 | BuildRequires: sqlite3-devel >= 3.8.5 |
d97ddc70 | 87 | BuildRequires: startup-notification-devel >= 0.8 |
0fca8d8d | 88 | BuildRequires: xorg-lib-libXScrnSaver-devel |
446ffaab | 89 | BuildRequires: xorg-lib-libXext-devel |
446ffaab | 90 | BuildRequires: xorg-lib-libXinerama-devel |
de5abc0a | 91 | BuildRequires: xorg-lib-libXt-devel |
f99152f1 | 92 | %if %{with xulrunner} |
0fca8d8d | 93 | BuildRequires: xulrunner-devel >= 2:%{version} |
f99152f1 | 94 | %endif |
b0a3aa79 | 95 | BuildRequires: zip |
1dd3785b | 96 | BuildRequires: zlib-devel >= 1.2.3 |
f37c2ce5 | 97 | Requires(post): mktemp >= 1.5-18 |
96ef4151 | 98 | Requires: desktop-file-utils |
c5cd9be2 | 99 | Requires: hicolor-icon-theme |
d97ddc70 JB |
100 | %if %{with xulrunner} |
101 | %requires_eq_to xulrunner xulrunner-devel | |
102 | %else | |
1408fb17 | 103 | Requires: browser-plugins >= 2.0 |
0fca8d8d | 104 | Requires: cairo >= 1.10.2-5 |
82f606de | 105 | Requires: dbus-glib >= 0.60 |
96ef4151 | 106 | Requires: glib2 >= 1:2.20 |
a9334f16 JB |
107 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.14} |
108 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} | |
96ef4151 | 109 | Requires: libjpeg-turbo |
08ccc3c5 | 110 | Requires: libpng >= 2:1.6.10 |
2a673919 | 111 | Requires: libpng(APNG) >= 0.10 |
a9334f16 | 112 | Requires: libvpx >= 1.3.0 |
d97ddc70 | 113 | Requires: myspell-common |
96ef4151 JB |
114 | Requires: nspr >= 1:%{nspr_ver} |
115 | Requires: nss >= 1:%{nss_ver} | |
08ccc3c5 | 116 | Requires: pango >= 1:1.22.0 |
d97ddc70 | 117 | Requires: sqlite3 >= %{sqlite_build_version} |
82f606de | 118 | Requires: startup-notification >= 0.8 |
f99152f1 | 119 | %endif |
0d52cac8 | 120 | Provides: wwwbrowser |
51c0f20a | 121 | Obsoletes: mozilla-firebird |
2620301e | 122 | Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3 |
c2814220 | 123 | Obsoletes: mozilla-firefox-libs |
4ac83cfe | 124 | Conflicts: mozilla-firefox-lang-resources < %{version} |
ea721d92 | 125 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
126 | ||
96ef4151 JB |
127 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ |
128 | ||
09328230 JB |
129 | # don't satisfy other packages (don't use %{name} here) |
130 | %define _noautoprovfiles %{_libdir}/mozilla-firefox | |
64fa34f7 | 131 | %if %{without xulrunner} |
4c7e703c | 132 | # and as we don't provide them, don't require either |
96ef4151 | 133 | %define _noautoreq libmozalloc.so libmozjs.so libxpcom.so libxul.so |
64fa34f7 | 134 | %endif |
c14d6140 | 135 | |
ea721d92 | 136 | %description |
52dbdf60 ER |
137 | Firefox Community Edition is an open-source web browser, designed for |
138 | standards compliance, performance and portability. | |
ea721d92 | 139 | |
eace6cdf | 140 | %description -l pl.UTF-8 |
c0bec9dd | 141 | Firefox Community Edition jest przeglądarką WWW rozpowszechnianą |
e236f127 | 142 | zgodnie z ideami ruchu otwartego oprogramowania oraz tworzoną z myślą |
143 | o zgodności ze standardami, wydajnością i przenośnością. | |
ea721d92 | 144 | |
145 | %prep | |
d97ddc70 | 146 | %setup -qc |
0fca8d8d | 147 | mv -f mozilla-release mozilla |
56143477 | 148 | cd mozilla |
d97ddc70 | 149 | |
d541162e | 150 | %patch0 -p1 |
d1eea1c3 | 151 | %patch7 -p1 |
64fa34f7 | 152 | %patch9 -p2 |
96ef4151 JB |
153 | %patch11 -p2 |
154 | %patch12 -p2 | |
155 | %patch13 -p2 | |
c5cd9be2 | 156 | %patch15 -p1 |
29b16068 | 157 | |
ea721d92 | 158 | %build |
56143477 | 159 | cd mozilla |
08ccc3c5 | 160 | cp -pf %{_datadir}/automake/config.* build/autoconf |
52befddb | 161 | |
08ccc3c5 JB |
162 | cat << 'EOF' > .mozconfig |
163 | . $topsrcdir/browser/config/mozconfig | |
52befddb | 164 | |
2620301e | 165 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu} |
2620301e | 166 | |
f37c2ce5 | 167 | # Options for 'configure' (same as command-line options). |
c5cd9be2 JB |
168 | ac_add_options --build=%{_target_platform} |
169 | ac_add_options --host=%{_target_platform} | |
52befddb | 170 | ac_add_options --prefix=%{_prefix} |
171 | ac_add_options --exec-prefix=%{_exec_prefix} | |
172 | ac_add_options --bindir=%{_bindir} | |
173 | ac_add_options --sbindir=%{_sbindir} | |
174 | ac_add_options --sysconfdir=%{_sysconfdir} | |
175 | ac_add_options --datadir=%{_datadir} | |
176 | ac_add_options --includedir=%{_includedir} | |
177 | ac_add_options --libdir=%{_libdir} | |
178 | ac_add_options --libexecdir=%{_libexecdir} | |
179 | ac_add_options --localstatedir=%{_localstatedir} | |
180 | ac_add_options --sharedstatedir=%{_sharedstatedir} | |
181 | ac_add_options --mandir=%{_mandir} | |
182 | ac_add_options --infodir=%{_infodir} | |
cf471ce5 | 183 | %if %{?debug:1}0 |
f37c2ce5 | 184 | ac_add_options --disable-optimize |
52befddb | 185 | ac_add_options --enable-debug |
186 | ac_add_options --enable-debug-modules | |
f37c2ce5 ER |
187 | ac_add_options --enable-debugger-info-modules |
188 | ac_add_options --enable-crash-on-assert | |
52befddb | 189 | %else |
190 | ac_add_options --disable-debug | |
2620301e | 191 | ac_add_options --disable-debug-modules |
f37c2ce5 | 192 | ac_add_options --disable-logging |
2a673919 | 193 | ac_add_options --enable-optimize="%{rpmcflags} -Os" |
52befddb | 194 | %endif |
d97ddc70 JB |
195 | ac_add_options --disable-strip |
196 | ac_add_options --disable-strip-libs | |
c5cd9be2 | 197 | ac_add_options --disable-install-strip |
52befddb | 198 | %if %{with tests} |
199 | ac_add_options --enable-tests | |
a9334f16 | 200 | ac_add_options --enable-mochitest |
c4f9bb37 | 201 | %else |
52befddb | 202 | ac_add_options --disable-tests |
a9334f16 | 203 | ac_add_options --disable-mochitest |
c4f9bb37 | 204 | %endif |
a9334f16 | 205 | ac_add_options --disable-cpp-exceptions |
c5cd9be2 JB |
206 | ac_add_options --disable-crashreporter |
207 | ac_add_options --disable-elf-dynstr-gc | |
208 | ac_add_options --disable-gconf | |
f37c2ce5 | 209 | ac_add_options --disable-gnomeui |
6800f9e1 | 210 | ac_add_options --disable-gnomevfs |
52befddb | 211 | ac_add_options --disable-installer |
f37c2ce5 | 212 | ac_add_options --disable-javaxpcom |
c5cd9be2 | 213 | ac_add_options --disable-long-long-warning |
a9334f16 | 214 | ac_add_options --disable-necko-wifi |
c5cd9be2 | 215 | ac_add_options --disable-pedantic |
f37c2ce5 | 216 | ac_add_options --disable-updater |
c5cd9be2 JB |
217 | ac_add_options --disable-xterm-updates |
218 | ac_add_options --enable-canvas | |
a9334f16 JB |
219 | ac_add_options --enable-chrome-format=omni |
220 | ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2} | |
08ccc3c5 | 221 | ac_add_options --enable-extensions=default |
0fca8d8d | 222 | ac_add_options --enable-gio |
08ccc3c5 | 223 | ac_add_options --enable-gstreamer=1.0 |
d97ddc70 | 224 | ac_add_options --enable-libxul |
c5cd9be2 | 225 | ac_add_options --enable-mathml |
d97ddc70 | 226 | ac_add_options --enable-pango |
c5cd9be2 | 227 | ac_add_options --enable-readline |
a9334f16 | 228 | ac_add_options --enable-safe-browsing |
08ccc3c5 | 229 | %{?with_shared_js:ac_add_options --enable-shared-js} |
2a673919 | 230 | ac_add_options --enable-startup-notification |
c5cd9be2 | 231 | ac_add_options --enable-svg |
52befddb | 232 | ac_add_options --enable-system-cairo |
c5cd9be2 | 233 | ac_add_options --enable-system-ffi |
d97ddc70 | 234 | ac_add_options --enable-system-hunspell |
dfdf0ac8 | 235 | ac_add_options --enable-system-sqlite |
c5cd9be2 | 236 | ac_add_options --enable-url-classifier |
a9334f16 | 237 | ac_add_options --enable-xinerama |
c5cd9be2 | 238 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
f37c2ce5 | 239 | ac_add_options --with-distribution-id=org.pld-linux |
f99152f1 | 240 | %if %{with xulrunner} |
d97ddc70 | 241 | ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul) |
f99152f1 | 242 | %endif |
2a673919 | 243 | ac_add_options --with-pthreads |
d97ddc70 | 244 | ac_add_options --with-system-bz2 |
2620301e | 245 | ac_add_options --with-system-jpeg |
0fca8d8d JB |
246 | ac_add_options --with-system-libevent |
247 | ac_add_options --with-system-libvpx | |
52befddb | 248 | ac_add_options --with-system-nspr |
f37c2ce5 | 249 | ac_add_options --with-system-nss |
c5cd9be2 | 250 | ac_add_options --with-system-ply |
f37c2ce5 | 251 | ac_add_options --with-system-png |
2620301e | 252 | ac_add_options --with-system-zlib |
a9334f16 | 253 | ac_add_options --with-system-icu |
c5cd9be2 | 254 | ac_add_options --with-x |
52befddb | 255 | EOF |
33f81726 | 256 | |
08ccc3c5 | 257 | %{__make} -j1 -f client.mk build \ |
3d445135 | 258 | CC="%{__cc}" \ |
08ccc3c5 JB |
259 | CXX="%{__cxx}" \ |
260 | MOZ_MAKE_FLAGS="%{_smp_mflags}" | |
ea721d92 | 261 | |
262 | %install | |
263 | rm -rf $RPM_BUILD_ROOT | |
56143477 | 264 | cd mozilla |
45f27404 | 265 | install -d \ |
f37c2ce5 | 266 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \ |
c5cd9be2 JB |
267 | $RPM_BUILD_ROOT%{_desktopdir} \ |
268 | $RPM_BUILD_ROOT%{_datadir}/%{name}/browser \ | |
269 | $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/plugins | |
75e09104 | 270 | |
c5cd9be2 | 271 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins |
8bc15110 | 272 | |
2a673919 | 273 | %{__make} -C obj-%{_target_cpu}/browser/installer stage-package \ |
d541162e | 274 | DESTDIR=$RPM_BUILD_ROOT \ |
c5cd9be2 | 275 | installdir=%{_libdir}/%{name} \ |
f37c2ce5 | 276 | PKG_SKIP_STRIP=1 |
ea721d92 | 277 | |
c5cd9be2 | 278 | cp -a obj-%{_target_cpu}/dist/firefox/* $RPM_BUILD_ROOT%{_libdir}/%{name}/ |
d97ddc70 | 279 | |
0fca8d8d JB |
280 | %if %{with xulrunner} |
281 | # >= 5.0 seems to require this | |
282 | ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner | |
283 | %endif | |
284 | ||
f86547d4 | 285 | # move arch independant ones to datadir |
c5cd9be2 | 286 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome |
8e79a8c3 | 287 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/extensions |
c5cd9be2 JB |
288 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/icons |
289 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/searchplugins | |
f99152f1 | 290 | %if %{without xulrunner} |
c5cd9be2 JB |
291 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults |
292 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/{pref,preferences} | |
293 | %else | |
294 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults | |
f99152f1 | 295 | %endif |
d97ddc70 | 296 | |
c5cd9be2 JB |
297 | ln -s ../../../share/%{name}/browser/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome |
298 | ln -s ../../../share/%{name}/browser/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults | |
8e79a8c3 | 299 | ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions |
c5cd9be2 JB |
300 | ln -s ../../../share/%{name}/browser/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons |
301 | ln -s ../../../share/%{name}/browser/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/searchplugins | |
f86547d4 | 302 | |
f99152f1 | 303 | %if %{without xulrunner} |
f1613d3d | 304 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
4d687af8 | 305 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
f99152f1 | 306 | %endif |
4d687af8 | 307 | |
96ef4151 | 308 | sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox |
82f606de | 309 | chmod 755 $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox |
8bc15110 | 310 | ln -s mozilla-firefox $RPM_BUILD_ROOT%{_bindir}/firefox |
ea721d92 | 311 | |
c5cd9be2 JB |
312 | # install icons and desktop file |
313 | for i in 48 64; do | |
314 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps | |
315 | cp -a browser/branding/unofficial/content/icon${i}.png \ | |
316 | $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/mozilla-firefox.png | |
317 | done | |
318 | ||
96ef4151 | 319 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
ea721d92 | 320 | |
c5cd9be2 JB |
321 | # install our settings |
322 | %if "%{pld_release}" == "ac" | |
323 | cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
324 | %else | |
325 | cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
326 | %endif | |
327 | ||
d97ddc70 | 328 | # files created by firefox -register |
c5cd9be2 JB |
329 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/compreg.dat |
330 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/xpti.dat | |
f37c2ce5 ER |
331 | |
332 | cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate | |
6d77929c | 333 | #!/bin/sh |
050f03d2 | 334 | umask 022 |
c5cd9be2 | 335 | rm -f %{_libdir}/%{name}/browser/components/{compreg,xpti}.dat |
3eeab518 | 336 | |
f37c2ce5 ER |
337 | # it attempts to touch files in $HOME/.mozilla |
338 | # beware if you run this with sudo!!! | |
339 | export HOME=$(mktemp -d) | |
340 | # also TMPDIR could be pointing to sudo user's homedir | |
341 | unset TMPDIR TMP || : | |
3eeab518 | 342 | |
6162f349 | 343 | %{_libdir}/%{name}/firefox -register |
3eeab518 | 344 | |
56143477 | 345 | rm -rf $HOME |
6d77929c | 346 | EOF |
82f606de | 347 | chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
3eeab518 | 348 | |
6d77929c JB |
349 | %clean |
350 | rm -rf $RPM_BUILD_ROOT | |
3eeab518 | 351 | |
b1662829 | 352 | %pretrans |
3e7a635d | 353 | if [ -d %{_libdir}/%{name}/browser/extensions ] && [ ! -L %{_libdir}/%{name}/browser/extensions ]; then |
8e79a8c3 | 354 | install -d %{_datadir}/%{name}/browser |
3e7a635d JB |
355 | if [ -e %{_datadir}/%{name}/browser/extensions ]; then |
356 | mv %{_datadir}/%{name}/browser/extensions{,.rpmsave} | |
357 | fi | |
358 | mv -v %{_libdir}/%{name}/browser/extensions %{_datadir}/%{name}/browser/extensions | |
8e79a8c3 | 359 | fi |
ade6d95c ER |
360 | if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then |
361 | mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave} | |
362 | fi | |
f86547d4 ER |
363 | exit 0 |
364 | ||
6d77929c | 365 | %post |
f37c2ce5 | 366 | %{_sbindir}/%{name}-chrome+xpcom-generate |
4d9eecad | 367 | %update_browser_plugins |
c5cd9be2 | 368 | %update_icon_cache hicolor |
96ef4151 | 369 | %update_desktop_database |
4d9eecad ER |
370 | |
371 | %postun | |
372 | if [ "$1" = 0 ]; then | |
373 | %update_browser_plugins | |
c5cd9be2 | 374 | %update_icon_cache hicolor |
4d9eecad | 375 | fi |
ea0245e6 | 376 | |
ea721d92 | 377 | %files |
378 | %defattr(644,root,root,755) | |
f37c2ce5 | 379 | %attr(755,root,root) %{_bindir}/%{name} |
fb0d8197 | 380 | %attr(755,root,root) %{_bindir}/firefox |
f37c2ce5 ER |
381 | %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate |
382 | ||
c5cd9be2 JB |
383 | %{_desktopdir}/mozilla-firefox.desktop |
384 | %{_iconsdir}/hicolor/*/apps/mozilla-firefox.png | |
385 | ||
4d9eecad ER |
386 | # browser plugins v2 |
387 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
388 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
389 | ||
c2814220 | 390 | %dir %{_libdir}/%{name} |
c5cd9be2 JB |
391 | %dir %{_libdir}/%{name}/browser |
392 | %dir %{_libdir}/%{name}/browser/components | |
c5cd9be2 JB |
393 | %dir %{_libdir}/%{name}/browser/plugins |
394 | ||
395 | %dir %{_datadir}/%{name} | |
396 | %dir %{_datadir}/%{name}/browser | |
8e79a8c3 | 397 | %dir %{_datadir}/%{name}/browser/extensions |
c5cd9be2 JB |
398 | %{_datadir}/%{name}/browser/chrome |
399 | %{_datadir}/%{name}/browser/defaults | |
400 | %{_datadir}/%{name}/browser/icons | |
401 | %{_datadir}/%{name}/browser/searchplugins | |
2a673919 | 402 | |
c5cd9be2 | 403 | # symlinks |
8e79a8c3 | 404 | %{_libdir}/%{name}/browser/extensions |
c5cd9be2 JB |
405 | %{_libdir}/%{name}/browser/chrome |
406 | %{_libdir}/%{name}/browser/icons | |
407 | %{_libdir}/%{name}/browser/searchplugins | |
408 | %if %{with xulrunner} | |
409 | %{_libdir}/%{name}/xulrunner | |
2a673919 | 410 | %endif |
c5cd9be2 | 411 | %{_libdir}/%{name}/browser/defaults |
2a673919 | 412 | |
c5cd9be2 JB |
413 | %attr(755,root,root) %{_libdir}/%{name}/firefox |
414 | %attr(755,root,root) %{_libdir}/%{name}/firefox-bin | |
415 | %attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh | |
2a673919 | 416 | %{_libdir}/%{name}/application.ini |
c5cd9be2 JB |
417 | %{_libdir}/%{name}/browser/blocklist.xml |
418 | %{_libdir}/%{name}/browser/chrome.manifest | |
419 | %{_libdir}/%{name}/browser/components/components.manifest | |
420 | %attr(755,root,root) %{_libdir}/%{name}/browser/components/libbrowsercomps.so | |
421 | # the signature of the default theme | |
8e79a8c3 | 422 | %{_datadir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} |
c5cd9be2 JB |
423 | %{_libdir}/%{name}/browser/omni.ja |
424 | %{_libdir}/%{name}/webapprt | |
425 | %attr(755,root,root) %{_libdir}/%{name}/webapprt-stub | |
0fca8d8d | 426 | |
c5cd9be2 JB |
427 | # files created by firefox -register |
428 | %ghost %{_libdir}/%{name}/browser/components/compreg.dat | |
429 | %ghost %{_libdir}/%{name}/browser/components/xpti.dat | |
0fca8d8d | 430 | |
f99152f1 | 431 | %if %{without xulrunner} |
c5cd9be2 | 432 | # private xulrunner instance |
96ef4151 | 433 | %{_libdir}/%{name}/dependentlibs.list |
f99152f1 | 434 | %{_libdir}/%{name}/platform.ini |
c5cd9be2 JB |
435 | %dir %{_libdir}/%{name}/components |
436 | %{_libdir}/%{name}/components/components.manifest | |
2a673919 | 437 | %attr(755,root,root) %{_libdir}/%{name}/components/libdbusservice.so |
2a673919 | 438 | %attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so |
c5cd9be2 | 439 | %attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so |
08ccc3c5 | 440 | %{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so} |
c5cd9be2 | 441 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so |
f99152f1 | 442 | %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client |
82f606de | 443 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
f99152f1 | 444 | %{_libdir}/%{name}/dictionaries |
c5cd9be2 JB |
445 | %{_libdir}/%{name}/chrome.manifest |
446 | %{_libdir}/%{name}/omni.ja | |
f99152f1 | 447 | %endif |