/[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 20082 - (hide annotations) (download)
Sun Jan 16 12:07:56 2011 UTC (13 years, 3 months ago) by blino
File size: 13115 byte(s)
remove comment about old version

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     %define prel b8
15    
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     # (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     ./configure --build=%{_target_platform} \
197     --host=%_host --target=%_target_platform \
198     --prefix=%{_prefix} \
199     --bindir=%{_bindir} \
200     --libdir=%{_libdir} \
201     --includedir=%{_includedir} \
202     --datadir=%{_datadir} \
203     --sysconfdir=%{_sysconfdir} \
204     --enable-application=xulrunner \
205     --with-pthreads \
206     --with-system-jpeg \
207     --with-system-zlib \
208     --with-system-bz2 \
209     --enable-system-png \
210     --with-system-nspr \
211     --without-system-nss \
212     --enable-system-sqlite \
213     --enable-system-cairo \
214     %if %_use_syshunspell
215     --enable-system-hunspell \
216     %endif
217     --disable-javaxpcom \
218     --enable-pango \
219     --enable-svg \
220     --enable-canvas \
221     --enable-crypto \
222     --disable-crashreporter \
223     --disable-installer \
224     --disable-updater \
225     --enable-optimize \
226     --enable-jemalloc \
227     --disable-wrap-malloc \
228     --enable-valgrind \
229     --disable-strip \
230     --enable-install-strip \
231     --enable-startup-notification \
232     --enable-default-toolkit=cairo-gtk2 \
233     --enable-shared-js \
234     --with-java-include-path=%{java_home}/include \
235     --with-java-bin-path=%{java_home}/bin \
236     --enable-image-encoder=all \
237     --enable-image-decoders=all \
238     --enable-places \
239     --enable-storage \
240     --enable-safe-browsing \
241     --enable-url-classifier \
242     --enable-gnomevfs \
243     --enable-gnomeui \
244     --disable-faststart \
245     --enable-smil \
246     --disable-tree-freetype \
247     --enable-canvas3d \
248     --disable-coretext \
249     --enable-extensions=default \
250     --enable-necko-protocols=all \
251     --disable-necko-wifi \
252     --disable-tests \
253     --disable-mochitest \
254     --enable-xtf \
255     --enable-wave \
256     --enable-webm \
257     --enable-ogg \
258     --enable-xpcom-fastload \
259     --enable-gio \
260     --enable-dbus \
261     --enable-libproxy \
262     --with-distribution-id=com.mandriva
263    
264     %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl
265    
266     # (tpg) on x86_64 fails when parallel compiling is on
267     # java.lang.OutOfMemoryError
268     # since 3.6 it does not
269     %make
270    
271     %install
272     rm -rf %{buildroot}
273    
274     %makeinstall_std
275    
276     #install -p dist/sdk/bin/regxpcom %{buildroot}%{mozappdir}
277    
278     rm -rf %{buildroot}%{_libdir}/%{name}-devel-%{version_internal}/sdk/lib/*.so
279     pushd %{buildroot}%{mozappdir}
280     for i in *.so; do
281     ln -s %{mozappdir}/$i %{buildroot}%{_libdir}/%{name}-devel-%{version_internal}/sdk/lib/$i
282     done
283     popd
284    
285     # GRE stuff
286     %ifarch x86_64 ia64 ppc64 s390x
287     %define gre_conf_file %{version_internal}-64.system.conf
288     mv %{buildroot}%{_sysconfdir}/gre.d/*.system.conf %{buildroot}%{_sysconfdir}/gre.d/%{gre_conf_file}
289     %else
290     %define gre_conf_file %{version_internal}.system.conf
291     %endif
292    
293     # Don't install these in appdir
294     rm %{buildroot}%{mozappdir}/LICENSE
295     rm %{buildroot}%{mozappdir}/README.txt
296    
297     # when not building with system nspr:
298     #rm -f %{buildroot}%_libdir/xulrunner-2.0/nspr-config
299    
300     %if %_use_syshunspell
301     # Use the system hunspell dictionaries
302     rm -rf %{buildroot}%{mozappdir}/dictionaries
303     ln -s %{_datadir}/dict/mozilla %{buildroot}%{mozappdir}/dictionaries
304     %endif
305    
306     # ghost files
307     mkdir -p %{buildroot}%{mozappdir}/components
308     touch %{buildroot}%{mozappdir}/components/compreg.dat
309     touch %{buildroot}%{mozappdir}/components/xpti.dat
310    
311     # set up our default preferences
312     cat << EOF > %{buildroot}%{mozappdir}/defaults/pref/vendor.js
313     pref("general.useragent.vendor", "%{distribution}");
314     pref("general.useragent.vendorSub", "%{version}-%{release}");
315     pref("general.useragent.vendorComment", "%{mandriva_release}");
316     pref("general.smoothScroll", true);
317     pref("mousewheel.horizscroll.withnokey.action", 0);
318     pref("mousewheel.horizscroll.withnokey.numlines", 3);
319     pref("mousewheel.horizscroll.withnokey.sysnumlines", false);
320     pref("mousewheel.withnokey.action", 0);
321     pref("mousewheel.withnokey.numlines", 7);
322     pref("mousewheel.withnokey.sysnumlines", false);
323     pref("network.protocol-handler.app.mailto", "/usr/bin/xdg-email");
324     pref("network.protocol-handler.app.mms", "/usr/bin/xdg-open");
325     pref("network.http.pipelining", true);
326     pref("network.http.proxy.pipelining", true);
327     pref("network.http.pipelining.maxrequests", 8);
328     pref("browser.display.use_system_colors", true);
329     pref("browser.tabs.loadDivertedInBackground", true);
330     pref("browser.startup.homepage_override.mstone", "ignore");
331     pref("browser.backspace_action", 2);
332     pref("browser.tabs.loadFolderAndReplace", false);
333     pref("browser.EULA.override", true);
334     pref("browser.safebrowsing.enabled", true);
335     pref("browser.shell.checkDefaultBrowser", false);
336     pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html");
337     pref("browser.ctrlTab.previews", true);
338     pref("browser.tabs.insertRelatedAfterCurrent", false);
339     pref("print.print_edge_top", 14); // 1/100 of an inch
340     pref("print.print_edge_left", 16); // 1/100 of an inch
341     pref("print.print_edge_right", 16); // 1/100 of an inch
342     pref("print.print_edge_bottom", 14); // 1/100 of an inch
343     pref("app.update.enabled", false);
344     pref("app.update.auto", false);
345     pref("app.update.autoInstallEnabled", false);
346     pref("intl.locale.matchOS", true);
347     pref("toolkit.storage.synchronous", 0);
348     pref("layout.css.visited_links_enabled", false);
349     pref("security.ssl.require_safe_negotiation", false);
350     EOF
351    
352     %find_lang %{name}
353    
354     mkdir -p %{buildroot}%{_sys_macros_dir}
355     cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros
356     # Macros from %{name} package
357     %%xulrunner_major %{major}
358     %%xulrunner_version %{version}
359     %%xulrunner_libname %{libname}
360     %%xulrunner_mozappdir %{mozappdir}
361     FIN
362    
363     %clean
364     rm -rf %{buildroot}
365    
366     %files
367     %defattr(-,root,root)
368     %doc LICENSE README.txt
369     %dir %{mozappdir}
370     %{_bindir}/xulrunner
371    
372     %files -n %{libname}
373     %defattr(-,root,root)
374     %dir %{mozappdir}
375     %{mozappdir}/chrome
376     %{mozappdir}/dictionaries
377     %dir %{mozappdir}/components
378     %ghost %{mozappdir}/components/compreg.dat
379     %ghost %{mozappdir}/components/xpti.dat
380     %{mozappdir}/components/*.so
381     %{mozappdir}/components/*.xpt
382     %{mozappdir}/components/*.manifest
383     %{mozappdir}/*.manifest
384     %attr(644, root, root) %{mozappdir}/components/*.js
385     %{mozappdir}/defaults
386     #%{mozappdir}/greprefs
387     %dir %{mozappdir}/icons
388     %attr(644, root, root) %{mozappdir}/icons/*
389     %{mozappdir}/modules
390     %{mozappdir}/plugins
391     %{mozappdir}/res
392     %{mozappdir}/*.so
393     %{mozappdir}/mozilla-xremote-client
394     %{mozappdir}/run-mozilla.sh
395     #%{mozappdir}/regxpcom
396     %{mozappdir}/greprefs.js
397     %{mozappdir}/*.chk
398     %{mozappdir}/xulrunner
399     %{mozappdir}/xulrunner-bin
400     %{mozappdir}/xulrunner-stub
401     %{mozappdir}/platform.ini
402     %{mozappdir}/dependentlibs.list
403     #%{mozappdir}/javaxpcom.jar
404     %{mozappdir}/plugin-container
405     %dir %{_sysconfdir}/gre.d
406     %{_sysconfdir}/gre.d/*.conf
407    
408     %files -n %{develname}
409     %defattr(-,root,root)
410     %{_includedir}/%{name}-%{version_internal}
411     %{mozappdir}/xpcshell
412     %{mozappdir}/xpidl
413     %{mozappdir}/xpt_dump
414     %{mozappdir}/xpt_link
415     %{_libdir}/%{name}-devel-%{version_internal}
416     %{_libdir}/pkgconfig/*.pc
417     %{_datadir}/idl/%{name}-%{version_internal}
418     %{_sys_macros_dir}/%{name}.macros
419    
420    

  ViewVC Help
Powered by ViewVC 1.1.30