]> git.pld-linux.org Git - packages/xulrunner.git/blame - xulrunner.spec
- disabled gtkmozembed.patch (does anything still need it?)
[packages/xulrunner.git] / xulrunner.spec
CommitLineData
6dba4fe0
JB
1# TODO:
2# - consider --enable-libproxy
7efa2a61 3#
63cf8994 4# Conditional build:
ac1dcb1a 5%bcond_with tests # enable tests (whatever they check)
2699fb15 6%bcond_without gnomeui # disable gnomeui support
55358c73 7%bcond_without gnome # synonym for gnomeui (gconf, libnotify and gio are still enabled)
ee5ff1b5 8%bcond_with qt # build with qt toolkit
a917d656 9
2699fb15
ER
10%if %{without gnome}
11%undefine with_gnomeui
2699fb15
ER
12%endif
13
8b358eef 14# On updating version, grab CVE links from:
a35780a1 15# https://www.mozilla.org/security/known-vulnerabilities/firefox.html
8b358eef 16
bf3c5cc3
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)
19
ec9b6a88
AO
20%define nspr_ver 4.9
21%define nss_ver 3.13.3
c1c6745d 22
b5fe5125 23Summary: XULRunner - Mozilla Runtime Environment for XUL+XPCOM applications
89124efd 24Summary(pl.UTF-8): XULRunner - środowisko uruchomieniowe Mozilli dla aplikacji XUL+XPCOM
59d7d753 25Name: xulrunner
fccc909d
ER
26Version: 16.0.1
27Release: 0.1
e749c2df 28Epoch: 2
b5fe5125
JB
29License: MPL v1.1 or GPL v2+ or LGPL v2.1+
30Group: X11/Applications
ff764510 31# Source tarball for xulrunner is in fact firefox tarball (checked on 1.9), so lets use it
32# instead of waiting for mozilla to copy file on ftp.
e5205070 33Source0: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}.source.tar.bz2
fccc909d 34# Source0-md5: 78e641c67dc4a40cb3f48fce3e782d41
28a1a68d 35Patch0: %{name}-install.patch
36Patch1: %{name}-rpath.patch
73729f74 37Patch4: %{name}-paths.patch
c63d951e
JB
38Patch5: %{name}-pc.patch
39Patch6: %{name}-prefs.patch
e4a6ec27 40Patch7: system-cairo.patch
eaf8148b 41# http://pkgs.fedoraproject.org/gitweb/?p=xulrunner.git;a=tree
c63d951e 42Patch9: %{name}-gtkmozembed.patch
0926ff0c 43Patch11: idl-parser.patch
c48ca27f
JR
44# Edit patch below and restore --system-site-packages when system virtualenv gets 1.7 upgrade
45Patch12: system-virtualenv.patch
c1c6745d 46URL: https://developer.mozilla.org/en/XULRunner
55358c73 47%{!?with_qt:BuildRequires: GConf2-devel >= 1.2.1}
06e4bb6c 48BuildRequires: alsa-lib-devel
59d7d753 49BuildRequires: automake
ffa2e5ba 50BuildRequires: bzip2-devel
752c2e6e 51BuildRequires: cairo-devel >= 1.10.2-5
7947dc48 52BuildRequires: dbus-glib-devel >= 0.60
59d7d753 53BuildRequires: freetype-devel >= 1:2.1.8
f69c8d3e 54BuildRequires: glib2-devel >= 1:2.18
f4ce9014 55%{!?with_qt:BuildRequires: gtk+2-devel >= 2:2.14}
2699fb15 56BuildRequires: hunspell-devel >= 1.2.3
b5fe5125 57BuildRequires: libIDL-devel >= 0.8.0
7de78bb4 58BuildRequires: libdnet-devel
c63d951e 59BuildRequires: libevent-devel >= 1.4.7
f4ce9014
JB
60# standalone libffi 3.0.9 or gcc's from 4.5(?)+
61BuildRequires: libffi-devel >= 6:3.0.9
2699fb15 62%{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0}
7de78bb4 63BuildRequires: libiw-devel
59d7d753 64BuildRequires: libjpeg-devel >= 6b
55358c73 65%{!?with_qt:BuildRequires: libnotify-devel >= 0.4}
37dddfe0 66BuildRequires: libpng(APNG)-devel >= 0.10
83fa6cff 67BuildRequires: libpng-devel >= 1.5.9
59d7d753 68BuildRequires: libstdc++-devel
1a944dfc 69BuildRequires: libvpx-devel >= 1.0.0
c1c6745d
ER
70BuildRequires: nspr-devel >= 1:%{nspr_ver}
71BuildRequires: nss-devel >= 1:%{nss_ver}
81ad5c2f 72BuildRequires: pango-devel >= 1:1.14.0
59d7d753 73BuildRequires: pkgconfig
f4ce9014 74BuildRequires: pkgconfig(libffi) >= 3.0.9
752c2e6e 75BuildRequires: python >= 1:2.5
c48ca27f 76BuildRequires: python-virtualenv
ac1dcb1a 77BuildRequires: rpm >= 4.4.9-56
78BuildRequires: rpmbuild(macros) >= 1.453
59d7d753 79BuildRequires: sed >= 4.0
18c7bcfd 80BuildRequires: sqlite3-devel >= 3.7.10
81ad5c2f 81BuildRequires: startup-notification-devel >= 0.8
ff308923 82BuildRequires: unzip
777fab5b
ER
83%if "%{pld_release}" == "ac"
84BuildRequires: xcursor-devel
85BuildRequires: xft-devel >= 2.1-2
86%else
c63d951e 87BuildRequires: xorg-lib-libXScrnSaver-devel
275119bb 88BuildRequires: xorg-lib-libXext-devel
275119bb 89BuildRequires: xorg-lib-libXinerama-devel
275119bb 90BuildRequires: xorg-lib-libXt-devel
777fab5b 91%endif
63cf8994 92BuildRequires: zip
b5fe5125 93BuildRequires: zlib-devel >= 1.2.3
e5c36edf 94BuildConflicts: xulrunner-devel < %{epoch}:%{name}-%{version}
63cf8994 95Requires(post): mktemp >= 1.5-18
40815d23 96Requires: %{name}-libs = %{epoch}:%{version}-%{release}
ea094ca2 97Requires: browser-plugins >= 2.0
777fab5b 98Requires: myspell-common
c1c6745d
ER
99Requires: nspr >= 1:%{nspr_ver}
100Requires: nss >= 1:%{nss_ver}
59d7d753 101BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
102
ca6c04cd
AM
103%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
104
dd913ffd
JB
105# no Provides from private modules (don't use %{name} here, it expands to each subpackage name...)
106%define _noautoprovfiles %{_libdir}/xulrunner/components %{_libdir}/xulrunner/plugins
412b56d4 107# no need to require them (we have strict deps for these)
c1c6745d 108%define _noautoreq libmozjs.so libxpcom.so libxul.so libmozalloc.so
7ad260ea 109
59d7d753 110%description
b5fe5125
JB
111XULRunner is a Mozilla runtime package that can be used to bootstrap
112XUL+XPCOM applications that are as rich as Firefox and Thunderbird. It
113will provide mechanisms for installing, upgrading, and uninstalling
114these applications. XULRunner will also provide libxul, a solution
115which allows the embedding of Mozilla technologies in other projects
116and products.
59d7d753 117
a7f23e81
JR
118%description -l pl.UTF-8
119XULRunner to pakiet uruchomieniowy Mozilli, którego można użyć do
b5fe5125 120uruchamiania aplikacji XUL+XPCOM, nawet takich jak Firefox czy
a7f23e81
JR
121Thunderbird. Udostępni mechanizmy do instalowania, uaktualniania i
122odinstalowywania tych aplikacji. XULRunner będzie także dostarczał
123libxul - rozwiązanie umożliwiające osadzanie technologii Mozilli w
b5fe5125 124innych projektach i produktach.
59d7d753 125
126%package libs
127Summary: XULRunner shared libraries
89124efd 128Summary(pl.UTF-8): Biblioteki współdzielone XULRunnera
b5fe5125 129Group: X11/Libraries
752c2e6e 130Requires: cairo >= 1.10.2-5
81ad5c2f 131Requires: dbus-glib >= 0.60
f69c8d3e 132Requires: glib2 >= 1:2.18
f4ce9014 133%{!?with_qt:Requires: gtk+2 >= 2:2.14}
c63d951e 134Requires: libpng >= 1.4.1
777fab5b 135Requires: libpng(APNG) >= 0.10
81ad5c2f 136Requires: pango >= 1:1.14.0
bf3c5cc3 137Requires: sqlite3 >= %{sqlite_build_version}
81ad5c2f 138Requires: startup-notification >= 0.8
59d7d753 139
140%description libs
141XULRunner shared libraries.
142
a7f23e81
JR
143%description libs -l pl.UTF-8
144Biblioteki współdzielone XULRunnera.
59d7d753 145
146%package devel
147Summary: Headers for developing programs that will use XULRunner
89124efd 148Summary(pl.UTF-8): Pliki nagłówkowe do tworzenia programów używających XULRunnera
59d7d753 149Group: X11/Development/Libraries
40815d23 150Requires: %{name}-libs = %{epoch}:%{version}-%{release}
c1c6745d
ER
151Requires: nspr-devel >= 1:%{nspr_ver}
152Requires: nss-devel >= 1:%{nss_ver}
b7d7eee4 153Requires: python-ply
59d7d753 154Obsoletes: mozilla-devel
155Obsoletes: mozilla-firefox-devel
156Obsoletes: seamonkey-devel
157
158%description devel
159XULRunner development package.
160
a7f23e81 161%description devel -l pl.UTF-8
b5fe5125 162Pakiet programistyczny XULRunnera.
59d7d753 163
d9800582
JB
164%package gnome
165Summary: GNOME support package for XULRunner
166Summary(pl.UTF-8): Pakiet wspierający integrację XULRunnera z GNOME
167Group: X11/Libraries
40815d23 168Requires: %{name} = %{epoch}:%{version}-%{release}
d9800582
JB
169
170%description gnome
55358c73
JB
171GNOME support package for XULRunner. It integrates GConf, GIO,
172libnotify%{?with_gnomeui: and GNOME UI}.
d9800582
JB
173
174%description gnome -l pl.UTF-8
55358c73
JB
175Pakiet wspierający integrację XULRunnera z GNOME. Obejmuje komponenty
176GConf, GIO, libnotify%{?with_gnomeui: oraz GNOME UI}.
d9800582 177
59d7d753 178%prep
63cf8994 179%setup -qc
ba7810d3 180mv -f mozilla-release mozilla
63cf8994 181cd mozilla
1a944dfc 182
8cc47e8c 183# avoid using included headers (-I. is before HUNSPELL_CFLAGS)
1921a3c6 184%{__rm} extensions/spellcheck/hunspell/src/{*.hxx,hunspell.h}
8cc47e8c
JB
185# hunspell needed for factory including mozHunspell.h
186echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Makefile.in
59d7d753 187
a35780a1 188%patch0 -p2
59d7d753 189%patch1 -p1
73729f74 190%patch4 -p2
28a1a68d 191%patch5 -p1
d49ef936 192%patch6 -p1
e4a6ec27 193%patch7 -p2
eff58148 194#patch9 -p2
6dfe316f 195%patch11 -p2
c48ca27f 196%patch12 -p2
59d7d753 197
eaf8148b
AM
198# config/rules.mk is patched by us and js/src/config/rules.mk
199# is supposed to be exact copy
200cp -a config/rules.mk js/src/config/rules.mk
201
59d7d753 202%build
8ad211d5 203if [ "$(grep -E '^[0-9]+\.' mozilla/config/milestone.txt)" != "%{version}" ]; then
6085b284 204 echo >&2
c1c6745d 205 echo >&2 "Version %{version} does not match mozilla/config/milestone.txt!"
6085b284
AM
206 echo >&2
207 exit 1
208fi
209
63cf8994 210cd mozilla
c1c6745d 211cp -p %{_datadir}/automake/config.* build/autoconf
8ced18f2 212
ffa2e5ba
ER
213cat << 'EOF' > .mozconfig
214. $topsrcdir/xulrunner/config/mozconfig
215
2699fb15
ER
216mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
217
ffa2e5ba 218# Options for 'configure' (same as command-line options).
53e10376
KK
219ac_add_options --build=%{_target_platform}
220ac_add_options --host=%{_target_platform}
ffa2e5ba
ER
221ac_add_options --prefix=%{_prefix}
222ac_add_options --exec-prefix=%{_exec_prefix}
223ac_add_options --bindir=%{_bindir}
224ac_add_options --sbindir=%{_sbindir}
225ac_add_options --sysconfdir=%{_sysconfdir}
226ac_add_options --datadir=%{_datadir}
227ac_add_options --includedir=%{_includedir}
228ac_add_options --libdir=%{_libdir}
229ac_add_options --libexecdir=%{_libexecdir}
230ac_add_options --localstatedir=%{_localstatedir}
231ac_add_options --sharedstatedir=%{_sharedstatedir}
232ac_add_options --mandir=%{_mandir}
233ac_add_options --infodir=%{_infodir}
234%if %{?debug:1}0
235ac_add_options --disable-optimize
236ac_add_options --enable-debug
237ac_add_options --enable-debug-modules
238ac_add_options --enable-debugger-info-modules
239ac_add_options --enable-crash-on-assert
240%else
241ac_add_options --disable-debug
2699fb15 242ac_add_options --disable-debug-modules
ffa2e5ba 243ac_add_options --disable-logging
7cac8f5c 244ac_add_options --enable-optimize="%{rpmcflags} -Os"
ffa2e5ba 245%endif
e536c6f6
ER
246ac_add_options --disable-strip
247ac_add_options --disable-strip-libs
ffa2e5ba
ER
248%if %{with tests}
249ac_add_options --enable-tests
250%else
251ac_add_options --disable-tests
252%endif
2699fb15 253%if %{with gnomeui}
ffa2e5ba
ER
254ac_add_options --enable-gnomeui
255%else
ffa2e5ba
ER
256ac_add_options --disable-gnomeui
257%endif
2699fb15 258ac_add_options --disable-gnomevfs
2699fb15 259ac_add_options --disable-crashreporter
ffa2e5ba
ER
260ac_add_options --disable-installer
261ac_add_options --disable-javaxpcom
262ac_add_options --disable-updater
15bd24ae
ER
263%if %{with qt}
264ac_add_options --enable-default-toolkit=cairo-qt
265%else
ac1dcb1a 266ac_add_options --enable-default-toolkit=cairo-gtk2
15bd24ae 267%endif
752c2e6e 268ac_add_options --enable-gio
2699fb15
ER
269ac_add_options --enable-libxul
270ac_add_options --enable-pango
752c2e6e 271ac_add_options --enable-shared-js
2699fb15 272ac_add_options --enable-startup-notification
ffa2e5ba 273ac_add_options --enable-system-cairo
f4ce9014 274ac_add_options --enable-system-ffi
8cc47e8c 275ac_add_options --enable-system-hunspell
12fabe54 276ac_add_options --enable-system-sqlite
ffa2e5ba 277ac_add_options --with-distribution-id=org.pld-linux
2699fb15 278ac_add_options --with-pthreads
8cc47e8c 279ac_add_options --with-system-bz2
ffa2e5ba 280ac_add_options --with-system-jpeg
c63d951e
JB
281ac_add_options --with-system-libevent
282ac_add_options --with-system-libvpx
ffa2e5ba
ER
283ac_add_options --with-system-nspr
284ac_add_options --with-system-nss
285ac_add_options --with-system-png
286ac_add_options --with-system-zlib
287ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
ffa2e5ba
ER
288ac_add_options --disable-pedantic
289ac_add_options --disable-xterm-updates
02f18591 290ac_add_options --enable-extensions="default,cookie,permissions,spellcheck"
ffa2e5ba 291ac_add_options --with-x
ffa2e5ba
ER
292EOF
293
294%{__make} -j1 -f client.mk build \
295 CC="%{__cc}" \
296 CXX="%{__cxx}"
59d7d753 297
298%install
299rm -rf $RPM_BUILD_ROOT
63cf8994
ER
300cd mozilla
301
c48ca27f
JR
302# work around broken build system
303touch obj-%{_target_cpu}/dist/sdk/empty.pyc
304
2699fb15 305%{__make} -C obj-%{_target_cpu}/xulrunner/installer install \
63cf8994 306 DESTDIR=$RPM_BUILD_ROOT \
63cf8994 307 MOZ_PKG_APPDIR=%{_libdir}/%{name} \
d49ef936 308 INSTALL_SDK=1 \
63cf8994
ER
309 PKG_SKIP_STRIP=1
310
c48ca27f
JR
311# fix for halfway done xulrunner-bin -> xulrunner rename
312ln -sf %{_libdir}/%{name}/xulrunner $RPM_BUILD_ROOT%{_bindir}/xulrunner
313
59d7d753 314install -d \
d49ef936 315 $RPM_BUILD_ROOT%{_datadir}/%{name}/components \
316 $RPM_BUILD_ROOT%{_sbindir}
63cf8994
ER
317
318# move arch independant ones to datadir
319mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
63cf8994 320ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
c1c6745d 321%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
ac1dcb1a 322ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
63cf8994
ER
323
324# files created by regxpcom
325touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
326touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
59d7d753 327
2699fb15 328%{__make} -C obj-%{_target_cpu}/build/unix install \
ffa2e5ba 329 DESTDIR=$RPM_BUILD_ROOT
63cf8994 330
bf098deb
JR
331# Install xpcshell and run-mozilla.sh
332%{__cp} -pL obj-%{_target_cpu}/dist/bin/xpcshell $RPM_BUILD_ROOT/%{_libdir}/%{name}
333%{__cp} -pL obj-%{_target_cpu}/dist/bin/run-mozilla.sh $RPM_BUILD_ROOT/%{_libdir}/%{name}
334
ea094ca2 335%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
336
d7681dda 337# remove unecessary stuff
1921a3c6 338%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/LICENSE
1921a3c6 339%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
59d7d753 340
59d7d753 341%clean
342rm -rf $RPM_BUILD_ROOT
343
8ced18f2 344%post
ea094ca2 345%update_browser_plugins
59d7d753 346
347%postun
ea094ca2 348if [ "$1" = 0 ]; then
349 %update_browser_plugins
350fi
59d7d753 351
352%post libs -p /sbin/ldconfig
353%postun libs -p /sbin/ldconfig
354
355%files
356%defattr(644,root,root,755)
357%attr(755,root,root) %{_bindir}/xulrunner
c48ca27f 358%attr(755,root,root) %{_libdir}/%{name}/xulrunner
59d7d753 359
ac1dcb1a 360# symlinks
361%{_libdir}/%{name}/chrome
ac1dcb1a 362%{_libdir}/%{name}/dictionaries
63cf8994 363
ea094ca2 364%{_browserpluginsconfdir}/browsers.d/%{name}.*
365%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
366
ac1dcb1a 367%dir %{_libdir}/%{name}/plugins
368%dir %{_libdir}/%{name}/components
369
752c2e6e 370%{_libdir}/%{name}/chrome.manifest
8d659f0c 371%{_libdir}/%{name}/omni.ja
ac1dcb1a 372
ac1dcb1a 373%attr(755,root,root) %{_libdir}/%{name}/*.sh
374%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
b6bba2ac 375%attr(755,root,root) %{_libdir}/%{name}/plugin-container
ac1dcb1a 376
ac1dcb1a 377%attr(755,root,root) %{_libdir}/%{name}/components/libdbusservice.so
c1c6745d 378%{_libdir}/%{name}/components/binary.manifest
59d7d753 379
ffa2e5ba 380# do not use *.dat here, so check-files can catch any new files
59d7d753 381# (and they won't be just silently placed empty in rpm)
63cf8994
ER
382%ghost %{_libdir}/%{name}/components/compreg.dat
383%ghost %{_libdir}/%{name}/components/xpti.dat
59d7d753 384
ac1dcb1a 385%dir %{_datadir}/%{name}
386%{_datadir}/%{name}/chrome
59d7d753 387
388%files libs
389%defattr(644,root,root,755)
63cf8994 390%dir %{_libdir}/%{name}
a917d656 391%{_libdir}/%{name}/platform.ini
752c2e6e 392%attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so
63cf8994 393%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so
63cf8994
ER
394%attr(755,root,root) %{_libdir}/%{name}/libxpcom.so
395%attr(755,root,root) %{_libdir}/%{name}/libxul.so
59d7d753 396
397%files devel
398%defattr(644,root,root,755)
0d59d109 399%attr(755,root,root) %{_libdir}/%{name}/xpcshell
53d183e6 400%attr(755,root,root) %{_libdir}/%{name}/xulrunner-stub
05eaa9ee 401%{_includedir}/%{name}
762eba4b 402%{_datadir}/idl/%{name}
59c58e02
JR
403%dir %{_libdir}/%{name}-devel
404%{_libdir}/%{name}-devel/bin
405%{_libdir}/%{name}-devel/idl
406%{_libdir}/%{name}-devel/lib
407%{_libdir}/%{name}-devel/include
408%{_libdir}/%{name}-devel/*.h
409%dir %{_libdir}/%{name}-devel/sdk
410%{_libdir}/%{name}-devel/sdk/lib
411%dir %{_libdir}/%{name}-devel/sdk/bin
412%attr(755,root,root) %{_libdir}/%{name}-devel/sdk/bin/*
d9800582
JB
413%{_pkgconfigdir}/libxul.pc
414%{_pkgconfigdir}/libxul-embedding.pc
d9800582
JB
415%{_pkgconfigdir}/mozilla-js.pc
416%{_pkgconfigdir}/mozilla-plugin.pc
417%{_pkgconfigdir}/mozilla-gtkmozembed.pc
418%{_pkgconfigdir}/mozilla-gtkmozembed-embedding.pc
419
55358c73 420%if %{without qt}
d9800582
JB
421%files gnome
422%defattr(644,root,root,755)
423%attr(755,root,root) %{_libdir}/%{name}/components/libmozgnome.so
2699fb15 424%endif
This page took 0.200044 seconds and 4 git commands to generate.