]>
Commit | Line | Data |
---|---|---|
aa946041 | 1 | # TODO: |
11940c31 | 2 | # - consider --enable-libproxy |
64fd9f61 | 3 | # |
64fd9f61 | 4 | # Conditional build: |
25f97994 | 5 | %bcond_with tests # enable tests (whatever they check) |
0ddb6810 | 6 | %bcond_with gtk3 # GTK+ 3.x instead of 2.x |
25f97994 | 7 | %bcond_without kerberos # disable krb5 support |
1a846247 | 8 | %bcond_without pgo # PGO-enabled build (requires working $DISPLAY == :100) |
557bfdce | 9 | # - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964 |
01462b05 | 10 | %bcond_with shared_js # shared libmozjs library [broken] |
25f97994 | 11 | |
11940c31 JR |
12 | # On updating version, grab CVE links from: |
13 | # https://www.mozilla.org/security/known-vulnerabilities/firefox.html | |
14 | ||
edeacddd ER |
15 | # The actual sqlite version (see RHBZ#480989): |
16 | %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR) | |
edeacddd | 17 | |
2b1be559 | 18 | %define nspr_ver 4.10.8 |
a9ac673e | 19 | %define nss_ver 3.19.2 |
837c600d | 20 | |
636318c9 | 21 | Summary: Iceweasel web browser |
3c179095 | 22 | Summary(hu.UTF-8): Iceweasel web böngésző |
1c0db0f7 | 23 | Summary(pl.UTF-8): Iceweasel - przeglądarka WWW |
636318c9 | 24 | Name: iceweasel |
a9ac673e | 25 | Version: 39.0 |
f9a73e8d | 26 | Release: 1 |
0ddb6810 | 27 | License: MPL v2.0 |
64fd9f61 | 28 | Group: X11/Applications/Networking |
57727a75 | 29 | Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.bz2 |
a9ac673e | 30 | # Source0-md5: 34d9841bc9b8a85aaf06e311cf1cb263 |
f7893426 | 31 | Source1: %{name}-branding.tar.xz |
ae133391 | 32 | # Source1-md5: aacc7e8298a3e6aa3ef2a3613a62f635 |
6263e082 | 33 | Source2: %{name}-rm_nonfree.sh |
34 | Source3: %{name}.desktop | |
35 | Source4: %{name}.sh | |
55f0784a JR |
36 | Source5: vendor.js |
37 | Source6: vendor-ac.js | |
25f97994 | 38 | Patch0: %{name}-branding.patch |
bacd8404 JR |
39 | Patch1: idl-parser.patch |
40 | Patch2: xulrunner-new-libxul.patch | |
41 | Patch3: xulrunner-paths.patch | |
42 | Patch4: xulrunner-pc.patch | |
43 | Patch5: install-pc-files.patch | |
44 | Patch6: %{name}-prefs.patch | |
45 | Patch7: %{name}-pld-branding.patch | |
46 | Patch8: %{name}-no-subshell.patch | |
47 | Patch9: %{name}-middle_click_paste.patch | |
48 | Patch10: %{name}-packaging.patch | |
49 | Patch11: system-virtualenv.patch | |
50 | Patch12: Disable-Firefox-Health-Report.patch | |
743c829e | 51 | URL: http://www.pld-linux.org/Packages/Iceweasel |
bcf987c2 | 52 | BuildRequires: OpenGL-devel |
4a6ac63f | 53 | BuildRequires: ImageMagick |
f26228e9 | 54 | BuildRequires: ImageMagick-coder-png |
72c3acea | 55 | BuildRequires: alsa-lib-devel |
64fd9f61 | 56 | BuildRequires: automake |
526c2cf9 | 57 | BuildRequires: bzip2-devel |
ec8ea9c6 | 58 | BuildRequires: cairo-devel >= 1.10.2-5 |
72c3acea | 59 | BuildRequires: dbus-glib-devel >= 0.60 |
957d61d8 | 60 | BuildRequires: freetype-devel >= 1:2.1.8 |
087998e5 | 61 | BuildRequires: gcc-c++ >= 6:4.4 |
2b1be559 | 62 | BuildRequires: glib2-devel >= 1:2.22 |
557bfdce JR |
63 | BuildRequires: gstreamer-devel >= 1.0 |
64 | BuildRequires: gstreamer-plugins-base-devel >= 1.0 | |
2b1be559 JB |
65 | %{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.18.0} |
66 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.4.0} | |
25f97994 | 67 | %{?with_kerberos:BuildRequires: heimdal-devel >= 0.7.1} |
01462b05 | 68 | BuildRequires: hunspell-devel >= 1.2.3 |
64fd9f61 | 69 | BuildRequires: libIDL-devel >= 0.8.0 |
2b1be559 JB |
70 | # DECnet (dnprogs.spec), not dummy net (libdnet.spec) |
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 |
2b1be559 | 82 | BuildRequires: libpng-devel >= 2:1.6.16 |
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 |
90739b02 | 101 | BuildRequires: sqlite3-devel >= 3.8.9 |
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 | |
648c889c | 110 | BuildConflicts: %{name}-devel < %{version} |
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 |
75db0a66 | 135 | %define _noautoreq libmozalloc.so libmozjs.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 | |
2b1be559 JB |
156 | Requires: glib2 >= 1:2.22 |
157 | %{!?with_gtk3:Requires: gtk+2 >= 2:2.18.0} | |
158 | %{?with_gtk3:Requires: gtk+3 >= 3.4.0} | |
bacd8404 | 159 | Requires: libjpeg-turbo |
2b1be559 | 160 | Requires: libpng >= 2:1.6.16 |
bacd8404 JR |
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 | |
a32f5336 | 166 | Provides: xulrunner-libs = 2:%{version}-%{release} |
bacd8404 JR |
167 | Obsoletes: xulrunner-libs |
168 | ||
169 | %description libs | |
170 | XULRunner shared libraries. | |
171 | ||
172 | %description libs -l pl.UTF-8 | |
173 | Biblioteki współdzielone XULRunnera. | |
174 | ||
4e4b5111 JR |
175 | %package devel |
176 | Summary: Headers for developing programs that will use Iceweasel | |
177 | Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów używających Iceweasel | |
11940c31 | 178 | Group: X11/Development/Libraries |
bacd8404 | 179 | Requires: %{name}-libs = %{version}-%{release} |
11940c31 JR |
180 | Requires: nspr-devel >= 1:%{nspr_ver} |
181 | Requires: nss-devel >= 1:%{nss_ver} | |
182 | Requires: python-ply | |
a32f5336 | 183 | Provides: xulrunner-devel = 2:%{version}-%{release} |
11940c31 JR |
184 | Obsoletes: mozilla-devel |
185 | Obsoletes: mozilla-firefox-devel | |
186 | Obsoletes: seamonkey-devel | |
4e4b5111 | 187 | Obsoletes: xulrunner-devel |
11940c31 | 188 | |
4e4b5111 JR |
189 | %description devel |
190 | Iceweasel development package. | |
11940c31 | 191 | |
4e4b5111 JR |
192 | %description devel -l pl.UTF-8 |
193 | Pakiet programistyczny Iceweasela. | |
11940c31 | 194 | |
25f97994 | 195 | %prep |
ed3ba396 | 196 | %setup -qc |
dca77f61 | 197 | mv -f mozilla-release mozilla |
ed3ba396 | 198 | %setup -q -T -D -a1 |
25f97994 | 199 | cd mozilla |
6263e082 | 200 | /bin/sh %{SOURCE2} |
64fd9f61 | 201 | |
c1b54772 JR |
202 | # avoid using included headers (-I. is before HUNSPELL_CFLAGS) |
203 | %{__rm} extensions/spellcheck/hunspell/src/{*.hxx,hunspell.h} | |
204 | # hunspell needed for factory including mozHunspell.h | |
205 | echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Makefile.in | |
206 | ||
e73b7e54 | 207 | %patch0 -p1 |
bacd8404 JR |
208 | %patch1 -p2 |
209 | %patch2 -p1 | |
210 | %patch3 -p2 | |
211 | %patch4 -p1 | |
212 | %patch5 -p2 | |
213 | %patch6 -p1 | |
25f97994 | 214 | %patch7 -p1 |
bacd8404 | 215 | %patch8 -p2 |
9f488603 | 216 | %patch9 -p2 |
c06b9612 | 217 | %patch10 -p1 |
93241bee | 218 | %patch11 -p2 |
bacd8404 | 219 | %patch12 -p1 |
b72a40b3 | 220 | |
4e4b5111 JR |
221 | cp -a xulrunner/installer/*.pc.in browser/installer/ |
222 | ||
aa946041 ŁK |
223 | %if %{with pgo} |
224 | sed -i -e 's@__BROWSER_PATH__@"../../dist/bin/iceweasel-bin"@' build/automation.py.in | |
225 | %endif | |
226 | ||
25f97994 | 227 | %build |
228 | cd mozilla | |
c5cc86e7 | 229 | cp -p %{_datadir}/automake/config.* build/autoconf |
64fd9f61 | 230 | |
c5cc86e7 JR |
231 | cat << 'EOF' > .mozconfig |
232 | . $topsrcdir/browser/config/mozconfig | |
64fd9f61 | 233 | |
25f97994 | 234 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu} |
235 | ||
236 | # Options for 'configure' (same as command-line options). | |
a5076679 JR |
237 | ac_add_options --build=%{_target_platform} |
238 | ac_add_options --host=%{_target_platform} | |
64fd9f61 | 239 | ac_add_options --prefix=%{_prefix} |
240 | ac_add_options --exec-prefix=%{_exec_prefix} | |
241 | ac_add_options --bindir=%{_bindir} | |
242 | ac_add_options --sbindir=%{_sbindir} | |
243 | ac_add_options --sysconfdir=%{_sysconfdir} | |
244 | ac_add_options --datadir=%{_datadir} | |
245 | ac_add_options --includedir=%{_includedir} | |
246 | ac_add_options --libdir=%{_libdir} | |
247 | ac_add_options --libexecdir=%{_libexecdir} | |
248 | ac_add_options --localstatedir=%{_localstatedir} | |
249 | ac_add_options --sharedstatedir=%{_sharedstatedir} | |
250 | ac_add_options --mandir=%{_mandir} | |
251 | ac_add_options --infodir=%{_infodir} | |
64fd9f61 | 252 | %if %{?debug:1}0 |
25f97994 | 253 | ac_add_options --disable-optimize |
64fd9f61 | 254 | ac_add_options --enable-debug |
255 | ac_add_options --enable-debug-modules | |
25f97994 | 256 | ac_add_options --enable-debugger-info-modules |
257 | ac_add_options --enable-crash-on-assert | |
64fd9f61 | 258 | %else |
259 | ac_add_options --disable-debug | |
260 | ac_add_options --disable-debug-modules | |
25f97994 | 261 | ac_add_options --disable-logging |
262 | ac_add_options --enable-optimize="%{rpmcflags} -Os" | |
64fd9f61 | 263 | %endif |
82955f33 ER |
264 | ac_add_options --disable-strip |
265 | ac_add_options --disable-strip-libs | |
a5076679 | 266 | ac_add_options --disable-install-strip |
25f97994 | 267 | %if %{with tests} |
268 | ac_add_options --enable-tests | |
39ef872e | 269 | ac_add_options --enable-mochitest |
25f97994 | 270 | %else |
31d0cdc0 JR |
271 | %if %{with pgo} |
272 | ac_add_options --enable-tests | |
273 | %else | |
25f97994 | 274 | ac_add_options --disable-tests |
31d0cdc0 | 275 | %endif |
39ef872e | 276 | ac_add_options --disable-mochitest |
25f97994 | 277 | %endif |
39ef872e | 278 | ac_add_options --disable-cpp-exceptions |
25f97994 | 279 | ac_add_options --disable-crashreporter |
a5076679 JR |
280 | ac_add_options --disable-elf-dynstr-gc |
281 | ac_add_options --disable-gconf | |
282 | ac_add_options --disable-gnomeui | |
283 | ac_add_options --disable-gnomevfs | |
64fd9f61 | 284 | ac_add_options --disable-installer |
25f97994 | 285 | ac_add_options --disable-javaxpcom |
a5076679 | 286 | ac_add_options --disable-long-long-warning |
39ef872e | 287 | ac_add_options --disable-necko-wifi |
a5076679 | 288 | ac_add_options --disable-pedantic |
25f97994 | 289 | ac_add_options --disable-updater |
a5076679 JR |
290 | ac_add_options --disable-xterm-updates |
291 | ac_add_options --enable-canvas | |
39ef872e | 292 | ac_add_options --enable-chrome-format=omni |
0ddb6810 | 293 | ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2} |
c5cc86e7 | 294 | ac_add_options --enable-extensions=default |
0d0192cb | 295 | ac_add_options --enable-gio |
557bfdce | 296 | ac_add_options --enable-gstreamer=1.0 |
d1ab36a9 | 297 | ac_add_options --enable-libxul |
a5076679 | 298 | ac_add_options --enable-mathml |
d1ab36a9 | 299 | ac_add_options --enable-pango |
a5076679 | 300 | ac_add_options --enable-readline |
39ef872e | 301 | ac_add_options --enable-safe-browsing |
557bfdce | 302 | %{?with_shared_js:ac_add_options --enable-shared-js} |
25f97994 | 303 | ac_add_options --enable-startup-notification |
a5076679 | 304 | ac_add_options --enable-svg |
64fd9f61 | 305 | ac_add_options --enable-system-cairo |
a5076679 | 306 | ac_add_options --enable-system-ffi |
01385fad | 307 | ac_add_options --enable-system-hunspell |
25f97994 | 308 | ac_add_options --enable-system-sqlite |
a5076679 | 309 | ac_add_options --enable-url-classifier |
39ef872e | 310 | ac_add_options --enable-xinerama |
25f97994 | 311 | ac_add_options --with-branding=iceweasel/branding |
a5076679 JR |
312 | ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name} |
313 | ac_add_options --with-distribution-id=org.pld-linux | |
64fd9f61 | 314 | ac_add_options --with-pthreads |
82955f33 | 315 | ac_add_options --with-system-bz2 |
50b5fac1 | 316 | ac_add_options --with-system-icu |
64fd9f61 | 317 | ac_add_options --with-system-jpeg |
fa89a5f1 | 318 | ac_add_options --with-system-libevent |
0d0192cb | 319 | ac_add_options --with-system-libvpx |
64fd9f61 | 320 | ac_add_options --with-system-nspr |
321 | ac_add_options --with-system-nss | |
a5076679 | 322 | ac_add_options --with-system-ply |
64fd9f61 | 323 | ac_add_options --with-system-png |
324 | ac_add_options --with-system-zlib | |
a5076679 | 325 | ac_add_options --with-x |
64fd9f61 | 326 | EOF |
327 | ||
aa946041 | 328 | %if %{with pgo} |
a2ee0328 AM |
329 | D=$(( RANDOM % (200 - 100 + 1 ) + 5 )) |
330 | /usr/bin/Xvfb :${D} & | |
c1b54772 JR |
331 | XVFB_PID=$! |
332 | [ -n "$XVFB_PID" ] || exit 1 | |
a2ee0328 | 333 | export DISPLAY=:${D} |
cde8a231 | 334 | %{__make} -j1 -f client.mk profiledbuild \ |
aa946041 | 335 | DESTDIR=obj-%{_target_cpu}/dist \ |
aa946041 | 336 | CC="%{__cc}" \ |
cde8a231 JR |
337 | CXX="%{__cxx}" \ |
338 | MOZ_MAKE_FLAGS="%{_smp_mflags}" | |
c1b54772 | 339 | kill $XVFB_PID |
aa946041 | 340 | %else |
cde8a231 | 341 | %{__make} -j1 -f client.mk build \ |
25f97994 | 342 | CC="%{__cc}" \ |
cde8a231 JR |
343 | CXX="%{__cxx}" \ |
344 | MOZ_MAKE_FLAGS="%{_smp_mflags}" | |
aa946041 | 345 | %endif |
64fd9f61 | 346 | |
347 | %install | |
348 | rm -rf $RPM_BUILD_ROOT | |
25f97994 | 349 | cd mozilla |
64fd9f61 | 350 | install -d \ |
25f97994 | 351 | $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \ |
28e49f45 | 352 | $RPM_BUILD_ROOT%{_desktopdir} \ |
d5be93be | 353 | $RPM_BUILD_ROOT%{_datadir}/%{name}/browser \ |
bacd8404 JR |
354 | $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/plugins \ |
355 | $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/{lib,bin} \ | |
356 | $RPM_BUILD_ROOT%{_includedir}/%{name} \ | |
357 | $RPM_BUILD_ROOT%{_datadir}/idl/%{name} \ | |
358 | $RPM_BUILD_ROOT%{_pkgconfigdir} | |
64fd9f61 | 359 | |
d5be93be | 360 | %browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/browser/plugins |
64fd9f61 | 361 | |
3e529974 | 362 | cd obj-%{_target_cpu} |
11940c31 | 363 | %{__make} -C browser/installer stage-package libxul.pc libxul-embedding.pc mozilla-js.pc mozilla-plugin.pc \ |
25f97994 | 364 | DESTDIR=$RPM_BUILD_ROOT \ |
3e529974 | 365 | installdir=%{_libdir}/%{name} \ |
11940c31 | 366 | INSTALL_SDK=1 \ |
25f97994 | 367 | PKG_SKIP_STRIP=1 |
368 | ||
3e529974 JR |
369 | %{__make} -C iceweasel/branding install \ |
370 | DESTDIR=$RPM_BUILD_ROOT | |
371 | ||
bacd8404 JR |
372 | cp -aL browser/installer/*.pc $RPM_BUILD_ROOT%{_pkgconfigdir} |
373 | cp -aL dist/iceweasel/* $RPM_BUILD_ROOT%{_libdir}/%{name}/ | |
374 | cp -aL dist/idl/* $RPM_BUILD_ROOT%{_datadir}/idl/%{name} | |
375 | cp -aL dist/include/* $RPM_BUILD_ROOT%{_includedir}/%{name} | |
376 | cp -aL dist/include/xpcom-config.h $RPM_BUILD_ROOT%{_libdir}/%{name}-devel | |
377 | cp -aL dist/sdk/lib/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib | |
378 | cp -aL dist/sdk/bin/* $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin | |
379 | find $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk -name "*.pyc" | xargs rm -f | |
380 | ||
381 | ln -s %{_libdir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/bin | |
382 | ln -s %{_includedir}/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/include | |
383 | ln -s %{_datadir}/idl/%{name} $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/idl | |
384 | ln -s %{_libdir}/%{name}-devel/sdk/lib $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/lib | |
385 | ||
386 | # replace copies with symlinks | |
387 | %{?with_shared_js:ln -sf %{_libdir}/%{name}/libmozjs.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libmozjs.so} | |
388 | ln -sf %{_libdir}/%{name}/libxul.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libxul.so | |
389 | ln -sf %{_libdir}/%{name}/libmozalloc.so $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/lib/libmozalloc.so | |
390 | # temp fix for https://bugzilla.mozilla.org/show_bug.cgi?id=63955 | |
391 | chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}-devel/sdk/bin/xpt.py | |
ba83c719 | 392 | |
25f97994 | 393 | # move arch independant ones to datadir |
d5be93be | 394 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/chrome |
3118200d | 395 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/extensions |
d5be93be JR |
396 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/icons |
397 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/searchplugins | |
031a929e JR |
398 | mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults |
399 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/{pref,preferences} | |
95d7e788 | 400 | |
d5be93be | 401 | ln -s ../../../share/%{name}/browser/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/chrome |
4dc7b9b3 | 402 | ln -s ../../../share/%{name}/browser/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/defaults |
3118200d | 403 | ln -s ../../../share/%{name}/browser/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/extensions |
d5be93be JR |
404 | ln -s ../../../share/%{name}/browser/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/icons |
405 | ln -s ../../../share/%{name}/browser/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/searchplugins | |
64fd9f61 | 406 | |
b2c3c458 | 407 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
25f97994 | 408 | ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries |
64fd9f61 | 409 | |
6263e082 | 410 | sed 's,@LIBDIR@,%{_libdir},' %{SOURCE4} > $RPM_BUILD_ROOT%{_bindir}/iceweasel |
57727a75 | 411 | chmod 755 $RPM_BUILD_ROOT%{_bindir}/iceweasel |
25f97994 | 412 | ln -s iceweasel $RPM_BUILD_ROOT%{_bindir}/firefox |
413 | ln -s iceweasel $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox | |
64fd9f61 | 414 | |
28e49f45 | 415 | # install icons and desktop file |
3e529974 | 416 | cp iceweasel/branding/{mozicon,default}128.png |
28e49f45 MB |
417 | for i in 16 32 48 64 128; do |
418 | install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps | |
3e529974 | 419 | cp -a iceweasel/branding/default${i}.png \ |
28e49f45 MB |
420 | $RPM_BUILD_ROOT%{_iconsdir}/hicolor/${i}x${i}/apps/iceweasel.png |
421 | done | |
422 | ||
c4d76d99 | 423 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
64fd9f61 | 424 | |
55f0784a | 425 | # install our settings |
55f0784a | 426 | %if "%{pld_release}" == "ac" |
d5be93be | 427 | cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js |
4dc7b9b3 JB |
428 | %else |
429 | cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/%{name}/browser/defaults/preferences/vendor.js | |
55f0784a JR |
430 | %endif |
431 | ||
fa89a5f1 | 432 | # files created by iceweasel -register |
d5be93be JR |
433 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/compreg.dat |
434 | touch $RPM_BUILD_ROOT%{_libdir}/%{name}/browser/components/xpti.dat | |
64fd9f61 | 435 | |
56be5f03 | 436 | cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
64fd9f61 | 437 | #!/bin/sh |
438 | umask 022 | |
d5be93be | 439 | rm -f %{_libdir}/%{name}/browser/components/{compreg,xpti}.dat |
64fd9f61 | 440 | |
25f97994 | 441 | # it attempts to touch files in $HOME/.mozilla |
442 | # beware if you run this with sudo!!! | |
443 | export HOME=$(mktemp -d) | |
444 | # also TMPDIR could be pointing to sudo user's homedir | |
445 | unset TMPDIR TMP || : | |
64fd9f61 | 446 | |
25f97994 | 447 | %{_libdir}/%{name}/iceweasel -register |
64fd9f61 | 448 | |
b2c3c458 | 449 | rm -rf $HOME |
64fd9f61 | 450 | EOF |
18df252d | 451 | chmod 755 $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate |
64fd9f61 | 452 | |
453 | %clean | |
454 | rm -rf $RPM_BUILD_ROOT | |
455 | ||
25f97994 | 456 | %pretrans |
14b6c040 | 457 | if [ -d %{_libdir}/%{name}/browser/extensions ] && [ ! -L %{_libdir}/%{name}/browser/extensions ]; then |
3118200d | 458 | install -d %{_datadir}/%{name}/browser |
14b6c040 JR |
459 | if [ -e %{_datadir}/%{name}/browser/extensions ]; then |
460 | mv %{_datadir}/%{name}/browser/extensions{,.rpmsave} | |
461 | fi | |
462 | mv -v %{_libdir}/%{name}/browser/extensions %{_datadir}/%{name}/browser/extensions | |
0fadbc56 | 463 | fi |
25f97994 | 464 | if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then |
465 | mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave} | |
466 | fi | |
25f97994 | 467 | exit 0 |
468 | ||
64fd9f61 | 469 | %post |
3e92c67c | 470 | %{_sbindir}/%{name}-chrome+xpcom-generate |
25f97994 | 471 | %update_browser_plugins |
28e49f45 | 472 | %update_icon_cache hicolor |
8309582e | 473 | %update_desktop_database |
64fd9f61 | 474 | |
95d7e788 | 475 | %postun |
25f97994 | 476 | if [ "$1" = 0 ]; then |
477 | %update_browser_plugins | |
28e49f45 | 478 | %update_icon_cache hicolor |
64fd9f61 | 479 | fi |
480 | ||
64fd9f61 | 481 | %files |
482 | %defattr(644,root,root,755) | |
25f97994 | 483 | %attr(755,root,root) %{_bindir}/%{name} |
484 | %attr(755,root,root) %{_bindir}/firefox | |
485 | %attr(755,root,root) %{_bindir}/mozilla-firefox | |
486 | %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate | |
487 | ||
4dc7b9b3 JB |
488 | %{_desktopdir}/iceweasel.desktop |
489 | %{_iconsdir}/hicolor/*/apps/iceweasel.png | |
490 | ||
25f97994 | 491 | # browser plugins v2 |
492 | %{_browserpluginsconfdir}/browsers.d/%{name}.* | |
493 | %config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist | |
64fd9f61 | 494 | |
d5be93be JR |
495 | %dir %{_libdir}/%{name}/browser |
496 | %dir %{_libdir}/%{name}/browser/components | |
d5be93be JR |
497 | %dir %{_libdir}/%{name}/browser/plugins |
498 | ||
499 | %dir %{_datadir}/%{name} | |
500 | %dir %{_datadir}/%{name}/browser | |
3118200d | 501 | %dir %{_datadir}/%{name}/browser/extensions |
d5be93be | 502 | %{_datadir}/%{name}/browser/chrome |
4dc7b9b3 | 503 | %{_datadir}/%{name}/browser/defaults |
d5be93be JR |
504 | %{_datadir}/%{name}/browser/icons |
505 | %{_datadir}/%{name}/browser/searchplugins | |
d5be93be JR |
506 | |
507 | # symlinks | |
3118200d | 508 | %{_libdir}/%{name}/browser/extensions |
d5be93be JR |
509 | %{_libdir}/%{name}/browser/chrome |
510 | %{_libdir}/%{name}/browser/icons | |
511 | %{_libdir}/%{name}/browser/searchplugins | |
55002fb3 | 512 | %{_libdir}/%{name}/browser/defaults |
d5be93be | 513 | |
4dc7b9b3 JB |
514 | %attr(755,root,root) %{_libdir}/%{name}/iceweasel |
515 | %attr(755,root,root) %{_libdir}/%{name}/iceweasel-bin | |
516 | %attr(755,root,root) %{_libdir}/%{name}/run-mozilla.sh | |
d5be93be JR |
517 | %{_libdir}/%{name}/application.ini |
518 | %{_libdir}/%{name}/browser/blocklist.xml | |
519 | %{_libdir}/%{name}/browser/chrome.manifest | |
4dc7b9b3 JB |
520 | %{_libdir}/%{name}/browser/components/components.manifest |
521 | %attr(755,root,root) %{_libdir}/%{name}/browser/components/libbrowsercomps.so | |
d5be93be | 522 | # the signature of the default theme |
3118200d | 523 | %{_datadir}/%{name}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} |
d5be93be | 524 | %{_libdir}/%{name}/browser/omni.ja |
d5be93be JR |
525 | %{_libdir}/%{name}/webapprt |
526 | %attr(755,root,root) %{_libdir}/%{name}/webapprt-stub | |
527 | ||
d5be93be JR |
528 | # files created by iceweasel -register |
529 | %ghost %{_libdir}/%{name}/browser/components/compreg.dat | |
530 | %ghost %{_libdir}/%{name}/browser/components/xpti.dat | |
25f97994 | 531 | |
4dc7b9b3 | 532 | # private xulrunner instance |
55002fb3 JR |
533 | %dir %{_libdir}/%{name}/components |
534 | %{_libdir}/%{name}/components/components.manifest | |
535 | %attr(755,root,root) %{_libdir}/%{name}/components/libdbusservice.so | |
536 | %attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so | |
69dd136c | 537 | %attr(755,root,root) %{_libdir}/%{name}/plugin-container |
25f97994 | 538 | %{_libdir}/%{name}/dictionaries |
55002fb3 | 539 | %{_libdir}/%{name}/chrome.manifest |
bacd8404 | 540 | |
5d1a925a JB |
541 | %dir %{_libdir}/%{name}/gmp-clearkey |
542 | %dir %{_libdir}/%{name}/gmp-clearkey/0.1 | |
543 | %{_libdir}/%{name}/gmp-clearkey/0.1/clearkey.info | |
544 | %attr(755,root,root) %{_libdir}/%{name}/gmp-clearkey/0.1/libclearkey.so | |
545 | ||
bacd8404 JR |
546 | %files libs |
547 | %defattr(644,root,root,755) | |
548 | %dir %{_libdir}/%{name} | |
549 | %{_libdir}/%{name}/platform.ini | |
550 | %attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so | |
551 | %{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so} | |
552 | %attr(755,root,root) %{_libdir}/%{name}/libxul.so | |
553 | %{_libdir}/%{name}/dependentlibs.list | |
55002fb3 | 554 | %{_libdir}/%{name}/omni.ja |
bacd8404 JR |
555 | |
556 | %files devel | |
557 | %defattr(644,root,root,755) | |
558 | %{_includedir}/%{name} | |
559 | %{_datadir}/idl/%{name} | |
560 | %dir %{_libdir}/%{name}-devel | |
561 | %{_libdir}/%{name}-devel/bin | |
562 | %{_libdir}/%{name}-devel/idl | |
563 | %{_libdir}/%{name}-devel/lib | |
564 | %{_libdir}/%{name}-devel/include | |
565 | %{_libdir}/%{name}-devel/*.h | |
566 | %dir %{_libdir}/%{name}-devel/sdk | |
567 | %{_libdir}/%{name}-devel/sdk/lib | |
568 | %dir %{_libdir}/%{name}-devel/sdk/bin | |
5d1a925a JB |
569 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/header.py |
570 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/run-mozilla.sh | |
571 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/typelib.py | |
572 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpcshell | |
573 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpidl.py | |
574 | %{_libdir}/%{name}-devel/sdk/bin/xpidllex.py | |
575 | %{_libdir}/%{name}-devel/sdk/bin/xpidlyacc.py | |
576 | %attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/xpt.py | |
577 | %{_libdir}/%{name}-devel/sdk/bin/ply | |
578 | ||
bacd8404 JR |
579 | %{_pkgconfigdir}/libxul.pc |
580 | %{_pkgconfigdir}/libxul-embedding.pc | |
581 | %{_pkgconfigdir}/mozilla-js.pc | |
582 | %{_pkgconfigdir}/mozilla-plugin.pc |