# # WARNING, READ FIRST: # # This is a special package that needs special treatment. Due to the amount of # security updates it needs, it's common to ship new upstream versions instead of patching. # That means this package MUST be BUILDABLE for stable official releases. # This also means only STABLE upstream releases, NO betas. # This is a discussed topic. Please, do not flame it again. %define ffver 10.0.4esr %define version_internal 10.0.4 %define release %mkrel 1 # (tpg) DO NOT FORGET TO SET EXACT MAJOR! # in this case %{major} == %{version_internal} %define major %{version_internal} %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d %define develunstname %mklibname %{name}-unstable -d %define sname firefox # (tpg) various directory defines %define mozappdir %{_libdir}/%{name}-%{version_internal} %define nss_libname %mklibname nss 3 %define nspr_libname %mklibname nspr 4 # this seems fragile, so require the exact version or later (#58754) %define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0) %define nss_version %(pkg-config --modversion nss &>/dev/null && pkg-config --modversion nss 2>/dev/null || echo 0) %define _use_syshunspell 1 Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: %{version_internal} Release: %{release} License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Development/Other Url: http://developer.mozilla.org/en/docs/XULRunner %if 0%{?prel} Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{sname}/releases/%{ffver}/source/%{sname}-%{ffver}%prel.source.tar.bz2 %else Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{sname}/releases/%{ffver}/source/%{sname}-%{ffver}.source.tar.bz2 %endif Patch1: xulrunner-1.9.1-max-path-len.patch Patch2: mozilla-nongnome-proxies.patch Patch3: %{name}-9.0-pluginsdir2.patch # Fedora patches: # use 1.9 as xulrunner version in the dirname and not the complete version string Patch4: xulrunner-1.9.0.1-version.patch Patch5: xulrunner-2.0-pkgconfig.patch Patch6: xulrunner-1.9.1-java-make-j1.patch Patch7: xulrunner-1.9.2-public-opearator-delete.patch Patch8: mozilla-kde.patch Patch9: xulrunner-1.9.2-realpath.patch Patch10: xulrunner-2.0b4-missing-linking-libraries.patch Patch34: xulrunner_nojit.patch # Fedora patches(>100): Patch101: add-gtkmozembed.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=559278 Patch103: xulrunner-char16_t.patch BuildRequires: zlib-devel BuildRequires: bzip2-devel #(Dmorgan) Enable when libpng >= 1.4.1 will be in mageia #BuildRequires: libpng-devel >= 1.4.1 %if %_use_syshunspell BuildRequires: libhunspell-devel %endif BuildRequires: libIDL2-devel BuildRequires: gtk+2-devel BuildRequires: libxt-devel BuildRequires: libevent-devel BuildRequires: startup-notification-devel BuildRequires: dbus-glib-devel BuildRequires: libsqlite3-devel >= 3.7.4 BuildRequires: autoconf2.1 BuildRequires: libgnome2-devel BuildRequires: libgnomeui2-devel BuildRequires: zip BuildRequires: doxygen BuildRequires: makedepend %ifnarch %arm %mips BuildRequires: pkgconfig(valgrind) BuildRequires: java-rpmbuild BuildRequires: yasm %endif %ifarch %arm BuildRequires: libffi-devel %endif BuildRequires: rootcerts BuildRequires: python BuildRequires: nspr-devel >= 2:4.8.9 BuildRequires: nss-static-devel >= 2:3.12.10 BuildRequires: pango-devel BuildRequires: libalsa-devel BuildRequires: libnotify-devel BuildRequires: mesagl-devel BuildRequires: cairo-devel >= 1.10 BuildRequires: libproxy-devel BuildRequires: libvpx-devel Requires: %{libname} = %{version}-%{release} Conflicts: xulrunner < %{version} Provides: %{name} = %{version}%{?prel:-0.%prel} %description XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications that are as rich as Firefox and Thunderbird. It will provide mechanisms for installing, upgrading, and uninstalling these applications. XULRunner will also provide libxul, a solution which allows the embedding of Mozilla technologies in other projects and products. %package -n %{libname} Summary: Dynamic libraries for %{name} Group: System/Libraries Conflicts: xulrunner < %{version} Obsoletes: %{mklibname xulrunner 1.9.2} < %{version}-%{release} Requires: rootcerts # (tpg) manually pull dependancies on libnss3 and libnspr4, why ? see above Requires: %{nss_libname} >= 2:%{nss_version} Requires: %{nspr_libname} >= 2:4.8.7 # (salem) bug #42680 for noarch packages Provides: libxulrunner = %{version}-%{release} Requires: %{mklibname sqlite3_ 0} >= %{sqlite3_version} Obsoletes: %{_lib}xulrunner2.1 < %{version}-%{release} %description -n %{libname} Dynamic libraries for %{name}. %package -n %{develname} Summary: Development files for %{name} Group: Development/Other Requires: %{name} = %{version}-%{release} Obsoletes: xulrunner-devel < 1.9.2 Obsoletes: %{mklibname mozilla-firefox -d} < 0:3 Obsoletes: %{mklibname %{name}-unstable -d} Provides: %{name}-devel = %{version}-%{release} # (tpg) see above why Requires: nss-devel Requires: libalsa-devel %description -n %{develname} Development files and headers for %{name}. %prep %setup -qn mozilla-esr10 %patch2 -p1 -b .proxy %patch3 -p1 -b .plugins %patch4 -p1 -b .version %patch5 -p1 -b .pkgconfig %patch7 -p1 -b .public-opearator-delete %ifarch %arm %if "%{_target_cpu}" != "armv7l" %patch34 -p1 %endif %endif %patch101 -p2 -b .gtkmozembed %patch103 -p1 pushd js/src autoconf-2.13 popd autoconf-2.13 # needed to regenerate certdata.c pushd security/nss/lib/ckfw/builtins perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt popd #(tpg) correct the xulrunner version sed -i -e 's#INTERNAL_VERSION#%{version_internal}#g' xulrunner/installer/Makefile.in %build %serverbuild export PREFIX="%{_prefix}" export LIBDIR="%{_libdir}" export CFLAGS="$(echo %{optflags} | sed -e 's/-Wall//')" export CXXFLAGS="$CFLAGS" export LDFLAGS="%ldflags -Wl,-rpath,%{mozappdir}" # (tpg) don't use macro here # (fhimpe) Starting from Firefox 4.0b10, at least sqlite 3.6.4 is needed ./configure --build=%{_target_platform} \ --host=%_host --target=%_target_platform \ %ifarch %arm %if "%{_target_cpu}" != "armv7l" --disable-methodjit \ --disable-tracejit \ %endif --enable-system-ffi \ %endif --prefix=%{_prefix} \ --bindir=%{_bindir} \ --libdir=%{_libdir} \ --includedir=%{_includedir} \ --datadir=%{_datadir} \ --sysconfdir=%{_sysconfdir} \ --enable-application=xulrunner \ --with-pthreads \ --with-system-jpeg \ --with-system-zlib \ --with-system-bz2 \ --with-system-libevent \ --without-system-png \ --with-system-nspr \ --with-system-nss \ --enable-system-sqlite \ --enable-system-cairo \ --enable-system-pixman \ %if %_use_syshunspell --enable-system-hunspell \ %endif --disable-javaxpcom \ --enable-pango \ --enable-svg \ --enable-canvas \ --enable-crypto \ --disable-crashreporter \ --disable-installer \ --disable-updater \ --enable-optimize \ --enable-jemalloc \ --disable-wrap-malloc \ --disable-strip \ --enable-install-strip \ --enable-startup-notification \ --enable-default-toolkit=cairo-gtk2 \ --enable-shared-js \ %ifnarch %arm %mips --enable-valgrind \ --with-java-include-path=%{java_home}/include \ --with-java-bin-path=%{java_home}/bin \ %endif --enable-image-encoder=all \ --enable-image-decoders=all \ --enable-places \ --enable-storage \ --enable-safe-browsing \ --enable-url-classifier \ --disable-gnomevfs \ --enable-gio \ --enable-gnomeui \ --disable-faststart \ --enable-smil \ --disable-tree-freetype \ --enable-canvas3d \ --disable-coretext \ --enable-extensions=default \ --enable-necko-protocols=all \ --disable-necko-wifi \ --disable-tests \ --disable-mochitest \ --enable-xtf \ --enable-wave \ --with-system-libvpx \ --enable-ogg \ --enable-xpcom-fastload \ --enable-dbus \ --enable-libproxy \ --enable-chrome-format=jar \ --with-distribution-id=org.%{_vendor} %__perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl %make %install rm -rf %{buildroot} %makeinstall_std #install -p dist/sdk/bin/regxpcom %{buildroot}%{mozappdir} rm -rf %{buildroot}%{_libdir}/%{name}-devel-%{version_internal}/sdk/lib/*.so pushd %{buildroot}%{mozappdir} for i in *.so; do ln -s %{mozappdir}/$i %{buildroot}%{_libdir}/%{name}-devel-%{version_internal}/sdk/lib/$i done popd # GRE stuff %ifarch x86_64 ia64 ppc64 s390x %define gre_conf_file %{version_internal}-64.system.conf #mv %{buildroot}%{_sysconfdir}/gre.d/*.system.conf %{buildroot}%{_sysconfdir}/gre.d/%{gre_conf_file} %else %define gre_conf_file %{version_internal}.system.conf %endif # Copy pc files (for compatibility with 1.9.1 and needed by eclipse ) %{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul.pc \ $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-unstable.pc %{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding.pc \ $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding-unstable.pc # Library path LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d LD_CONF_FILE=xulrunner-%version_internal-%{__isa_bits}.conf %{__mkdir_p} ${RPM_BUILD_ROOT}${LD_SO_CONF_D} %{__cat} > ${RPM_BUILD_ROOT}${LD_SO_CONF_D}/${LD_CONF_FILE} << EOF %{mozappdir} EOF # Don't install these in appdir rm %{buildroot}%{mozappdir}/LICENSE rm %{buildroot}%{mozappdir}/README.txt # when not building with system nspr: #rm -f %{buildroot}%_libdir/xulrunner-2.0/nspr-config %if %_use_syshunspell # Use the system hunspell dictionaries rm -rf %{buildroot}%{mozappdir}/dictionaries ln -s %{_datadir}/dict/mozilla %{buildroot}%{mozappdir}/dictionaries %endif # set up our default preferences cat << EOF > %{buildroot}%{mozappdir}/defaults/pref/vendor.js pref("general.smoothScroll", true); pref("mousewheel.horizscroll.withnokey.action", 0); pref("mousewheel.horizscroll.withnokey.numlines", 3); pref("mousewheel.horizscroll.withnokey.sysnumlines", false); pref("mousewheel.withnokey.action", 0); pref("mousewheel.withnokey.numlines", 7); pref("mousewheel.withnokey.sysnumlines", false); pref("network.protocol-handler.app.mailto", "/usr/bin/xdg-email"); pref("network.protocol-handler.app.mms", "/usr/bin/xdg-open"); pref("network.http.pipelining", true); pref("network.http.proxy.pipelining", true); pref("network.http.pipelining.maxrequests", 8); pref("browser.display.use_system_colors", true); pref("browser.tabs.loadDivertedInBackground", true); pref("browser.startup.homepage_override.mstone", "ignore"); pref("browser.backspace_action", 2); pref("browser.tabs.loadFolderAndReplace", false); pref("browser.EULA.override", true); pref("browser.safebrowsing.enabled", true); pref("browser.shell.checkDefaultBrowser", false); pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html"); pref("print.print_edge_top", 14); // 1/100 of an inch pref("print.print_edge_left", 16); // 1/100 of an inch pref("print.print_edge_right", 16); // 1/100 of an inch pref("print.print_edge_bottom", 14); // 1/100 of an inch pref("app.update.enabled", false); pref("app.update.auto", false); pref("app.update.autoInstallEnabled", false); pref("intl.locale.matchOS", true); pref("toolkit.storage.synchronous", 0); EOF %find_lang %{name} mkdir -p %{buildroot}%{_sys_macros_dir} cat <<FIN >%{buildroot}%{_sys_macros_dir}/%{name}.macros # Macros from %{name} package %%xulrunner_major %{major} %%xulrunner_version %{version} %%xulrunner_libname %{libname} %%xulrunner_mozappdir %{mozappdir} FIN %files %doc LICENSE README.txt %dir %{mozappdir} %{_bindir}/xulrunner %files -n %{libname} %dir %{mozappdir} %{mozappdir}/chrome %{mozappdir}/dictionaries %dir %{mozappdir}/components %{mozappdir}/components/*.so %{mozappdir}/components/*.xpt %{mozappdir}/components/*.manifest %{mozappdir}/*.manifest %attr(644, root, root) %{mozappdir}/components/*.js %{mozappdir}/defaults #%{mozappdir}/greprefs %{mozappdir}/modules %{mozappdir}/plugins %{mozappdir}/res %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh #%{mozappdir}/regxpcom %{mozappdir}/greprefs.js %{mozappdir}/hyphenation #%{mozappdir}/*.chk %{mozappdir}/xulrunner %{mozappdir}/xulrunner-bin %{mozappdir}/xulrunner-stub %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list #%{mozappdir}/javaxpcom.jar %{mozappdir}/plugin-container #dir %{_sysconfdir}/gre.d #{_sysconfdir}/gre.d/*.conf %{_sysconfdir}/ld.so.conf.d %files -n %{develname} %{_includedir}/%{name}-%{version_internal} %{mozappdir}/xpcshell %{_libdir}/%{name}-devel-%{version_internal} %{_libdir}/pkgconfig/*.pc %{_datadir}/idl/%{name}-%{version_internal} %{_sys_macros_dir}/%{name}.macros %changelog * Sun Apr 22 2012 luigiwalser <luigiwalser> 10.0.4-1.mga1 + Revision: 232633 - rebuild for nss and nspr + fwang <fwang> - new version 10.0.4esr - new version 10.0.3esr - fix invalid .pc files (bug#3884) - new version 7.0.1 + dmorgan <dmorgan> - New version 10.0.2esr - New version 10.0.1 - New version 10.0 - New version 9.0.1 - New version 9.0 - New version 8.0.1 (sync with cauldron) - Add missing patches - New version 7.0 ( backport from cauldron) - New version 6.0.2 - New version 6.0.1 - Version ld.so.conf.d file - Fix conflicts in %%libname - Remove wrongly added files in previous commit - Sync with cauldron ( update to version 6 ) - Add missing %%if - Fix buildrequires - Update to version 5.0.1 * Sat Apr 30 2011 tv <tv> 2.0.1-1.mga1 + Revision: 93601 - new release * Wed Mar 30 2011 rtp <rtp> 2.0-4.mga1 + Revision: 79025 - Arm support : * Merge patch from mozilla bug 626035 to fix arm detection * Use system libffi (only on arm) because internal one is using vfp insns * Disable all javascrits jit (tracejit/methodjit) because arm softfloat support broken * Backport alignment fix from mozilla bug 634954 * Thu Mar 24 2011 boklm <boklm> 2.0-3.mga1 + Revision: 76222 - rebuild for bug #497 * Mon Mar 21 2011 tv <tv> 2.0-2.mga1 + Revision: 75339 - new release - enable to package beta/rc or final with %%if - no need requiring self * Mon Mar 21 2011 ahmad <ahmad> 2.0-0.rc2.2.mga1 + Revision: 75311 - default prefs changes: o don't set pref("browser.ctrlTab.previews", true); go with upstream default o don't set pref("security.ssl.require_safe_negotiation", false); , it's false by default anyway - rediff pkgconfig patch - drop unapplied patch12 - drop patch14 addressed differently upstream (Fedora) - drop patch15,19,20 fixed upstream - drop patch26, it was unapplied and the code changed upstream - don't apply java_make-j1 patch, we have a much more powerful BS (touch wood) - build with system-libvpx - build with system-pixman - don't compile with --disable-faststart - disable gnomevfs support - no need to ghost {compreg,xpti}.dat any more, they both moved to the profile directory ages ago (Fedora) * Sun Mar 20 2011 dmorgan <dmorgan> 2.0-0.rc2.1.mga1 + Revision: 74689 - Add missing source - Update to Rc2 * Sat Mar 19 2011 dmorgan <dmorgan> 2.0-0.rc1.8.mga1 + Revision: 74494 - Clean spec file - Add patch to enable kde integration ( from Suse ) * Tue Mar 15 2011 dmorgan <dmorgan> 2.0-0.rc1.7.mga1 + Revision: 71505 - Copy pc files (for compatibility with 1.9.1 ) * Thu Mar 10 2011 tv <tv> 2.0-0.rc1.6.mga1 + Revision: 67398 - fix path in tarball - new release * Sun Mar 06 2011 ahmad <ahmad> 2.0-0.b12.6.mga1 + Revision: 65726 - remove general.useragent.vendor* prefs, they have no effect as support was dropped, c.f. https://bugzilla.mozilla.org/show_bug.cgi?id=581008 https://developer.mozilla.org/en/Gecko_user_agent_string_reference - don't set browser.tabs.insertRelatedAfterCurrent to false by default, to be more compliant with upstream (they do spend time on usability) * Tue Mar 01 2011 ahmad <ahmad> 2.0-0.b12.5.mga1 + Revision: 61893 - make the main package provide '%%{name} = %%{version}%%{?prel:-0.%%prel}' * Sat Feb 26 2011 tv <tv> 2.0-0.b12.4.mga1 + Revision: 60665 - drop further obsoleted patches - kill obsolete patches - new release * Mon Feb 21 2011 dmorgan <dmorgan> 2.0-0.b11.4.mga1 + Revision: 55384 - Apply patch2 - Add missing source( - Backport mdv commit 637123 - add upstream patch2 to build under default link options - Update to beta11 + ahmad <ahmad> - require a recent enough cairo-devel * Sun Feb 06 2011 ahmad <ahmad> 2.0-0.b10.4.mga1 + Revision: 48059 - fix BR, no need to build with java-1.5.0-devel - remove pref("layout.css.visited_links_enabled", false); , the most scary/big parts have been fixed upstream ages ago, and this option isn't disabled by default upstream c.f.: http://dbaron.org/mozilla/visited-privacy https://bugzilla.mozilla.org/show_bug.cgi?id=147777 * Sat Jan 29 2011 dmorgan <dmorgan> 2.0-0.b10.3.mga1 + Revision: 43417 - Merge mdv commit 63319 - Merge mdv commit 633197 - Merge mdv commit 633159 + erwan <erwan> - New release b10 * Sun Jan 16 2011 blino <blino> 2.0-0.b8.3.mga1 + Revision: 20086 - update distribution-id - use product_release macro - remove comment about old version - remove old version checks (for ldflags macro) + dmorgan <dmorgan> - Remove mdv macros - imported package xulrunner