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