]>
Commit | Line | Data |
---|---|---|
aa946041 | 1 | # TODO: |
4dc7b9b3 | 2 | # - provide proper $DISPLAY for PGO (Xvfb, Xdummy...) for unattended builds |
64fd9f61 | 3 | # |
64fd9f61 | 4 | # Conditional build: |
25f97994 | 5 | %bcond_with tests # enable tests (whatever they check) |
0ddb6810 | 6 | %bcond_with gtk3 # GTK+ 3.x instead of 2.x |
25f97994 | 7 | %bcond_without kerberos # disable krb5 support |
061b2dbd | 8 | %bcond_with xulrunner # system xulrunner |
aa946041 | 9 | %bcond_with pgo # PGO-enabled build (requires working $DISPLAY == :100) |
557bfdce JR |
10 | # - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964 |
11 | %bcond_with shared_js | |
25f97994 | 12 | |
0ddb6810 | 13 | # convert firefox release number to platform version: 29.0.x -> 29.0.x |
a1c18581 AM |
14 | %define xulrunner_main 31.0 |
15 | %define xulrunner_ver %(v=%{version}; echo %{xulrunner_main}${v#31.0}) | |
95d7e788 | 16 | |
edeacddd ER |
17 | %if %{without xulrunner} |
18 | # The actual sqlite version (see RHBZ#480989): | |
19 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
20 | %endif | |
21 | ||
557bfdce | 22 | %define nspr_ver 4.10.6 |
0ddb6810 | 23 | %define nss_ver 3.16 |
837c600d | 24 | |
636318c9 | 25 | Summary: Iceweasel web browser |
3c179095 | 26 | Summary(hu.UTF-8): Iceweasel web böngésző |
1c0db0f7 | 27 | Summary(pl.UTF-8): Iceweasel - przeglądarka WWW |
636318c9 | 28 | Name: iceweasel |
4b35e69c | 29 | Version: 32.0.3 |
12d8053e | 30 | Release: 3 |
0ddb6810 | 31 | License: MPL v2.0 |
64fd9f61 | 32 | Group: X11/Applications/Networking |
57727a75 | 33 | Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.bz2 |
4b35e69c | 34 | # Source0-md5: 618bf992a5cb80f8879435262bdfcee0 |
f7893426 | 35 | Source1: %{name}-branding.tar.xz |
af9879cf | 36 | # Source1-md5: 6e3c10921c5b243f33241646b7941ce9 |
6263e082 | 37 | Source2: %{name}-rm_nonfree.sh |
38 | Source3: %{name}.desktop | |
39 | Source4: %{name}.sh | |
55f0784a JR |
40 | Source5: vendor.js |
41 | Source6: vendor-ac.js | |
25f97994 | 42 | Patch0: %{name}-branding.patch |
da892b7e | 43 | |
25f97994 | 44 | Patch7: %{name}-prefs.patch |
0b8ebf73 | 45 | Patch8: %{name}-pld-branding.patch |
9f488603 | 46 | Patch9: %{name}-no-subshell.patch |
93241bee | 47 | Patch11: %{name}-middle_click_paste.patch |
d8c2b732 | 48 | Patch12: %{name}-packaging.patch |
6a75f2e2 | 49 | Patch13: system-virtualenv.patch |
ebf1b795 | 50 | Patch15: Disable-Firefox-Health-Report.patch |
743c829e | 51 | URL: http://www.pld-linux.org/Packages/Iceweasel |
bcf987c2 | 52 | BuildRequires: OpenGL-devel |
4a6ac63f | 53 | BuildRequires: ImageMagick |
f26228e9 | 54 | BuildRequires: ImageMagick-coder-png |
72c3acea | 55 | BuildRequires: alsa-lib-devel |
64fd9f61 | 56 | BuildRequires: automake |
526c2cf9 | 57 | BuildRequires: bzip2-devel |
ec8ea9c6 | 58 | BuildRequires: cairo-devel >= 1.10.2-5 |
72c3acea | 59 | BuildRequires: dbus-glib-devel >= 0.60 |
087998e5 | 60 | BuildRequires: gcc-c++ >= 6:4.4 |
11a3f988 | 61 | BuildRequires: glib2-devel >= 1:2.20 |
557bfdce JR |
62 | BuildRequires: gstreamer-devel >= 1.0 |
63 | BuildRequires: gstreamer-plugins-base-devel >= 1.0 | |
0ddb6810 JB |
64 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.14} |
65 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0} | |
25f97994 | 66 | %{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1} |
1668aa38 | 67 | BuildRequires: hunspell-devel |
64fd9f61 | 68 | BuildRequires: libIDL-devel >= 0.8.0 |
526c2cf9 | 69 | BuildRequires: libdnet-devel |
fa89a5f1 | 70 | BuildRequires: libevent-devel >= 1.4.7 |
58f7b9e2 JB |
71 | # standalone libffi 3.0.9 or gcc's from 4.5(?)+ |
72 | BuildRequires: libffi-devel >= 6:3.0.9 | |
0ddb6810 | 73 | BuildRequires: libicu-devel >= 50.1 |
dab03435 | 74 | # requires libjpeg-turbo implementing at least libjpeg 6b API |
64fd9f61 | 75 | BuildRequires: libjpeg-devel >= 6b |
dab03435 | 76 | BuildRequires: libjpeg-turbo-devel |
2b51aba4 AM |
77 | # for rsvg-convert |
78 | BuildRequires: librsvg | |
25f97994 | 79 | BuildRequires: libpng(APNG)-devel >= 0.10 |
ba5d7125 | 80 | BuildRequires: libpng-devel >= 2:1.6.7 |
087998e5 | 81 | BuildRequires: libstdc++-devel >= 6:4.4 |
0ddb6810 | 82 | BuildRequires: libvpx-devel >= 1.3.0 |
837c600d JR |
83 | BuildRequires: nspr-devel >= 1:%{nspr_ver} |
84 | BuildRequires: nss-devel >= 1:%{nss_ver} | |
18df252d | 85 | BuildRequires: pango-devel >= 1:1.14.0 |
0ddb6810 | 86 | BuildRequires: pixman-devel >= 0.19.2 |
64fd9f61 | 87 | BuildRequires: perl-modules >= 5.004 |
88 | BuildRequires: pkgconfig | |
58f7b9e2 | 89 | BuildRequires: pkgconfig(libffi) >= 3.0.9 |
72c3acea | 90 | BuildRequires: python-modules |
aa946041 | 91 | %{?with_pgo:BuildRequires: python-modules-sqlite} |
6a75f2e2 | 92 | BuildRequires: python-virtualenv |
25f97994 | 93 | BuildRequires: rpm >= 4.4.9-56 |
28e49f45 | 94 | BuildRequires: rpmbuild(macros) >= 1.601 |
557bfdce | 95 | BuildRequires: sqlite3-devel >= 3.8.3.1 |
72c3acea | 96 | BuildRequires: startup-notification-devel >= 0.8 |
fa89a5f1 | 97 | BuildRequires: xorg-lib-libXScrnSaver-devel |
18df252d | 98 | BuildRequires: xorg-lib-libXext-devel |
18df252d | 99 | BuildRequires: xorg-lib-libXinerama-devel |
64fd9f61 | 100 | BuildRequires: xorg-lib-libXt-devel |
25f97994 | 101 | %if %{with xulrunner} |
c4d76d99 | 102 | BuildRequires: xulrunner-devel >= 2:%{xulrunner_ver} |
25f97994 | 103 | %endif |
64fd9f61 | 104 | BuildRequires: zip |
105 | BuildRequires: zlib-devel >= 1.2.3 | |
636318c9 | 106 | Requires(post): mktemp >= 1.5-18 |
8309582e | 107 | Requires: desktop-file-utils |
28e49f45 | 108 | Requires: hicolor-icon-theme |
43cd2d9e ER |
109 | %if %{with xulrunner} |
110 | %requires_eq_to xulrunner xulrunner-devel | |
111 | %else | |
25f97994 | 112 | Requires: browser-plugins >= 2.0 |
9bc7e413 | 113 | Requires: cairo >= 1.10.2-5 |
18df252d | 114 | Requires: dbus-glib >= 0.60 |
11a3f988 | 115 | Requires: glib2 >= 1:2.20 |
0ddb6810 JB |
116 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.14} |
117 | %{?with_gtk3:Requires: gtk+3 >= 3.0.0} | |
dab03435 | 118 | Requires: libjpeg-turbo |
ba5d7125 | 119 | Requires: libpng >= 2:1.6.7 |
25f97994 | 120 | Requires: libpng(APNG) >= 0.10 |
0ddb6810 | 121 | Requires: libvpx >= 1.3.0 |
3c179095 | 122 | Requires: myspell-common |
837c600d JR |
123 | Requires: nspr >= 1:%{nspr_ver} |
124 | Requires: nss >= 1:%{nss_ver} | |
18df252d | 125 | Requires: pango >= 1:1.14.0 |
edeacddd | 126 | Requires: sqlite3 >= %{sqlite_build_version} |
18df252d | 127 | Requires: startup-notification >= 0.8 |
25f97994 | 128 | %endif |
64fd9f61 | 129 | Provides: wwwbrowser |
25f97994 | 130 | Obsoletes: mozilla-firebird |
131 | Obsoletes: mozilla-firefox | |
132 | Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3 | |
133 | Obsoletes: mozilla-firefox-libs | |
8f1f83ff | 134 | Conflicts: iceweasel-lang-resources < %{version} |
64fd9f61 | 135 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
136 | ||
10a03c86 AM |
137 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ |
138 | ||
18df252d JB |
139 | # don't satisfy other packages |
140 | %define _noautoprovfiles %{_libdir}/%{name} | |
0044292b | 141 | %if %{without xulrunner} |
25f97994 | 142 | # and as we don't provide them, don't require either |
0044292b JB |
143 | %define _noautoreq libmozalloc.so libmozjs.so libxpcom.so libxul.so |
144 | %endif | |
64fd9f61 | 145 | |
64fd9f61 | 146 | %description |
25f97994 | 147 | Iceweasel is an open-source web browser, designed for standards |
148 | compliance, performance and portability. | |
64fd9f61 | 149 | |
3c179095 ZU |
150 | %description -l hu.UTF-8 |
151 | Iceweasel egy nyílt forrású webböngésző, hatékonyságra és | |
152 | hordozhatóságra tervezve. | |
153 | ||
6d49053f | 154 | %description -l pl.UTF-8 |
25f97994 | 155 | Iceweasel jest przeglądarką WWW rozpowszechnianą zgodnie z ideami |
3c179095 ZU |
156 | ruchu otwartego oprogramowania oraz tworzoną z myślą o zgodności ze |
157 | standardami, wydajnością i przenośnością. | |
64fd9f61 | 158 | |
25f97994 | 159 | %prep |
ed3ba396 | 160 | %setup -qc |
dca77f61 | 161 | mv -f mozilla-release mozilla |
ed3ba396 | 162 | %setup -q -T -D -a1 |
25f97994 | 163 | cd mozilla |
6263e082 | 164 | /bin/sh %{SOURCE2} |
64fd9f61 | 165 | |
e73b7e54 | 166 | %patch0 -p1 |
da892b7e | 167 | |
25f97994 | 168 | %patch7 -p1 |
0b8ebf73 | 169 | %patch8 -p1 |
9f488603 | 170 | %patch9 -p2 |
93241bee | 171 | %patch11 -p2 |
5a357718 | 172 | %patch12 -p2 |
6a75f2e2 | 173 | %patch13 -p2 |
ebf1b795 | 174 | %patch15 -p1 |
b72a40b3 | 175 | |
aa946041 ŁK |
176 | %if %{with pgo} |
177 | sed -i -e 's@__BROWSER_PATH__@"../../dist/bin/iceweasel-bin"@' build/automation.py.in | |
178 | %endif | |
179 | ||
25f97994 | 180 | %build |
181 | cd mozilla | |
c5cc86e7 | 182 | cp -p %{_datadir}/automake/config.* build/autoconf |
64fd9f61 | 183 | |
c5cc86e7 JR |
184 | cat << 'EOF' > .mozconfig |
185 | . $topsrcdir/browser/config/mozconfig | |
64fd9f61 | 186 | |
25f97994 | 187 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu} |
188 | ||
189 | # Options for 'configure' (same as command-line options). | |
a5076679 JR |
190 | ac_add_options --build=%{_target_platform} |
191 | ac_add_options --host=%{_target_platform} | |
64fd9f61 | 192 | ac_add_options --prefix=%{_prefix} |
193 | ac_add_options --exec-prefix=%{_exec_prefix} | |
194 | ac_add_options --bindir=%{_bindir} | |
195 | ac_add_options --sbindir=%{_sbindir} | |
196 | ac_add_options --sysconfdir=%{_sysconfdir} | |
197 | ac_add_options --datadir=%{_datadir} | |
198 | ac_add_options --includedir=%{_includedir} | |
199 | ac_add_options --libdir=%{_libdir} | |
200 | ac_add_options --libexecdir=%{_libexecdir} | |
201 | ac_add_options --localstatedir=%{_localstatedir} | |
202 | ac_add_options --sharedstatedir=%{_sharedstatedir} | |
203 | ac_add_options --mandir=%{_mandir} | |
204 | ac_add_options --infodir=%{_infodir} | |
64fd9f61 | 205 | %if %{?debug:1}0 |
25f97994 | 206 | ac_add_options --disable-optimize |
64fd9f61 | 207 | ac_add_options --enable-debug |
208 | ac_add_options --enable-debug-modules | |
25f97994 | 209 | ac_add_options --enable-debugger-info-modules |
210 | ac_add_options --enable-crash-on-assert | |
64fd9f61 | 211 | %else |
212 | ac_add_options --disable-debug | |
213 | ac_add_options --disable-debug-modules | |
25f97994 | 214 | ac_add_options --disable-logging |
215 | ac_add_options --enable-optimize="%{rpmcflags} -Os" | |
64fd9f61 | 216 | %endif |
82955f33 ER |
217 | ac_add_options --disable-strip |
218 | ac_add_options --disable-strip-libs | |
a5076679 | 219 | ac_add_options --disable-install-strip |
25f97994 | 220 | %if %{with tests} |
221 | ac_add_options --enable-tests | |
39ef872e | 222 | ac_add_options --enable-mochitest |
25f97994 | 223 | %else |
224 | ac_add_options --disable-tests | |
39ef872e | 225 | ac_add_options --disable-mochitest |
25f97994 | 226 | %endif |
39ef872e | 227 | ac_add_options --disable-cpp-exceptions |
25f97994 | 228 | ac_add_options --disable-crashreporter |
a5076679 JR |
229 | ac_add_options --disable-elf-dynstr-gc |
230 | ac_add_options --disable-gconf | |
231 | ac_add_options --disable-gnomeui | |
232 | ac_add_options --disable-gnomevfs | |
64fd9f61 | 233 | ac_add_options --disable-installer |
25f97994 | 234 | ac_add_options --disable-javaxpcom |
a5076679 | 235 | ac_add_options --disable-long-long-warning |
39ef872e | 236 | ac_add_options --disable-necko-wifi |
a5076679 | 237 | ac_add_options --disable-pedantic |
25f97994 | 238 | ac_add_options --disable-updater |
a5076679 JR |
239 | ac_add_options --disable-xterm-updates |
240 | ac_add_options --enable-canvas | |
39ef872e | 241 | ac_add_options --enable-chrome-format=omni |
0ddb6810 | 242 | ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2} |
c5cc86e7 | 243 | ac_add_options --enable-extensions=default |
0d0192cb | 244 | ac_add_options --enable-gio |
557bfdce | 245 | ac_add_options --enable-gstreamer=1.0 |
d1ab36a9 | 246 | ac_add_options --enable-libxul |
a5076679 | 247 | ac_add_options --enable-mathml |
d1ab36a9 | 248 | ac_add_options --enable-pango |
a5076679 | 249 | ac_add_options --enable-readline |
39ef872e | 250 | ac_add_options --enable-safe-browsing |
557bfdce | 251 | %{?with_shared_js:ac_add_options --enable-shared-js} |
25f97994 | 252 | ac_add_options --enable-startup-notification |
a5076679 | 253 | ac_add_options --enable-svg |
64fd9f61 | 254 | ac_add_options --enable-system-cairo |
a5076679 | 255 | ac_add_options --enable-system-ffi |
01385fad | 256 | ac_add_options --enable-system-hunspell |
25f97994 | 257 | ac_add_options --enable-system-sqlite |
a5076679 | 258 | ac_add_options --enable-url-classifier |
39ef872e | 259 | ac_add_options --enable-xinerama |
25f97994 | 260 | ac_add_options --with-branding=iceweasel/branding |
a5076679 JR |
261 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
262 | ac_add_options --with-distribution-id=org.pld-linux | |
4dc7b9b3 JB |
263 | %if %{with xulrunner} |
264 | ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul) | |
265 | %endif | |
64fd9f61 | 266 | ac_add_options --with-pthreads |
82955f33 | 267 | ac_add_options --with-system-bz2 |
64fd9f61 | 268 | ac_add_options --with-system-jpeg |
fa89a5f1 | 269 | ac_add_options --with-system-libevent |
0d0192cb | 270 | ac_add_options --with-system-libvpx |
64fd9f61 | 271 | ac_add_options --with-system-nspr |
272 | ac_add_options --with-system-nss | |
a5076679 | 273 | ac_add_options --with-system-ply |
64fd9f61 | 274 | ac_add_options --with-system-png |
275 | ac_add_options --with-system-zlib | |
cbbb6991 | 276 | ac_add_options --with-system-icu |
a5076679 | 277 | ac_add_options --with-x |
64fd9f61 | 278 | EOF |
279 | ||
aa946041 | 280 | %if %{with pgo} |
a5076679 | 281 | export DISPLAY=:100 |
cde8a231 | 282 | %{__make} -j1 -f client.mk profiledbuild \ |
aa946041 | 283 | DESTDIR=obj-%{_target_cpu}/dist \ |
aa946041 | 284 | CC="%{__cc}" \ |
cde8a231 JR |
285 | CXX="%{__cxx}" \ |
286 | MOZ_MAKE_FLAGS="%{_smp_mflags}" | |
aa946041 | 287 | %else |
cde8a231 | 288 | %{__make} -j1 -f client.mk build \ |
25f97994 | 289 | CC="%{__cc}" \ |
cde8a231 JR |
290 | CXX="%{__cxx}" \ |
291 | MOZ_MAKE_FLAGS="%{_smp_mflags}" | |
aa946041 | 292 | %endif |
64fd9f61 | 293 | |
294 | %install | |
295 | rm -rf $RPM_BUILD_ROOT | |
25f97994 | 296 | cd mozilla |
64fd9f61 | 297 | install -d \ |
25f97994 | 298 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \ |
28e49f45 | 299 | $RPM_BUILD_ROOT%{_desktopdir} \ |
d5be93be | 300 | $RPM_BUILD_ROOT%{_datadir}/%{name}/browser \ |
4dc7b9b3 | 301 | $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/plugins |
64fd9f61 | 302 | |
d5be93be | 303 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins |
64fd9f61 | 304 | |
3e529974 JR |
305 | cd obj-%{_target_cpu} |
306 | %{__make} -C browser/installer stage-package \ | |
25f97994 | 307 | DESTDIR=$RPM_BUILD_ROOT \ |
3e529974 | 308 | installdir=%{_libdir}/%{name} \ |
25f97994 | 309 | PKG_SKIP_STRIP=1 |
310 | ||
3e529974 JR |
311 | %{__make} -C iceweasel/branding install \ |
312 | DESTDIR=$RPM_BUILD_ROOT | |
313 | ||
314 | cp -a dist/iceweasel/* $RPM_BUILD_ROOT%{_libdir}/%{name}/ | |
ba83c719 | 315 | |
61766208 | 316 | %if %{with xulrunner} |
881b0f95 AM |
317 | # >= 5.0 seems to require this |
318 | ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner | |
319 | %endif | |
320 | ||
25f97994 | 321 | # move arch independant ones to datadir |
d5be93be | 322 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome |
3118200d | 323 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/extensions |
d5be93be JR |
324 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/icons |
325 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/searchplugins | |
25f97994 | 326 | %if %{without xulrunner} |
031a929e JR |
327 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults |
328 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/{pref,preferences} | |
55002fb3 JR |
329 | %else |
330 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults | |
25f97994 | 331 | %endif |
95d7e788 | 332 | |
d5be93be | 333 | ln -s ../../../share/%{name}/browser/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome |
4dc7b9b3 | 334 | ln -s ../../../share/%{name}/browser/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults |
3118200d | 335 | ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions |
d5be93be JR |
336 | ln -s ../../../share/%{name}/browser/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons |
337 | ln -s ../../../share/%{name}/browser/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/searchplugins | |
64fd9f61 | 338 | |
25f97994 | 339 | %if %{without xulrunner} |
b2c3c458 | 340 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
25f97994 | 341 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
342 | %endif | |
64fd9f61 | 343 | |
6263e082 | 344 | sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/iceweasel |
57727a75 | 345 | chmod 755 $RPM_BUILD_ROOT%{_bindir}/iceweasel |
25f97994 | 346 | ln -s iceweasel $RPM_BUILD_ROOT%{_bindir}/firefox |
347 | ln -s iceweasel $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox | |
64fd9f61 | 348 | |
28e49f45 | 349 | # install icons and desktop file |
3e529974 | 350 | cp iceweasel/branding/{mozicon,default}128.png |
28e49f45 MB |
351 | for i in 16 32 48 64 128; do |
352 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps | |
3e529974 | 353 | cp -a iceweasel/branding/default${i}.png \ |
28e49f45 MB |
354 | $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/iceweasel.png |
355 | done | |
356 | ||
c4d76d99 | 357 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
64fd9f61 | 358 | |
55f0784a | 359 | # install our settings |
55f0784a | 360 | %if "%{pld_release}" == "ac" |
d5be93be | 361 | cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js |
4dc7b9b3 JB |
362 | %else |
363 | cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
55f0784a JR |
364 | %endif |
365 | ||
fa89a5f1 | 366 | # files created by iceweasel -register |
d5be93be JR |
367 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/compreg.dat |
368 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/xpti.dat | |
64fd9f61 | 369 | |
56be5f03 | 370 | cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
64fd9f61 | 371 | #!/bin/sh |
372 | umask 022 | |
d5be93be | 373 | rm -f %{_libdir}/%{name}/browser/components/{compreg,xpti}.dat |
64fd9f61 | 374 | |
25f97994 | 375 | # it attempts to touch files in $HOME/.mozilla |
376 | # beware if you run this with sudo!!! | |
377 | export HOME=$(mktemp -d) | |
378 | # also TMPDIR could be pointing to sudo user's homedir | |
379 | unset TMPDIR TMP || : | |
64fd9f61 | 380 | |
25f97994 | 381 | %{_libdir}/%{name}/iceweasel -register |
64fd9f61 | 382 | |
b2c3c458 | 383 | rm -rf $HOME |
64fd9f61 | 384 | EOF |
18df252d | 385 | chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
64fd9f61 | 386 | |
387 | %clean | |
388 | rm -rf $RPM_BUILD_ROOT | |
389 | ||
25f97994 | 390 | %pretrans |
14b6c040 | 391 | if [ -d %{_libdir}/%{name}/browser/extensions ] && [ ! -L %{_libdir}/%{name}/browser/extensions ]; then |
3118200d | 392 | install -d %{_datadir}/%{name}/browser |
14b6c040 JR |
393 | if [ -e %{_datadir}/%{name}/browser/extensions ]; then |
394 | mv %{_datadir}/%{name}/browser/extensions{,.rpmsave} | |
395 | fi | |
396 | mv -v %{_libdir}/%{name}/browser/extensions %{_datadir}/%{name}/browser/extensions | |
0fadbc56 | 397 | fi |
25f97994 | 398 | if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then |
399 | mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave} | |
400 | fi | |
25f97994 | 401 | exit 0 |
402 | ||
64fd9f61 | 403 | %post |
3e92c67c | 404 | %{_sbindir}/%{name}-chrome+xpcom-generate |
25f97994 | 405 | %update_browser_plugins |
28e49f45 | 406 | %update_icon_cache hicolor |
8309582e | 407 | %update_desktop_database |
64fd9f61 | 408 | |
95d7e788 | 409 | %postun |
25f97994 | 410 | if [ "$1" = 0 ]; then |
411 | %update_browser_plugins | |
28e49f45 | 412 | %update_icon_cache hicolor |
64fd9f61 | 413 | fi |
414 | ||
64fd9f61 | 415 | %files |
416 | %defattr(644,root,root,755) | |
25f97994 | 417 | %attr(755,root,root) %{_bindir}/%{name} |
418 | %attr(755,root,root) %{_bindir}/firefox | |
419 | %attr(755,root,root) %{_bindir}/mozilla-firefox | |
420 | %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate | |
421 | ||
4dc7b9b3 JB |
422 | %{_desktopdir}/iceweasel.desktop |
423 | %{_iconsdir}/hicolor/*/apps/iceweasel.png | |
424 | ||
25f97994 | 425 | # browser plugins v2 |
426 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
427 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
64fd9f61 | 428 | |
25f97994 | 429 | %dir %{_libdir}/%{name} |
d5be93be JR |
430 | %dir %{_libdir}/%{name}/browser |
431 | %dir %{_libdir}/%{name}/browser/components | |
d5be93be JR |
432 | %dir %{_libdir}/%{name}/browser/plugins |
433 | ||
434 | %dir %{_datadir}/%{name} | |
435 | %dir %{_datadir}/%{name}/browser | |
3118200d | 436 | %dir %{_datadir}/%{name}/browser/extensions |
d5be93be | 437 | %{_datadir}/%{name}/browser/chrome |
4dc7b9b3 | 438 | %{_datadir}/%{name}/browser/defaults |
d5be93be JR |
439 | %{_datadir}/%{name}/browser/icons |
440 | %{_datadir}/%{name}/browser/searchplugins | |
d5be93be JR |
441 | |
442 | # symlinks | |
3118200d | 443 | %{_libdir}/%{name}/browser/extensions |
d5be93be JR |
444 | %{_libdir}/%{name}/browser/chrome |
445 | %{_libdir}/%{name}/browser/icons | |
446 | %{_libdir}/%{name}/browser/searchplugins | |
d5be93be JR |
447 | %if %{with xulrunner} |
448 | %{_libdir}/%{name}/xulrunner | |
031a929e | 449 | %endif |
55002fb3 | 450 | %{_libdir}/%{name}/browser/defaults |
d5be93be | 451 | |
4dc7b9b3 JB |
452 | %attr(755,root,root) %{_libdir}/%{name}/iceweasel |
453 | %attr(755,root,root) %{_libdir}/%{name}/iceweasel-bin | |
454 | %attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh | |
d5be93be JR |
455 | %{_libdir}/%{name}/application.ini |
456 | %{_libdir}/%{name}/browser/blocklist.xml | |
457 | %{_libdir}/%{name}/browser/chrome.manifest | |
4dc7b9b3 JB |
458 | %{_libdir}/%{name}/browser/components/components.manifest |
459 | %attr(755,root,root) %{_libdir}/%{name}/browser/components/libbrowsercomps.so | |
d5be93be | 460 | # the signature of the default theme |
3118200d | 461 | %{_datadir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} |
d5be93be | 462 | %{_libdir}/%{name}/browser/omni.ja |
d5be93be JR |
463 | %{_libdir}/%{name}/webapprt |
464 | %attr(755,root,root) %{_libdir}/%{name}/webapprt-stub | |
465 | ||
d5be93be JR |
466 | # files created by iceweasel -register |
467 | %ghost %{_libdir}/%{name}/browser/components/compreg.dat | |
468 | %ghost %{_libdir}/%{name}/browser/components/xpti.dat | |
25f97994 | 469 | |
25f97994 | 470 | %if %{without xulrunner} |
4dc7b9b3 | 471 | # private xulrunner instance |
2c50337f | 472 | %{_libdir}/%{name}/dependentlibs.list |
25f97994 | 473 | %{_libdir}/%{name}/platform.ini |
55002fb3 JR |
474 | %dir %{_libdir}/%{name}/components |
475 | %{_libdir}/%{name}/components/components.manifest | |
476 | %attr(755,root,root) %{_libdir}/%{name}/components/libdbusservice.so | |
477 | %attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so | |
d5be93be | 478 | %attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so |
557bfdce | 479 | %{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so} |
d5be93be | 480 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so |
25f97994 | 481 | %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client |
69dd136c | 482 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
25f97994 | 483 | %{_libdir}/%{name}/dictionaries |
55002fb3 JR |
484 | %{_libdir}/%{name}/chrome.manifest |
485 | %{_libdir}/%{name}/omni.ja | |
25f97994 | 486 | %endif |