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