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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 43416 - (hide annotations) (download)
Sat Jan 29 12:58:46 2011 UTC (13 years, 2 months ago) by dmorgan
File size: 13268 byte(s)
Merge mdv commit 633197
1 dmorgan 18113 #
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 erwan 42315 %define prel b10
15 dmorgan 18113
16     # (tpg) define release here
17 dmorgan 18121 #if %mageia_branch == Cauldron
18     # Cauldron
19 dmorgan 18113 %define release %mkrel -c %prel 3
20 dmorgan 18121 #else
21 dmorgan 18113 # Old distros
22 dmorgan 18121 #define subrel 1
23     #define release %mkrel 0
24     #endif
25 dmorgan 18113
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 dmorgan 43415 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 dmorgan 18113 BuildRequires: zlib-devel
82     BuildRequires: bzip2-devel
83     BuildRequires: libpng-devel >= 1.2.25-2
84     %if %_use_syshunspell
85     BuildRequires: libhunspell-devel
86     %endif
87     BuildRequires: libIDL2-devel
88     BuildRequires: gtk+2-devel
89 dmorgan 43415 BuildRequires: libxt-devel
90     BuildRequires: libevent-devel
91 dmorgan 18113 BuildRequires: startup-notification-devel
92     BuildRequires: dbus-glib-devel
93 dmorgan 43415 BuildRequires: libsqlite3-devel >= 3.7.4
94     BuildRequires: autoconf2.1
95 dmorgan 18113 BuildRequires: libgnome-vfs2-devel
96     BuildRequires: libgnome2-devel
97     BuildRequires: libgnomeui2-devel
98     BuildRequires: java-rpmbuild
99     BuildRequires: java-1.5.0-devel
100     BuildRequires: zip
101     BuildRequires: doxygen
102     BuildRequires: makedepend
103     BuildRequires: valgrind
104     BuildRequires: rootcerts
105     BuildRequires: python
106     BuildRequires: nspr-devel >= 2:4.8.7
107 dmorgan 43416 BuildRequires: nss-static-devel >= 2:3.12.9
108 dmorgan 18113 BuildRequires: pango-devel
109     BuildRequires: libalsa-devel
110     BuildRequires: libnotify-devel
111     BuildRequires: mesagl-devel
112     BuildRequires: cairo-devel >= 1.8.8
113     BuildRequires: yasm
114     BuildRequires: libproxy-devel
115     Requires: %{libname} = %{version}-%{release}
116     Conflicts: xulrunner < %{version}
117     BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
118    
119     %description
120     XULRunner is a Mozilla runtime package that can be used to
121     bootstrap XUL+XPCOM applications that are as rich as Firefox
122     and Thunderbird. It will provide mechanisms for installing,
123     upgrading, and uninstalling these applications. XULRunner will
124     also provide libxul, a solution which allows the embedding of
125     Mozilla technologies in other projects and products.
126    
127     %package -n %{libname}
128     Summary: Dynamic libraries for %{name}
129     Group: System/Libraries
130     Requires: %{libname} = %{version}-%{release}
131     Conflicts: xulrunner < %{version}
132     Obsoletes: %{mklibname xulrunner 1.9.2} < %{version}-%{release}
133     Requires: rootcerts
134     # (tpg) manually pull dependancies on libnss3 and libnspr4, why ? see above
135     Requires: %{nss_libname} >= 2:%{nss_version}
136     Requires: %{nspr_libname} >= 2:4.8.7
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 dmorgan 43415 %patch28 -p1
179     %patch29 -p1
180     %patch30 -p1
181 dmorgan 18113
182 dmorgan 43415 autoconf-2.13
183    
184 dmorgan 18113 # needed to regenerate certdata.c
185     pushd security/nss/lib/ckfw/builtins
186     perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt
187     popd
188    
189     #(tpg) correct the xulrunner version
190     sed -i -e 's#INTERNAL_VERSION#%{version_internal}#g' xulrunner/installer/Makefile.in
191    
192     %build
193     %serverbuild
194     export PREFIX="%{_prefix}"
195     export LIBDIR="%{_libdir}"
196     export CFLAGS="$(echo %{optflags} | sed -e 's/-Wall//')"
197     export CXXFLAGS="$CFLAGS"
198     export LDFLAGS="%ldflags -Wl,-rpath,%{mozappdir}"
199    
200     # (tpg) don't use macro here
201 dmorgan 43415 # (fhimpe) Starting from Firefox 4.0b10, at least sqlite 3.6.4 is needed
202 dmorgan 18113 ./configure --build=%{_target_platform} \
203     --host=%_host --target=%_target_platform \
204     --prefix=%{_prefix} \
205     --bindir=%{_bindir} \
206     --libdir=%{_libdir} \
207     --includedir=%{_includedir} \
208     --datadir=%{_datadir} \
209     --sysconfdir=%{_sysconfdir} \
210     --enable-application=xulrunner \
211     --with-pthreads \
212     --with-system-jpeg \
213     --with-system-zlib \
214     --with-system-bz2 \
215 dmorgan 43415 --with-system-libevent \
216 dmorgan 18113 --enable-system-png \
217     --with-system-nspr \
218 dmorgan 43415 --with-system-nss \
219 dmorgan 18113 --enable-system-sqlite \
220     --enable-system-cairo \
221     %if %_use_syshunspell
222     --enable-system-hunspell \
223     %endif
224     --disable-javaxpcom \
225     --enable-pango \
226     --enable-svg \
227     --enable-canvas \
228     --enable-crypto \
229     --disable-crashreporter \
230     --disable-installer \
231     --disable-updater \
232     --enable-optimize \
233     --enable-jemalloc \
234     --disable-wrap-malloc \
235     --enable-valgrind \
236     --disable-strip \
237     --enable-install-strip \
238     --enable-startup-notification \
239     --enable-default-toolkit=cairo-gtk2 \
240     --enable-shared-js \
241     --with-java-include-path=%{java_home}/include \
242     --with-java-bin-path=%{java_home}/bin \
243     --enable-image-encoder=all \
244     --enable-image-decoders=all \
245     --enable-places \
246     --enable-storage \
247     --enable-safe-browsing \
248     --enable-url-classifier \
249     --enable-gnomevfs \
250     --enable-gnomeui \
251     --disable-faststart \
252     --enable-smil \
253     --disable-tree-freetype \
254     --enable-canvas3d \
255     --disable-coretext \
256     --enable-extensions=default \
257     --enable-necko-protocols=all \
258     --disable-necko-wifi \
259     --disable-tests \
260     --disable-mochitest \
261     --enable-xtf \
262     --enable-wave \
263     --enable-webm \
264     --enable-ogg \
265     --enable-xpcom-fastload \
266     --enable-gio \
267     --enable-dbus \
268     --enable-libproxy \
269 dmorgan 43415 --enable-chrome-format=jar \
270 blino 20086 --with-distribution-id=org.%{_vendor}
271 dmorgan 18113
272     %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl
273    
274     # (tpg) on x86_64 fails when parallel compiling is on
275     # java.lang.OutOfMemoryError
276     # since 3.6 it does not
277     %make
278    
279     %install
280     rm -rf %{buildroot}
281    
282     %makeinstall_std
283    
284     #install -p dist/sdk/bin/regxpcom %{buildroot}%{mozappdir}
285    
286     rm -rf %{buildroot}%{_libdir}/%{name}-devel-%{version_internal}/sdk/lib/*.so
287     pushd %{buildroot}%{mozappdir}
288     for i in *.so; do
289     ln -s %{mozappdir}/$i %{buildroot}%{_libdir}/%{name}-devel-%{version_internal}/sdk/lib/$i
290     done
291     popd
292    
293     # GRE stuff
294     %ifarch x86_64 ia64 ppc64 s390x
295     %define gre_conf_file %{version_internal}-64.system.conf
296     mv %{buildroot}%{_sysconfdir}/gre.d/*.system.conf %{buildroot}%{_sysconfdir}/gre.d/%{gre_conf_file}
297     %else
298     %define gre_conf_file %{version_internal}.system.conf
299     %endif
300    
301     # Don't install these in appdir
302     rm %{buildroot}%{mozappdir}/LICENSE
303     rm %{buildroot}%{mozappdir}/README.txt
304    
305     # when not building with system nspr:
306     #rm -f %{buildroot}%_libdir/xulrunner-2.0/nspr-config
307    
308     %if %_use_syshunspell
309     # Use the system hunspell dictionaries
310     rm -rf %{buildroot}%{mozappdir}/dictionaries
311     ln -s %{_datadir}/dict/mozilla %{buildroot}%{mozappdir}/dictionaries
312     %endif
313    
314     # ghost files
315     mkdir -p %{buildroot}%{mozappdir}/components
316     touch %{buildroot}%{mozappdir}/components/compreg.dat
317     touch %{buildroot}%{mozappdir}/components/xpti.dat
318    
319     # set up our default preferences
320     cat << EOF > %{buildroot}%{mozappdir}/defaults/pref/vendor.js
321     pref("general.useragent.vendor", "%{distribution}");
322     pref("general.useragent.vendorSub", "%{version}-%{release}");
323 blino 20083 pref("general.useragent.vendorComment", "%{product_release}");
324 dmorgan 18113 pref("general.smoothScroll", true);
325     pref("mousewheel.horizscroll.withnokey.action", 0);
326     pref("mousewheel.horizscroll.withnokey.numlines", 3);
327     pref("mousewheel.horizscroll.withnokey.sysnumlines", false);
328     pref("mousewheel.withnokey.action", 0);
329     pref("mousewheel.withnokey.numlines", 7);
330     pref("mousewheel.withnokey.sysnumlines", false);
331     pref("network.protocol-handler.app.mailto", "/usr/bin/xdg-email");
332     pref("network.protocol-handler.app.mms", "/usr/bin/xdg-open");
333     pref("network.http.pipelining", true);
334     pref("network.http.proxy.pipelining", true);
335     pref("network.http.pipelining.maxrequests", 8);
336     pref("browser.display.use_system_colors", true);
337     pref("browser.tabs.loadDivertedInBackground", true);
338     pref("browser.startup.homepage_override.mstone", "ignore");
339     pref("browser.backspace_action", 2);
340     pref("browser.tabs.loadFolderAndReplace", false);
341     pref("browser.EULA.override", true);
342     pref("browser.safebrowsing.enabled", true);
343     pref("browser.shell.checkDefaultBrowser", false);
344     pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html");
345     pref("browser.ctrlTab.previews", true);
346     pref("browser.tabs.insertRelatedAfterCurrent", false);
347     pref("print.print_edge_top", 14); // 1/100 of an inch
348     pref("print.print_edge_left", 16); // 1/100 of an inch
349     pref("print.print_edge_right", 16); // 1/100 of an inch
350     pref("print.print_edge_bottom", 14); // 1/100 of an inch
351     pref("app.update.enabled", false);
352     pref("app.update.auto", false);
353     pref("app.update.autoInstallEnabled", false);
354     pref("intl.locale.matchOS", true);
355     pref("toolkit.storage.synchronous", 0);
356     pref("layout.css.visited_links_enabled", false);
357     pref("security.ssl.require_safe_negotiation", false);
358     EOF
359    
360     %find_lang %{name}
361    
362     mkdir -p %{buildroot}%{_sys_macros_dir}
363     cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros
364     # Macros from %{name} package
365     %%xulrunner_major %{major}
366     %%xulrunner_version %{version}
367     %%xulrunner_libname %{libname}
368     %%xulrunner_mozappdir %{mozappdir}
369     FIN
370    
371     %clean
372     rm -rf %{buildroot}
373    
374     %files
375     %defattr(-,root,root)
376     %doc LICENSE README.txt
377     %dir %{mozappdir}
378     %{_bindir}/xulrunner
379    
380     %files -n %{libname}
381     %defattr(-,root,root)
382     %dir %{mozappdir}
383     %{mozappdir}/chrome
384     %{mozappdir}/dictionaries
385     %dir %{mozappdir}/components
386     %ghost %{mozappdir}/components/compreg.dat
387     %ghost %{mozappdir}/components/xpti.dat
388     %{mozappdir}/components/*.so
389     %{mozappdir}/components/*.xpt
390     %{mozappdir}/components/*.manifest
391     %{mozappdir}/*.manifest
392     %attr(644, root, root) %{mozappdir}/components/*.js
393     %{mozappdir}/defaults
394     #%{mozappdir}/greprefs
395     %dir %{mozappdir}/icons
396     %attr(644, root, root) %{mozappdir}/icons/*
397     %{mozappdir}/modules
398     %{mozappdir}/plugins
399     %{mozappdir}/res
400     %{mozappdir}/*.so
401     %{mozappdir}/mozilla-xremote-client
402     %{mozappdir}/run-mozilla.sh
403     #%{mozappdir}/regxpcom
404     %{mozappdir}/greprefs.js
405 dmorgan 43415 #%{mozappdir}/*.chk
406 dmorgan 18113 %{mozappdir}/xulrunner
407     %{mozappdir}/xulrunner-bin
408     %{mozappdir}/xulrunner-stub
409     %{mozappdir}/platform.ini
410     %{mozappdir}/dependentlibs.list
411     #%{mozappdir}/javaxpcom.jar
412     %{mozappdir}/plugin-container
413     %dir %{_sysconfdir}/gre.d
414     %{_sysconfdir}/gre.d/*.conf
415    
416     %files -n %{develname}
417     %defattr(-,root,root)
418     %{_includedir}/%{name}-%{version_internal}
419     %{mozappdir}/xpcshell
420     %{mozappdir}/xpidl
421     %{mozappdir}/xpt_dump
422     %{mozappdir}/xpt_link
423     %{_libdir}/%{name}-devel-%{version_internal}
424     %{_libdir}/pkgconfig/*.pc
425     %{_datadir}/idl/%{name}-%{version_internal}
426     %{_sys_macros_dir}/%{name}.macros
427    
428    

  ViewVC Help
Powered by ViewVC 1.1.30