/[packages]/cauldron/xulrunner/current/SPECS/xulrunner.spec
ViewVC logotype

Contents of /cauldron/xulrunner/current/SPECS/xulrunner.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18113 - (show annotations) (download)
Fri Jan 14 23:22:39 2011 UTC (13 years, 3 months ago) by dmorgan
File size: 14528 byte(s)
imported package xulrunner
1 #
2 # WARNING, READ FIRST:
3 #
4 # This is a special package that needs special treatment. Due to the amount of
5 # security updates it needs, it's common to ship new upstream versions instead of patching.
6 # That means this package MUST be BUILDABLE for stable official releases.
7 # This also means only STABLE upstream releases, NO betas.
8 # This is a discussed topic. Please, do not flame it again.
9
10 # required for, at least, 2009.0
11 %if %mdkversion < 200910
12 # (tpg) nss libraries are not conventinaly named(mozilla still sux),
13 # thanks to this auto dependencies are wongly generated for devel libraries
14 # blacklisting all nss libraries should solve this
15 %define _requires_exceptions libnss3\\|libnssutil3\\|libsmime3\\|libssl3\\|libnspr4\\|libplc4\\|libplds4
16 %endif
17
18 # (tpg) DO NOT FORGET TO SET EXACT XULRUNNER and FIREFOX VERSIONS !
19 %define ffver 4.0
20 %define version_internal 2.0
21
22 %define prel b8
23
24 # (tpg) define release here
25 %if %mandriva_branch == Cooker
26 # Cooker
27 %define release %mkrel -c %prel 3
28 %else
29 # Old distros
30 %define subrel 1
31 %define release %mkrel 0
32 %endif
33
34 # (tpg) DO NOT FORGET TO SET EXACT MAJOR!
35 # in this case %{major} == %{version_internal}
36 %define major %{version_internal}
37 %define libname %mklibname %{name} %{major}
38 %define develname %mklibname %{name} -d
39 %define develunstname %mklibname %{name}-unstable -d
40 %define sname firefox
41
42 # (tpg) various directory defines
43 %define mozappdir %{_libdir}/%{name}-%{version_internal}
44
45 # (salem) ugly but avoids hardcoding package versions (#42745)
46 # TODO: needs a better solution. (%__isa macro)?
47 %define hunspellver %(rpm -q --whatprovides libhunspell --queryformat %{NAME})
48 %define nss_libname %mklibname nss 3
49 %define nspr_libname %mklibname nspr 4
50
51 # this seems fragile, so require the exact version or later (#58754)
52 %define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0)
53 %define nss_version %(pkg-config --modversion nss &>/dev/null && pkg-config --modversion nss 2>/dev/null || echo 0)
54
55 # mdv2009.0 introduced a system wide libhunspell
56 %if %mdkversion >= 200900
57 %define _use_syshunspell 1
58 %else
59 %define _use_syshunspell 0
60 %endif
61
62 Summary: XUL Runtime for Gecko Applications
63 Name: xulrunner
64 Version: %{version_internal}
65 Release: %{release}
66 License: MPLv1.1 or GPLv2+ or LGPLv2+
67 Group: Development/Other
68 Url: http://developer.mozilla.org/en/docs/XULRunner
69 Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{sname}/releases/%{ffver}/source/%{sname}-%{ffver}%prel.source.tar.bz2
70 Source1: %{SOURCE0}.asc
71 Patch1: xulrunner-1.9.1-max-path-len.patch
72 Patch5: mozilla-nongnome-proxies.patch
73 Patch7: %{name}-1.9.1-pluginsdir2.patch
74 # Fedora patches:
75 # use 1.9 as xulrunner version in the dirname and not the complete version string
76 Patch8: xulrunner-1.9.0.1-version.patch
77 Patch9: xulrunner-ipc-stl.patch
78 Patch10: xulrunner-1.9.2-pkgconfig.patch
79 # (salem) this patch does not work properly on ff3
80 #Patch11: xulrunner-1.9.0.1-theme-selection.patch
81 Patch12: xulrunner-1.9.0.5-fix-string-format.patch
82 Patch14: xulrunner-1.9.1-jemalloc.patch
83 Patch15: xulrunner-1.9.1-gtk2.patch
84 Patch16: xulrunner-1.9.1-java-make-j1.patch
85 Patch17: xulrunner-1.9.2-public-opearator-delete.patch
86 Patch19: xulrunner-1.9.2-fix-plugins-cflags.patch
87 Patch20: xulrunner-1.9.2-helper-app.patch
88 Patch21: xulrunner-1.9.2-kde-integration.patch
89 Patch25: xulrunner-1.9.2-realpath.patch
90 Patch26: mozilla-1.9.2-gtk2.diff
91 Patch27: xulrunner-2.0b4-missing-linking-libraries.patch
92 BuildRequires: zlib-devel
93 BuildRequires: bzip2-devel
94 #(tpg) older versions doesn't support apng extension
95 %if %mdkversion >= 200900
96 BuildRequires: libpng-devel >= 1.2.25-2
97 %endif
98 %if %_use_syshunspell
99 BuildRequires: libhunspell-devel
100 %endif
101 BuildRequires: libIDL2-devel
102 BuildRequires: gtk+2-devel
103 BuildRequires: startup-notification-devel
104 BuildRequires: dbus-glib-devel
105 %if %mdkversion >= 200800
106 # (tpg) older releases does not have SQLITE_ENABLE_UNLOCK_NOTIFY enabled
107 BuildRequires: libsqlite3-devel >= 3.7.0.1-2
108 %endif
109 BuildRequires: libgnome-vfs2-devel
110 BuildRequires: libgnome2-devel
111 BuildRequires: libgnomeui2-devel
112 %if %mdkversion >= 200900
113 BuildRequires: java-rpmbuild
114 %endif
115 %if %mdkversion < 200900
116 BuildRequires: java-1.5.0-devel
117 %endif
118 BuildRequires: zip
119 BuildRequires: doxygen
120 BuildRequires: makedepend
121 BuildRequires: valgrind
122 BuildRequires: rootcerts
123 BuildRequires: python
124 BuildRequires: python-devel
125 BuildRequires: nspr-devel >= 2:4.8.7
126 BuildRequires: nss-static-devel >= 2:3.12.7
127 BuildRequires: pango-devel
128 BuildRequires: libalsa-devel
129 BuildRequires: libnotify-devel
130 BuildRequires: mesagl-devel
131 %if %mdkversion >= 201000
132 BuildRequires: cairo-devel >= 1.8.8
133 %endif
134 BuildRequires: yasm
135 BuildRequires: libproxy-devel
136 Requires: %{libname} = %{version}-%{release}
137 Conflicts: xulrunner < %{version}
138 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
139
140 %description
141 XULRunner is a Mozilla runtime package that can be used to
142 bootstrap XUL+XPCOM applications that are as rich as Firefox
143 and Thunderbird. It will provide mechanisms for installing,
144 upgrading, and uninstalling these applications. XULRunner will
145 also provide libxul, a solution which allows the embedding of
146 Mozilla technologies in other projects and products.
147
148 %package -n %{libname}
149 Summary: Dynamic libraries for %{name}
150 Group: System/Libraries
151 Requires: %{libname} = %{version}-%{release}
152 Conflicts: xulrunner < %{version}
153 Obsoletes: %{mklibname xulrunner 1.9.2} < %{version}-%{release}
154 Requires: rootcerts
155 # (tpg) manually pull dependancies on libnss3 and libnspr4, why ? see above
156 Requires: %{nss_libname} >= 2:%{nss_version}
157 Requires: %{nspr_libname} >= 2:4.8.7
158 %if %_use_syshunspell
159 # (salem) fixes #42745
160 Requires: %{hunspellver}
161 %endif
162 # (salem) bug #42680 for noarch packages
163 Provides: libxulrunner = %{version}-%{release}
164 %if %mdkversion >= 200800
165 Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version}
166 %endif
167
168 %description -n %{libname}
169 Dynamic libraries for %{name}.
170
171 %package -n %{develname}
172 Summary: Development files for %{name}
173 Group: Development/Other
174 Requires: %{name} = %{version}-%{release}
175 Obsoletes: xulrunner-devel < 1.9.2
176 Obsoletes: %{mklibname mozilla-firefox -d} < 0:3
177 Obsoletes: %{mklibname %{name}-unstable -d}
178 Provides: %{name}-devel = %{version}-%{release}
179 # (tpg) see above why
180 Requires: nss-devel
181 Requires: libalsa-devel
182
183 %description -n %{develname}
184 Development files and headers for %{name}.
185
186 %prep
187 %setup -qn mozilla-central
188 #%patch1 -p1 -b .pathlen rediff
189 %patch5 -p0 -b .proxy
190 %patch7 -p1 -b .plugins
191 %patch8 -p1 -b .version
192
193 %if %mdkversion < 200900
194 # patch by redhat
195 %patch9 -p1 -b .ipc-stl
196 %endif
197
198 #%patch10 -p1 -b .pkgconfig rediff
199 #%patch12 -p0 -b .strformat rediff
200 #%patch14 -p1 -b .jemalloc rediff
201 #%patch15 -p1 -b .gtk2
202 %patch16 -p1 -b .java_make-j1
203 %patch17 -p1
204 #%patch19 -p1 rediff
205 #%patch20 -p1 rediff
206 #%patch21 -p1 -b .kde-integration rediff?
207 %patch25 -p1
208
209 %if %mdkversion < 200900
210 # patch by fcrozat
211 %patch26 -p0
212 %endif
213
214 %patch27 -p0
215
216 # needed to regenerate certdata.c
217 pushd security/nss/lib/ckfw/builtins
218 perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt
219 popd
220
221 #(tpg) correct the xulrunner version
222 sed -i -e 's#INTERNAL_VERSION#%{version_internal}#g' xulrunner/installer/Makefile.in
223
224 %build
225 %serverbuild
226 export PREFIX="%{_prefix}"
227 export LIBDIR="%{_libdir}"
228 export CFLAGS="$(echo %{optflags} | sed -e 's/-Wall//')"
229 export CXXFLAGS="$CFLAGS"
230 %if %mdkversion >= 200900
231 export LDFLAGS="%ldflags -Wl,-rpath,%{mozappdir}"
232 %else
233 # macro ldflags is nonexisting in older distro versions
234 export LDFLAGS="$LDFLAGS -Wl,-rpath,%{mozappdir}"
235 %endif
236
237 # (tpg) don't use macro here
238 # (fhimpe) Starting from Firefox 3.0.1, at least sqlite 3.5.9 is needed
239 # so don't use system sqlite on Mandriva older than 2009.0
240 ./configure --build=%{_target_platform} \
241 --host=%_host --target=%_target_platform \
242 --prefix=%{_prefix} \
243 --bindir=%{_bindir} \
244 --libdir=%{_libdir} \
245 --includedir=%{_includedir} \
246 --datadir=%{_datadir} \
247 --sysconfdir=%{_sysconfdir} \
248 --enable-application=xulrunner \
249 --with-pthreads \
250 --with-system-jpeg \
251 --with-system-zlib \
252 --with-system-bz2 \
253 %if %mdkversion >= 200900
254 --enable-system-png \
255 %else
256 --disable-system-png \
257 %endif
258 --with-system-nspr \
259 --without-system-nss \
260 %if %mdkversion >= 200800
261 --enable-system-sqlite \
262 %else
263 --disable-system-sqlite \
264 %endif
265 %if %mdkversion >= 201000
266 --enable-system-cairo \
267 %else
268 --disable-system-cairo \
269 %endif
270 %if %_use_syshunspell
271 --enable-system-hunspell \
272 %endif
273 --disable-javaxpcom \
274 --enable-pango \
275 --enable-svg \
276 --enable-canvas \
277 --enable-crypto \
278 --disable-crashreporter \
279 --disable-installer \
280 --disable-updater \
281 --enable-optimize \
282 --enable-jemalloc \
283 --disable-wrap-malloc \
284 --enable-valgrind \
285 --disable-strip \
286 --enable-install-strip \
287 --enable-startup-notification \
288 --enable-default-toolkit=cairo-gtk2 \
289 --enable-shared-js \
290 --with-java-include-path=%{java_home}/include \
291 --with-java-bin-path=%{java_home}/bin \
292 --enable-image-encoder=all \
293 --enable-image-decoders=all \
294 --enable-places \
295 --enable-storage \
296 --enable-safe-browsing \
297 --enable-url-classifier \
298 --enable-gnomevfs \
299 --enable-gnomeui \
300 --disable-faststart \
301 --enable-smil \
302 --disable-tree-freetype \
303 --enable-canvas3d \
304 --disable-coretext \
305 --enable-extensions=default \
306 --enable-necko-protocols=all \
307 --disable-necko-wifi \
308 --disable-tests \
309 --disable-mochitest \
310 --enable-xtf \
311 --enable-wave \
312 --enable-webm \
313 --enable-ogg \
314 --enable-xpcom-fastload \
315 --enable-gio \
316 --enable-dbus \
317 --enable-libproxy \
318 --with-distribution-id=com.mandriva
319
320 %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl
321
322 # (tpg) on x86_64 fails when parallel compiling is on
323 # java.lang.OutOfMemoryError
324 # since 3.6 it does not
325 %make
326
327 %install
328 rm -rf %{buildroot}
329
330 %makeinstall_std
331
332 #install -p dist/sdk/bin/regxpcom %{buildroot}%{mozappdir}
333
334 rm -rf %{buildroot}%{_libdir}/%{name}-devel-%{version_internal}/sdk/lib/*.so
335 pushd %{buildroot}%{mozappdir}
336 for i in *.so; do
337 ln -s %{mozappdir}/$i %{buildroot}%{_libdir}/%{name}-devel-%{version_internal}/sdk/lib/$i
338 done
339 popd
340
341 # GRE stuff
342 %ifarch x86_64 ia64 ppc64 s390x
343 %define gre_conf_file %{version_internal}-64.system.conf
344 mv %{buildroot}%{_sysconfdir}/gre.d/*.system.conf %{buildroot}%{_sysconfdir}/gre.d/%{gre_conf_file}
345 %else
346 %define gre_conf_file %{version_internal}.system.conf
347 %endif
348
349 # Don't install these in appdir
350 rm %{buildroot}%{mozappdir}/LICENSE
351 rm %{buildroot}%{mozappdir}/README.txt
352
353 # when not building with system nspr:
354 #rm -f %{buildroot}%_libdir/xulrunner-2.0/nspr-config
355
356 %if %_use_syshunspell
357 # Use the system hunspell dictionaries
358 rm -rf %{buildroot}%{mozappdir}/dictionaries
359 ln -s %{_datadir}/dict/mozilla %{buildroot}%{mozappdir}/dictionaries
360 %endif
361
362 # ghost files
363 mkdir -p %{buildroot}%{mozappdir}/components
364 touch %{buildroot}%{mozappdir}/components/compreg.dat
365 touch %{buildroot}%{mozappdir}/components/xpti.dat
366
367 # set up our default preferences
368 cat << EOF > %{buildroot}%{mozappdir}/defaults/pref/vendor.js
369 pref("general.useragent.vendor", "%{distribution}");
370 pref("general.useragent.vendorSub", "%{version}-%{release}");
371 pref("general.useragent.vendorComment", "%{mandriva_release}");
372 pref("general.smoothScroll", true);
373 pref("mousewheel.horizscroll.withnokey.action", 0);
374 pref("mousewheel.horizscroll.withnokey.numlines", 3);
375 pref("mousewheel.horizscroll.withnokey.sysnumlines", false);
376 pref("mousewheel.withnokey.action", 0);
377 pref("mousewheel.withnokey.numlines", 7);
378 pref("mousewheel.withnokey.sysnumlines", false);
379 pref("network.protocol-handler.app.mailto", "/usr/bin/xdg-email");
380 pref("network.protocol-handler.app.mms", "/usr/bin/xdg-open");
381 pref("network.http.pipelining", true);
382 pref("network.http.proxy.pipelining", true);
383 pref("network.http.pipelining.maxrequests", 8);
384 pref("browser.display.use_system_colors", true);
385 pref("browser.tabs.loadDivertedInBackground", true);
386 pref("browser.startup.homepage_override.mstone", "ignore");
387 pref("browser.backspace_action", 2);
388 pref("browser.tabs.loadFolderAndReplace", false);
389 pref("browser.EULA.override", true);
390 pref("browser.safebrowsing.enabled", true);
391 pref("browser.shell.checkDefaultBrowser", false);
392 pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html");
393 pref("browser.ctrlTab.previews", true);
394 pref("browser.tabs.insertRelatedAfterCurrent", false);
395 pref("print.print_edge_top", 14); // 1/100 of an inch
396 pref("print.print_edge_left", 16); // 1/100 of an inch
397 pref("print.print_edge_right", 16); // 1/100 of an inch
398 pref("print.print_edge_bottom", 14); // 1/100 of an inch
399 pref("app.update.enabled", false);
400 pref("app.update.auto", false);
401 pref("app.update.autoInstallEnabled", false);
402 pref("intl.locale.matchOS", true);
403 pref("toolkit.storage.synchronous", 0);
404 pref("layout.css.visited_links_enabled", false);
405 pref("security.ssl.require_safe_negotiation", false);
406 EOF
407
408 %find_lang %{name}
409
410 mkdir -p %{buildroot}%{_sys_macros_dir}
411 cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros
412 # Macros from %{name} package
413 %%xulrunner_major %{major}
414 %%xulrunner_version %{version}
415 %%xulrunner_libname %{libname}
416 %%xulrunner_mozappdir %{mozappdir}
417 FIN
418
419 %clean
420 rm -rf %{buildroot}
421
422 %files
423 %defattr(-,root,root)
424 %doc LICENSE README.txt
425 %dir %{mozappdir}
426 %{_bindir}/xulrunner
427
428 %files -n %{libname}
429 %defattr(-,root,root)
430 %dir %{mozappdir}
431 %{mozappdir}/chrome
432 %{mozappdir}/dictionaries
433 %dir %{mozappdir}/components
434 %ghost %{mozappdir}/components/compreg.dat
435 %ghost %{mozappdir}/components/xpti.dat
436 %{mozappdir}/components/*.so
437 %{mozappdir}/components/*.xpt
438 %{mozappdir}/components/*.manifest
439 %{mozappdir}/*.manifest
440 %attr(644, root, root) %{mozappdir}/components/*.js
441 %{mozappdir}/defaults
442 #%{mozappdir}/greprefs
443 %dir %{mozappdir}/icons
444 %attr(644, root, root) %{mozappdir}/icons/*
445 %{mozappdir}/modules
446 %{mozappdir}/plugins
447 %{mozappdir}/res
448 %{mozappdir}/*.so
449 %{mozappdir}/mozilla-xremote-client
450 %{mozappdir}/run-mozilla.sh
451 #%{mozappdir}/regxpcom
452 %{mozappdir}/greprefs.js
453 %{mozappdir}/*.chk
454 %{mozappdir}/xulrunner
455 %{mozappdir}/xulrunner-bin
456 %{mozappdir}/xulrunner-stub
457 %{mozappdir}/platform.ini
458 %{mozappdir}/dependentlibs.list
459 #%{mozappdir}/javaxpcom.jar
460 %{mozappdir}/plugin-container
461 %dir %{_sysconfdir}/gre.d
462 %{_sysconfdir}/gre.d/*.conf
463
464 %files -n %{develname}
465 %defattr(-,root,root)
466 %{_includedir}/%{name}-%{version_internal}
467 %{mozappdir}/xpcshell
468 %{mozappdir}/xpidl
469 %{mozappdir}/xpt_dump
470 %{mozappdir}/xpt_link
471 %{_libdir}/%{name}-devel-%{version_internal}
472 %{_libdir}/pkgconfig/*.pc
473 %{_datadir}/idl/%{name}-%{version_internal}
474 %{_sys_macros_dir}/%{name}.macros
475
476

  ViewVC Help
Powered by ViewVC 1.1.30