]>
Commit | Line | Data |
---|---|---|
aa946041 ŁK |
1 | # TODO: |
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) |
6 | %bcond_without gnomeui # disable gnomeui support | |
d60b15b4 | 7 | %bcond_without gnome # synonym for gnomeui (gconf, libnotify and gio are still enabled) |
25f97994 | 8 | %bcond_without kerberos # disable krb5 support |
70fe5e44 | 9 | %if "%{pld_release}" == "ti" |
10 | %bcond_with xulrunner # build with system xulrunner | |
11 | %else | |
aa946041 | 12 | %bcond_without xulrunner # build without system xulrunner |
70fe5e44 | 13 | %endif |
aa946041 | 14 | %bcond_with pgo # PGO-enabled build (requires working $DISPLAY == :100) |
25f97994 | 15 | |
16 | %if %{without gnome} | |
17 | %undefine with_gnomeui | |
25f97994 | 18 | %endif |
19 | ||
f90fb362 | 20 | # convert firefox release number to platform version: 9.0.x -> 9.0.x |
0174d9a8 JR |
21 | %define xulrunner_main 13.0 |
22 | %define xulrunner_ver %(v=%{version}; echo %{xulrunner_main}${v#13.0}) | |
95d7e788 | 23 | |
edeacddd ER |
24 | %if %{without xulrunner} |
25 | # The actual sqlite version (see RHBZ#480989): | |
26 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
27 | %endif | |
28 | ||
636318c9 | 29 | Summary: Iceweasel web browser |
3c179095 | 30 | Summary(hu.UTF-8): Iceweasel web böngésző |
1c0db0f7 | 31 | Summary(pl.UTF-8): Iceweasel - przeglądarka WWW |
636318c9 | 32 | Name: iceweasel |
d6613925 JR |
33 | Version: 13.0 |
34 | Release: 0.1 | |
25f97994 | 35 | License: MPL 1.1 or GPL v2+ or LGPL v2.1+ |
64fd9f61 | 36 | Group: X11/Applications/Networking |
5e4ef7ef | 37 | Source0: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.bz2 |
d6613925 | 38 | # Source0-md5: f50ca7656eec47030b396f39075fa980 |
25f97994 | 39 | Source1: %{name}-branding.tar.bz2 |
c5b9be8b | 40 | # Source1-md5: 7ab5e80db1ffe8784f1cb55dc5651e2f |
6263e082 | 41 | Source2: %{name}-rm_nonfree.sh |
42 | Source3: %{name}.desktop | |
43 | Source4: %{name}.sh | |
25f97994 | 44 | Patch0: %{name}-branding.patch |
45 | Patch1: %{name}-install.patch | |
46 | Patch2: %{name}-gcc3.patch | |
47 | Patch3: %{name}-agent.patch | |
48 | Patch4: %{name}-ac-agent.patch | |
49 | Patch5: %{name}-ti-agent.patch | |
50 | Patch6: %{name}-nss_cflags.patch | |
51 | Patch7: %{name}-prefs.patch | |
0b8ebf73 | 52 | Patch8: %{name}-pld-branding.patch |
9f488603 | 53 | Patch9: %{name}-no-subshell.patch |
d6613925 | 54 | Patch10: system-cairo.patch |
743c829e | 55 | URL: http://www.pld-linux.org/Packages/Iceweasel |
16a55804 | 56 | BuildRequires: GConf2-devel >= 1.2.1 |
bcf987c2 | 57 | BuildRequires: OpenGL-devel |
72c3acea | 58 | BuildRequires: alsa-lib-devel |
64fd9f61 | 59 | BuildRequires: automake |
526c2cf9 | 60 | BuildRequires: bzip2-devel |
ec8ea9c6 | 61 | BuildRequires: cairo-devel >= 1.10.2-5 |
72c3acea | 62 | BuildRequires: dbus-glib-devel >= 0.60 |
d60b15b4 | 63 | BuildRequires: glib2-devel >= 1:2.18 |
58f7b9e2 | 64 | BuildRequires: gtk+2-devel >= 2:2.14 |
25f97994 | 65 | %{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1} |
1668aa38 | 66 | BuildRequires: hunspell-devel |
64fd9f61 | 67 | BuildRequires: libIDL-devel >= 0.8.0 |
526c2cf9 | 68 | BuildRequires: libdnet-devel |
fa89a5f1 | 69 | BuildRequires: libevent-devel >= 1.4.7 |
58f7b9e2 JB |
70 | # standalone libffi 3.0.9 or gcc's from 4.5(?)+ |
71 | BuildRequires: libffi-devel >= 6:3.0.9 | |
25f97994 | 72 | %{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0} |
526c2cf9 | 73 | BuildRequires: libiw-devel |
64fd9f61 | 74 | BuildRequires: libjpeg-devel >= 6b |
f6c34380 | 75 | BuildRequires: libnotify-devel >= 0.4 |
25f97994 | 76 | BuildRequires: libpng(APNG)-devel >= 0.10 |
fa89a5f1 | 77 | BuildRequires: libpng-devel >= 1.4.1 |
64fd9f61 | 78 | BuildRequires: libstdc++-devel |
58f7b9e2 | 79 | BuildRequires: libvpx-devel >= 1.0.0 |
11f8ef54 AO |
80 | BuildRequires: nspr-devel >= 1:4.9 |
81 | BuildRequires: nss-devel >= 1:3.13.3 | |
18df252d | 82 | BuildRequires: pango-devel >= 1:1.14.0 |
64fd9f61 | 83 | BuildRequires: perl-modules >= 5.004 |
84 | BuildRequires: pkgconfig | |
58f7b9e2 | 85 | BuildRequires: pkgconfig(libffi) >= 3.0.9 |
72c3acea | 86 | BuildRequires: python-modules |
aa946041 | 87 | %{?with_pgo:BuildRequires: python-modules-sqlite} |
25f97994 | 88 | BuildRequires: rpm >= 4.4.9-56 |
28e49f45 | 89 | BuildRequires: rpmbuild(macros) >= 1.601 |
3ae5c76f | 90 | BuildRequires: sqlite3-devel >= 3.7.10 |
72c3acea | 91 | BuildRequires: startup-notification-devel >= 0.8 |
fa89a5f1 | 92 | BuildRequires: xorg-lib-libXScrnSaver-devel |
18df252d | 93 | BuildRequires: xorg-lib-libXext-devel |
18df252d | 94 | BuildRequires: xorg-lib-libXinerama-devel |
64fd9f61 | 95 | BuildRequires: xorg-lib-libXt-devel |
25f97994 | 96 | %if %{with xulrunner} |
c4d76d99 | 97 | BuildRequires: xulrunner-devel >= 2:%{xulrunner_ver} |
25f97994 | 98 | %endif |
64fd9f61 | 99 | BuildRequires: zip |
100 | BuildRequires: zlib-devel >= 1.2.3 | |
636318c9 | 101 | Requires(post): mktemp >= 1.5-18 |
8309582e | 102 | Requires: desktop-file-utils |
28e49f45 | 103 | Requires: hicolor-icon-theme |
43cd2d9e ER |
104 | %if %{with xulrunner} |
105 | %requires_eq_to xulrunner xulrunner-devel | |
106 | %else | |
25f97994 | 107 | Requires: browser-plugins >= 2.0 |
9bc7e413 | 108 | Requires: cairo >= 1.10.2-5 |
18df252d | 109 | Requires: dbus-glib >= 0.60 |
58f7b9e2 JB |
110 | Requires: glib2 >= 1:2.18 |
111 | Requires: gtk+2 >= 2:2.14 | |
fa89a5f1 | 112 | Requires: libpng >= 1.4.1 |
25f97994 | 113 | Requires: libpng(APNG) >= 0.10 |
3c179095 | 114 | Requires: myspell-common |
13e19c70 AM |
115 | Requires: nspr >= 1:4.8.9 |
116 | Requires: nss >= 1:3.13.1 | |
18df252d | 117 | Requires: pango >= 1:1.14.0 |
edeacddd | 118 | Requires: sqlite3 >= %{sqlite_build_version} |
18df252d | 119 | Requires: startup-notification >= 0.8 |
25f97994 | 120 | %endif |
64fd9f61 | 121 | Provides: wwwbrowser |
25f97994 | 122 | Obsoletes: mozilla-firebird |
123 | Obsoletes: mozilla-firefox | |
124 | Obsoletes: mozilla-firefox-lang-en < 2.0.0.8-3 | |
125 | Obsoletes: mozilla-firefox-libs | |
8f1f83ff | 126 | Conflicts: iceweasel-lang-resources < %{version} |
64fd9f61 | 127 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
128 | ||
10a03c86 AM |
129 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ |
130 | ||
18df252d JB |
131 | # don't satisfy other packages |
132 | %define _noautoprovfiles %{_libdir}/%{name} | |
0044292b | 133 | %if %{without xulrunner} |
25f97994 | 134 | # and as we don't provide them, don't require either |
0044292b JB |
135 | %define _noautoreq libmozalloc.so libmozjs.so libxpcom.so libxul.so |
136 | %endif | |
64fd9f61 | 137 | |
64fd9f61 | 138 | %description |
25f97994 | 139 | Iceweasel is an open-source web browser, designed for standards |
140 | compliance, performance and portability. | |
64fd9f61 | 141 | |
3c179095 ZU |
142 | %description -l hu.UTF-8 |
143 | Iceweasel egy nyílt forrású webböngésző, hatékonyságra és | |
144 | hordozhatóságra tervezve. | |
145 | ||
6d49053f | 146 | %description -l pl.UTF-8 |
25f97994 | 147 | Iceweasel jest przeglądarką WWW rozpowszechnianą zgodnie z ideami |
3c179095 ZU |
148 | ruchu otwartego oprogramowania oraz tworzoną z myślą o zgodności ze |
149 | standardami, wydajnością i przenośnością. | |
64fd9f61 | 150 | |
25f97994 | 151 | %prep |
ed3ba396 | 152 | %setup -qc |
dca77f61 | 153 | mv -f mozilla-release mozilla |
ed3ba396 | 154 | %setup -q -T -D -a1 |
25f97994 | 155 | cd mozilla |
6263e082 | 156 | /bin/sh %{SOURCE2} |
64fd9f61 | 157 | |
e73b7e54 MM |
158 | %patch0 -p1 |
159 | %patch1 -p1 | |
64fd9f61 | 160 | |
25f97994 | 161 | %if "%{cc_version}" < "3.4" |
162 | %patch2 -p2 | |
163 | %endif | |
164 | ||
165 | %if "%{pld_release}" == "th" | |
64fd9f61 | 166 | %patch3 -p1 |
25f97994 | 167 | %endif |
168 | ||
169 | %if "%{pld_release}" == "ac" | |
f5989121 | 170 | %patch4 -p1 |
25f97994 | 171 | %endif |
172 | ||
173 | %if "%{pld_release}" == "ti" | |
64fd9f61 | 174 | %patch5 -p1 |
25f97994 | 175 | %endif |
64fd9f61 | 176 | |
25f97994 | 177 | %patch6 -p1 |
178 | %patch7 -p1 | |
0b8ebf73 | 179 | %patch8 -p1 |
9f488603 | 180 | %patch9 -p2 |
d6613925 | 181 | %patch10 -p2 |
b72a40b3 | 182 | |
6ae184fe AM |
183 | # config/rules.mk is patched by us and js/src/config/rules.mk |
184 | # is supposed to be exact copy | |
185 | cp -a config/rules.mk js/src/config/rules.mk | |
186 | ||
aa946041 ŁK |
187 | %if %{with pgo} |
188 | sed -i -e 's@__BROWSER_PATH__@"../../dist/bin/iceweasel-bin"@' build/automation.py.in | |
189 | %endif | |
190 | ||
25f97994 | 191 | %build |
192 | cd mozilla | |
64fd9f61 | 193 | cp -f %{_datadir}/automake/config.* build/autoconf |
64fd9f61 | 194 | |
c4d76d99 ER |
195 | cat << EOF > .mozconfig |
196 | . \$topsrcdir/browser/config/mozconfig | |
64fd9f61 | 197 | |
25f97994 | 198 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu} |
aa946041 ŁK |
199 | mk_add_options MOZ_MAKE_FLAGS=%{_smp_mflags} |
200 | mk_add_options PROFILE_GEN_SCRIPT='@PYTHON@ @MOZ_OBJDIR@/_profile/pgo/profileserver.py' | |
25f97994 | 201 | |
202 | # Options for 'configure' (same as command-line options). | |
64fd9f61 | 203 | ac_add_options --prefix=%{_prefix} |
204 | ac_add_options --exec-prefix=%{_exec_prefix} | |
205 | ac_add_options --bindir=%{_bindir} | |
206 | ac_add_options --sbindir=%{_sbindir} | |
207 | ac_add_options --sysconfdir=%{_sysconfdir} | |
208 | ac_add_options --datadir=%{_datadir} | |
209 | ac_add_options --includedir=%{_includedir} | |
210 | ac_add_options --libdir=%{_libdir} | |
211 | ac_add_options --libexecdir=%{_libexecdir} | |
212 | ac_add_options --localstatedir=%{_localstatedir} | |
213 | ac_add_options --sharedstatedir=%{_sharedstatedir} | |
214 | ac_add_options --mandir=%{_mandir} | |
215 | ac_add_options --infodir=%{_infodir} | |
11f8ef54 | 216 | ac_add_options --disable-elf-hack |
64fd9f61 | 217 | %if %{?debug:1}0 |
25f97994 | 218 | ac_add_options --disable-optimize |
64fd9f61 | 219 | ac_add_options --enable-debug |
220 | ac_add_options --enable-debug-modules | |
25f97994 | 221 | ac_add_options --enable-debugger-info-modules |
222 | ac_add_options --enable-crash-on-assert | |
64fd9f61 | 223 | %else |
224 | ac_add_options --disable-debug | |
225 | ac_add_options --disable-debug-modules | |
25f97994 | 226 | ac_add_options --disable-logging |
227 | ac_add_options --enable-optimize="%{rpmcflags} -Os" | |
64fd9f61 | 228 | %endif |
82955f33 ER |
229 | ac_add_options --disable-strip |
230 | ac_add_options --disable-strip-libs | |
25f97994 | 231 | %if %{with tests} |
232 | ac_add_options --enable-tests | |
233 | %else | |
234 | ac_add_options --disable-tests | |
235 | %endif | |
236 | %if %{with gnomeui} | |
64fd9f61 | 237 | ac_add_options --enable-gnomeui |
238 | %else | |
64fd9f61 | 239 | ac_add_options --disable-gnomeui |
240 | %endif | |
25f97994 | 241 | ac_add_options --disable-gnomevfs |
25f97994 | 242 | ac_add_options --disable-crashreporter |
64fd9f61 | 243 | ac_add_options --disable-installer |
25f97994 | 244 | ac_add_options --disable-javaxpcom |
245 | ac_add_options --disable-updater | |
0d0192cb | 246 | ac_add_options --enable-gio |
d1ab36a9 ER |
247 | ac_add_options --enable-libxul |
248 | ac_add_options --enable-pango | |
0d0192cb | 249 | ac_add_options --enable-shared-js |
25f97994 | 250 | ac_add_options --enable-startup-notification |
64fd9f61 | 251 | ac_add_options --enable-system-cairo |
01385fad | 252 | ac_add_options --enable-system-hunspell |
25f97994 | 253 | ac_add_options --enable-system-sqlite |
64fd9f61 | 254 | ac_add_options --with-distribution-id=org.pld-linux |
25f97994 | 255 | ac_add_options --with-branding=iceweasel/branding |
256 | %if %{with xulrunner} | |
c4d76d99 | 257 | ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul) |
25f97994 | 258 | %endif |
64fd9f61 | 259 | ac_add_options --with-pthreads |
82955f33 | 260 | ac_add_options --with-system-bz2 |
58f7b9e2 | 261 | ac_add_options --with-system-ffi |
64fd9f61 | 262 | ac_add_options --with-system-jpeg |
fa89a5f1 | 263 | ac_add_options --with-system-libevent |
0d0192cb | 264 | ac_add_options --with-system-libvpx |
64fd9f61 | 265 | ac_add_options --with-system-nspr |
266 | ac_add_options --with-system-nss | |
267 | ac_add_options --with-system-png | |
268 | ac_add_options --with-system-zlib | |
25f97994 | 269 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
64fd9f61 | 270 | EOF |
271 | ||
aa946041 ŁK |
272 | %if %{with pgo} |
273 | export DISPLAY=:100 | |
274 | %{__make} -f client.mk profiledbuild \ | |
275 | DESTDIR=obj-%{_target_cpu}/dist \ | |
276 | STRIP="/bin/true" \ | |
277 | CC="%{__cc}" \ | |
278 | CXX="%{__cxx}" | |
279 | %else | |
dc152da8 | 280 | %{__make} -f client.mk build \ |
25f97994 | 281 | STRIP="/bin/true" \ |
282 | CC="%{__cc}" \ | |
283 | CXX="%{__cxx}" | |
aa946041 | 284 | %endif |
64fd9f61 | 285 | |
286 | %install | |
287 | rm -rf $RPM_BUILD_ROOT | |
25f97994 | 288 | cd mozilla |
64fd9f61 | 289 | install -d \ |
25f97994 | 290 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \ |
28e49f45 | 291 | $RPM_BUILD_ROOT%{_desktopdir} \ |
25f97994 | 292 | $RPM_BUILD_ROOT%{_datadir}/%{name} |
64fd9f61 | 293 | |
25f97994 | 294 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins |
64fd9f61 | 295 | |
25f97994 | 296 | %{__make} -C obj-%{_target_cpu}/browser/installer stage-package \ |
297 | DESTDIR=$RPM_BUILD_ROOT \ | |
298 | MOZ_PKG_APPDIR=%{_libdir}/%{name} \ | |
3bdd333c | 299 | MOZ_PKG_DIR=%{_libdir}/%{name} \ |
25f97994 | 300 | PKG_SKIP_STRIP=1 |
301 | ||
ba83c719 AM |
302 | install -d \ |
303 | $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins | |
304 | ||
61766208 | 305 | %if %{with xulrunner} |
881b0f95 AM |
306 | # >= 5.0 seems to require this |
307 | ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner | |
308 | %endif | |
309 | ||
25f97994 | 310 | # move arch independant ones to datadir |
311 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome | |
312 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults | |
313 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions | |
314 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/icons | |
315 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules | |
316 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins | |
317 | %if %{without xulrunner} | |
3bdd333c | 318 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs.js $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs.js |
25f97994 | 319 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res |
320 | %endif | |
95d7e788 | 321 | |
25f97994 | 322 | ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome |
323 | ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults | |
324 | ln -s ../../share/%{name}/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions | |
325 | ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules | |
326 | ln -s ../../share/%{name}/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/icons | |
327 | ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins | |
328 | %if %{without xulrunner} | |
3bdd333c | 329 | ln -s ../../share/%{name}/greprefs.js $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs.js |
25f97994 | 330 | ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res |
331 | %endif | |
64fd9f61 | 332 | |
25f97994 | 333 | %if %{without xulrunner} |
b2c3c458 | 334 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
25f97994 | 335 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
0044292b JB |
336 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/hyphenation |
337 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/hyphenation | |
25f97994 | 338 | %endif |
64fd9f61 | 339 | |
6263e082 | 340 | sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/iceweasel |
95d7e788 | 341 | chmod a+rx $RPM_BUILD_ROOT%{_bindir}/iceweasel |
25f97994 | 342 | ln -s iceweasel $RPM_BUILD_ROOT%{_bindir}/firefox |
343 | ln -s iceweasel $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox | |
64fd9f61 | 344 | |
28e49f45 MB |
345 | # install icons and desktop file |
346 | cp iceweasel/branding/{mozicon,default}128.png | |
347 | for i in 16 32 48 64 128; do | |
348 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps | |
349 | cp -a iceweasel/branding/default${i}.png \ | |
350 | $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/iceweasel.png | |
351 | done | |
352 | ||
c4d76d99 | 353 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
64fd9f61 | 354 | |
fa89a5f1 | 355 | # files created by iceweasel -register |
25f97994 | 356 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat |
357 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat | |
64fd9f61 | 358 | |
95d7e788 | 359 | %if %{with xulrunner} |
b2c3c458 | 360 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/run-mozilla.sh |
95d7e788 | 361 | %endif |
64fd9f61 | 362 | |
56be5f03 | 363 | cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
64fd9f61 | 364 | #!/bin/sh |
365 | umask 022 | |
b2c3c458 | 366 | rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat |
64fd9f61 | 367 | |
25f97994 | 368 | # it attempts to touch files in $HOME/.mozilla |
369 | # beware if you run this with sudo!!! | |
370 | export HOME=$(mktemp -d) | |
371 | # also TMPDIR could be pointing to sudo user's homedir | |
372 | unset TMPDIR TMP || : | |
64fd9f61 | 373 | |
25f97994 | 374 | %{_libdir}/%{name}/iceweasel -register |
64fd9f61 | 375 | |
b2c3c458 | 376 | rm -rf $HOME |
64fd9f61 | 377 | EOF |
18df252d | 378 | chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
64fd9f61 | 379 | |
380 | %clean | |
381 | rm -rf $RPM_BUILD_ROOT | |
382 | ||
25f97994 | 383 | %pretrans |
384 | if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then | |
385 | mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave} | |
386 | fi | |
3bdd333c | 387 | for d in chrome defaults extensions greprefs.js icons res searchplugins; do |
25f97994 | 388 | if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then |
389 | install -d %{_datadir}/%{name} | |
390 | mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d | |
391 | fi | |
392 | done | |
393 | exit 0 | |
394 | ||
64fd9f61 | 395 | %post |
3e92c67c | 396 | %{_sbindir}/%{name}-chrome+xpcom-generate |
25f97994 | 397 | %update_browser_plugins |
28e49f45 | 398 | %update_icon_cache hicolor |
8309582e | 399 | %update_desktop_database |
64fd9f61 | 400 | |
95d7e788 | 401 | %postun |
25f97994 | 402 | if [ "$1" = 0 ]; then |
403 | %update_browser_plugins | |
28e49f45 | 404 | %update_icon_cache hicolor |
64fd9f61 | 405 | fi |
406 | ||
64fd9f61 | 407 | %files |
408 | %defattr(644,root,root,755) | |
25f97994 | 409 | %attr(755,root,root) %{_bindir}/%{name} |
410 | %attr(755,root,root) %{_bindir}/firefox | |
411 | %attr(755,root,root) %{_bindir}/mozilla-firefox | |
412 | %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate | |
413 | ||
25f97994 | 414 | # browser plugins v2 |
415 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
416 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
64fd9f61 | 417 | |
25f97994 | 418 | %dir %{_libdir}/%{name} |
ed3ba396 | 419 | %if %{without xulrunner} |
0044292b JB |
420 | %attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so |
421 | %attr(755,root,root) %{_libdir}/%{name}/libmozjs.so | |
422 | %attr(755,root,root) %{_libdir}/%{name}/libxpcom.so | |
423 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so | |
ed3ba396 | 424 | %endif |
25f97994 | 425 | %{_libdir}/%{name}/blocklist.xml |
426 | ||
427 | %if %{with crashreporter} | |
428 | %{_libdir}/%{name}/crashreporter | |
429 | %{_libdir}/%{name}/crashreporter-override.ini | |
430 | %{_libdir}/%{name}/crashreporter.ini | |
431 | %{_libdir}/%{name}/Throbber-small.gif | |
432 | %endif | |
433 | ||
434 | # config? | |
25f97994 | 435 | %{_libdir}/%{name}/application.ini |
0d0192cb | 436 | %{_libdir}/%{name}/chrome.manifest |
25f97994 | 437 | |
438 | %dir %{_libdir}/%{name}/components | |
439 | ||
8a36ee5c | 440 | %{_libdir}/%{name}/components/ChromeProfileMigrator.js |
25f97994 | 441 | %{_libdir}/%{name}/components/FeedConverter.js |
442 | %{_libdir}/%{name}/components/FeedWriter.js | |
c11dc56f | 443 | %{_libdir}/%{name}/components/FirefoxProfileMigrator.js |
0d0192cb MB |
444 | %{_libdir}/%{name}/components/PlacesProtocolHandler.js |
445 | %{_libdir}/%{name}/components/Weave.js | |
67c1f3e7 JB |
446 | %{_libdir}/%{name}/components/WebContentConverter.js |
447 | %{_libdir}/%{name}/components/browser.xpt | |
25f97994 | 448 | %{_libdir}/%{name}/components/fuelApplication.js |
449 | %{_libdir}/%{name}/components/nsBrowserContentHandler.js | |
450 | %{_libdir}/%{name}/components/nsBrowserGlue.js | |
ed3ba396 | 451 | %{_libdir}/%{name}/components/nsPrivateBrowsingService.js |
25f97994 | 452 | %{_libdir}/%{name}/components/nsSafebrowsingApplication.js |
25f97994 | 453 | %{_libdir}/%{name}/components/nsSessionStartup.js |
454 | %{_libdir}/%{name}/components/nsSessionStore.js | |
455 | %{_libdir}/%{name}/components/nsSetDefaultBrowser.js | |
456 | %{_libdir}/%{name}/components/nsSidebar.js | |
c11dc56f AM |
457 | %{_libdir}/%{name}/components/PageThumbsProtocol.js |
458 | %{_libdir}/%{name}/components/ProfileMigrator.js | |
0d0192cb MB |
459 | |
460 | %{_libdir}/%{name}/components/components.manifest | |
461 | %{_libdir}/%{name}/components/interfaces.manifest | |
462 | ||
c11dc56f AM |
463 | %{_libdir}/%{name}/update-settings.ini |
464 | ||
25f97994 | 465 | %if %{without xulrunner} |
466 | %{_libdir}/%{name}/platform.ini | |
48b2842a | 467 | %{_libdir}/%{name}/components/ConsoleAPI.js |
25f97994 | 468 | %{_libdir}/%{name}/components/FeedProcessor.js |
07008b88 | 469 | %{_libdir}/%{name}/components/GPSDGeolocationProvider.js |
ed3ba396 | 470 | %{_libdir}/%{name}/components/NetworkGeolocationProvider.js |
48b2842a | 471 | %{_libdir}/%{name}/components/PlacesCategoriesStarter.js |
0b404f48 | 472 | %{_libdir}/%{name}/components/TelemetryPing.js |
48b2842a | 473 | %{_libdir}/%{name}/components/addonManager.js |
474 | %{_libdir}/%{name}/components/amContentHandler.js | |
475 | %{_libdir}/%{name}/components/amWebInstallListener.js | |
476 | %{_libdir}/%{name}/components/contentAreaDropListener.js | |
477 | %{_libdir}/%{name}/components/contentSecurityPolicy.js | |
478 | %{_libdir}/%{name}/components/crypto-SDR.js | |
67c1f3e7 | 479 | %{_libdir}/%{name}/components/jsconsole-clhandler.js |
8088fa6d | 480 | %{_libdir}/%{name}/components/nsBadCertHandler.js |
25f97994 | 481 | %{_libdir}/%{name}/components/nsBlocklistService.js |
482 | %{_libdir}/%{name}/components/nsContentDispatchChooser.js | |
483 | %{_libdir}/%{name}/components/nsContentPrefService.js | |
484 | %{_libdir}/%{name}/components/nsDefaultCLH.js | |
485 | %{_libdir}/%{name}/components/nsDownloadManagerUI.js | |
25f97994 | 486 | %{_libdir}/%{name}/components/nsFilePicker.js |
07008b88 | 487 | %{_libdir}/%{name}/components/nsFormAutoComplete.js |
48b2842a | 488 | %{_libdir}/%{name}/components/nsFormHistory.js |
25f97994 | 489 | %{_libdir}/%{name}/components/nsHandlerService.js |
490 | %{_libdir}/%{name}/components/nsHelperAppDlg.js | |
69dd136c | 491 | %{_libdir}/%{name}/components/nsINIProcessor.js |
48b2842a | 492 | %{_libdir}/%{name}/components/nsInputListAutoComplete.js |
25f97994 | 493 | %{_libdir}/%{name}/components/nsLivemarkService.js |
494 | %{_libdir}/%{name}/components/nsLoginInfo.js | |
495 | %{_libdir}/%{name}/components/nsLoginManager.js | |
496 | %{_libdir}/%{name}/components/nsLoginManagerPrompter.js | |
07008b88 | 497 | %{_libdir}/%{name}/components/nsPlacesAutoComplete.js |
48b2842a | 498 | %{_libdir}/%{name}/components/nsPlacesExpiration.js |
499 | %{_libdir}/%{name}/components/nsPrompter.js | |
25f97994 | 500 | %{_libdir}/%{name}/components/nsProxyAutoConfig.js |
ed3ba396 SP |
501 | %{_libdir}/%{name}/components/nsSearchService.js |
502 | %{_libdir}/%{name}/components/nsSearchSuggestions.js | |
25f97994 | 503 | %{_libdir}/%{name}/components/nsTaggingService.js |
25f97994 | 504 | %{_libdir}/%{name}/components/nsURLFormatter.js |
67c1f3e7 | 505 | %{_libdir}/%{name}/components/nsUpdateTimerManager.js |
0b404f48 | 506 | %{_libdir}/%{name}/components/nsUrlClassifierHashCompleter.js |
25f97994 | 507 | %{_libdir}/%{name}/components/nsUrlClassifierLib.js |
508 | %{_libdir}/%{name}/components/nsUrlClassifierListManager.js | |
509 | %{_libdir}/%{name}/components/nsWebHandlerApp.js | |
25f97994 | 510 | %{_libdir}/%{name}/components/storage-Legacy.js |
ed3ba396 | 511 | %{_libdir}/%{name}/components/storage-mozStorage.js |
25f97994 | 512 | %{_libdir}/%{name}/components/txEXSLTRegExFunctions.js |
513 | %endif | |
514 | ||
515 | %attr(755,root,root) %{_libdir}/%{name}/components/libbrowsercomps.so | |
25f97994 | 516 | %if %{without xulrunner} |
517 | %attr(755,root,root) %{_libdir}/%{name}/components/libdbusservice.so | |
25f97994 | 518 | %endif |
519 | ||
25f97994 | 520 | %if %{without xulrunner} |
521 | %attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so | |
522 | %endif | |
25f97994 | 523 | |
3d856204 | 524 | %attr(755,root,root) %{_libdir}/%{name}/iceweasel |
ba83c719 | 525 | %dir %{_libdir}/%{name}/plugins |
25f97994 | 526 | %if %{without xulrunner} |
d1ab36a9 | 527 | %attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh |
25f97994 | 528 | %attr(755,root,root) %{_libdir}/%{name}/iceweasel-bin |
25f97994 | 529 | %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client |
69dd136c | 530 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
25f97994 | 531 | %endif |
ba83c719 | 532 | |
28e49f45 | 533 | %{_iconsdir}/hicolor/*/*/iceweasel.png |
25f97994 | 534 | %{_desktopdir}/iceweasel.desktop |
535 | ||
536 | # symlinks | |
537 | %{_libdir}/%{name}/chrome | |
538 | %{_libdir}/%{name}/defaults | |
539 | %{_libdir}/%{name}/extensions | |
540 | %{_libdir}/%{name}/icons | |
541 | %{_libdir}/%{name}/modules | |
542 | %{_libdir}/%{name}/searchplugins | |
61766208 MB |
543 | %if %{with xulrunner} |
544 | %{_libdir}/%{name}/xulrunner | |
d60b15b4 | 545 | %else |
25f97994 | 546 | %{_libdir}/%{name}/dictionaries |
0044292b | 547 | %{_libdir}/%{name}/hyphenation |
48b2842a | 548 | %{_libdir}/%{name}/greprefs.js |
25f97994 | 549 | %{_libdir}/%{name}/res |
550 | %endif | |
551 | ||
25f97994 | 552 | %dir %{_datadir}/%{name} |
553 | %{_datadir}/%{name}/chrome | |
554 | %{_datadir}/%{name}/defaults | |
555 | %{_datadir}/%{name}/icons | |
556 | %{_datadir}/%{name}/modules | |
557 | %{_datadir}/%{name}/searchplugins | |
558 | %if %{without xulrunner} | |
48b2842a | 559 | %{_datadir}/%{name}/greprefs.js |
25f97994 | 560 | %{_datadir}/%{name}/res |
561 | %endif | |
562 | ||
563 | %dir %{_datadir}/%{name}/extensions | |
25f97994 | 564 | # the signature of the default theme |
565 | %{_datadir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} | |
64fd9f61 | 566 | |
fa89a5f1 | 567 | # files created by iceweasel -register |
25f97994 | 568 | %ghost %{_libdir}/%{name}/components/compreg.dat |
569 | %ghost %{_libdir}/%{name}/components/xpti.dat |