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

  ViewVC Help
Powered by ViewVC 1.1.30