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