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