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