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