/[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 20081 - (show annotations) (download)
Sun Jan 16 12:03:35 2011 UTC (13 years, 3 months ago) by blino
File size: 13246 byte(s)
remove old version checks (for ldflags macro)

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

  ViewVC Help
Powered by ViewVC 1.1.30