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