From b85e7c46a05f965bffda845fe7f084f811a43a5a Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Nov 06 2013 14:30:01 +0000 Subject: import xulrunner-24.1.0-1.el7.src.rpm --- diff --git a/.xulrunner.metadata b/.xulrunner.metadata new file mode 100644 index 0000000..d91bf1a --- /dev/null +++ b/.xulrunner.metadata @@ -0,0 +1 @@ +faeed7eb315e9e0a380ab5081b96800590eb6154 SOURCES/firefox-24.1.0esr.source.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/camelia.patch b/SOURCES/camelia.patch new file mode 100644 index 0000000..0700968 --- /dev/null +++ b/SOURCES/camelia.patch @@ -0,0 +1,45 @@ +diff -up mozilla-release/netwerk/base/public/security-prefs.js.camelia mozilla-release/netwerk/base/public/security-prefs.js +--- mozilla-release/netwerk/base/public/security-prefs.js.camelia 2013-09-11 01:15:20.000000000 +0200 ++++ mozilla-release/netwerk/base/public/security-prefs.js 2013-10-10 14:25:45.524000007 +0200 +@@ -18,12 +18,6 @@ pref("security.ssl3.rsa_rc4_128_md5", tr + pref("security.ssl3.rsa_rc4_128_sha", true); + pref("security.ssl3.rsa_fips_des_ede3_sha", true); + pref("security.ssl3.rsa_des_ede3_sha", true); +-pref("security.ssl3.dhe_rsa_camellia_256_sha", true); +-pref("security.ssl3.dhe_dss_camellia_256_sha", true); +-pref("security.ssl3.rsa_camellia_256_sha", true); +-pref("security.ssl3.dhe_rsa_camellia_128_sha", true); +-pref("security.ssl3.dhe_dss_camellia_128_sha", true); +-pref("security.ssl3.rsa_camellia_128_sha", true); + pref("security.ssl3.dhe_rsa_aes_256_sha", true); + pref("security.ssl3.dhe_dss_aes_256_sha", true); + pref("security.ssl3.rsa_aes_256_sha", true); +diff -up mozilla-release/security/manager/ssl/src/nsNSSComponent.cpp.camelia mozilla-release/security/manager/ssl/src/nsNSSComponent.cpp +--- mozilla-release/security/manager/ssl/src/nsNSSComponent.cpp.camelia 2013-09-11 01:15:21.000000000 +0200 ++++ mozilla-release/security/manager/ssl/src/nsNSSComponent.cpp 2013-10-10 14:27:04.388999975 +0200 +@@ -834,9 +834,6 @@ static CipherPref CipherPrefs[] = { + {"security.ssl3.rsa_fips_des_ede3_sha", SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with RSA and a SHA1 MAC (FIPS) + {"security.ssl3.rsa_des_ede3_sha", SSL_RSA_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with RSA and a SHA1 MAC + /* Extra SSL3/TLS cipher suites */ +- {"security.ssl3.dhe_rsa_camellia_256_sha", TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA}, // 256-bit Camellia encryption with RSA, DHE, and a SHA1 MAC +- {"security.ssl3.dhe_dss_camellia_256_sha", TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA}, // 256-bit Camellia encryption with DSA, DHE, and a SHA1 MAC +- {"security.ssl3.rsa_camellia_256_sha", TLS_RSA_WITH_CAMELLIA_256_CBC_SHA}, // 256-bit Camellia encryption with RSA and a SHA1 MAC + {"security.ssl3.dhe_rsa_aes_256_sha", TLS_DHE_RSA_WITH_AES_256_CBC_SHA}, // 256-bit AES encryption with RSA, DHE, and a SHA1 MAC + {"security.ssl3.dhe_dss_aes_256_sha", TLS_DHE_DSS_WITH_AES_256_CBC_SHA}, // 256-bit AES encryption with DSA, DHE, and a SHA1 MAC + {"security.ssl3.rsa_aes_256_sha", TLS_RSA_WITH_AES_256_CBC_SHA}, // 256-bit AES encryption with RSA and a SHA1 MAC +@@ -858,15 +855,11 @@ static CipherPref CipherPrefs[] = { + {"security.ssl3.ecdh_rsa_aes_128_sha", TLS_ECDH_RSA_WITH_AES_128_CBC_SHA}, // 128-bit AES encryption with ECDH-RSA and a SHA1 MAC + {"security.ssl3.ecdh_rsa_des_ede3_sha", TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with ECDH-RSA and a SHA1 MAC + {"security.ssl3.ecdh_rsa_rc4_128_sha", TLS_ECDH_RSA_WITH_RC4_128_SHA}, // 128-bit RC4 encryption with ECDH-RSA and a SHA1 MAC +- {"security.ssl3.dhe_rsa_camellia_128_sha", TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA}, // 128-bit Camellia encryption with RSA, DHE, and a SHA1 MAC +- {"security.ssl3.dhe_dss_camellia_128_sha", TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA}, // 128-bit Camellia encryption with DSA, DHE, and a SHA1 MAC +- {"security.ssl3.rsa_camellia_128_sha", TLS_RSA_WITH_CAMELLIA_128_CBC_SHA}, // 128-bit Camellia encryption with RSA and a SHA1 MAC + {"security.ssl3.dhe_rsa_aes_128_sha", TLS_DHE_RSA_WITH_AES_128_CBC_SHA}, // 128-bit AES encryption with RSA, DHE, and a SHA1 MAC + {"security.ssl3.dhe_dss_aes_128_sha", TLS_DHE_DSS_WITH_AES_128_CBC_SHA}, // 128-bit AES encryption with DSA, DHE, and a SHA1 MAC + {"security.ssl3.rsa_aes_128_sha", TLS_RSA_WITH_AES_128_CBC_SHA}, // 128-bit AES encryption with RSA and a SHA1 MAC + {"security.ssl3.dhe_rsa_des_ede3_sha", SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with RSA, DHE, and a SHA1 MAC + {"security.ssl3.dhe_dss_des_ede3_sha", SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with DSA, DHE, and a SHA1 MAC +- {"security.ssl3.rsa_seed_sha", TLS_RSA_WITH_SEED_CBC_SHA}, // SEED encryption with RSA and a SHA1 MAC + {nullptr, 0} /* end marker */ + }; + diff --git a/SOURCES/find-external-requires b/SOURCES/find-external-requires new file mode 100755 index 0000000..d79db1d --- /dev/null +++ b/SOURCES/find-external-requires @@ -0,0 +1,23 @@ +#!/bin/sh + +# Finds requirements provided outside of the current file set + +filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"` + +provides=`echo $filelist | /usr/lib/rpm/find-provides` + +{ +for f in $filelist ; do + echo $f | /usr/lib/rpm/find-requires | while read req ; do + found=0 + for p in $provides ; do + if [ "$req" = "$p" ]; then + found=1 + fi + done + if [ "$found" = "0" ]; then + echo $req + fi + done +done +} | sort -u \ No newline at end of file diff --git a/SOURCES/mozilla-193-pkgconfig.patch b/SOURCES/mozilla-193-pkgconfig.patch new file mode 100644 index 0000000..67ec302 --- /dev/null +++ b/SOURCES/mozilla-193-pkgconfig.patch @@ -0,0 +1,32 @@ +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in 2010-08-16 11:12:32.000000000 +0200 +@@ -6,5 +6,6 @@ idldir=%idldir% + Name: libxul-embedding + Description: Static library for version-independent embedding of the Mozilla runtime + Version: %MOZILLA_VERSION% ++Requires: %NSPR_NAME% >= %NSPR_VERSION% + Libs: -L${sdkdir}/lib -lxpcomglue -ldl + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk 2010-08-06 03:09:24.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in 2010-08-16 11:07:52.000000000 +0200 +@@ -2,6 +2,7 @@ prefix=%prefix% + sdkdir=%sdkdir% + includedir=%includedir% + idldir=%idldir% ++libdir=%libdir% + + Name: libxul + Description: The Mozilla Runtime and Embedding Engine +diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in +--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk 2010-08-16 11:07:52.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in 2010-08-16 11:07:52.000000000 +0200 +@@ -116,6 +116,7 @@ endif + -e "s|%includedir%|$(includedir)|" \ + -e "s|%idldir%|$(idldir)|" \ + -e "s|%sdkdir%|$(sdkdir)|" \ ++ -e "s|%libdir%|$(installdir)|" \ + -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \ + -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ + -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \ diff --git a/SOURCES/mozilla-build.patch b/SOURCES/mozilla-build.patch new file mode 100644 index 0000000..1dd29d0 --- /dev/null +++ b/SOURCES/mozilla-build.patch @@ -0,0 +1,20 @@ +--- mozilla-release/security/build/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 ++++ mozilla-release/security/build/Makefile.in 2013-06-18 14:01:41.940378194 +0200 +@@ -133,7 +133,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= + DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR) + DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 + DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 +-DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1 + DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)" + ifeq ($(OS_ARCH),WINNT) + DEFAULT_GMAKE_FLAGS += INSTALL="$(NSINSTALL) -t" +--- mozilla-release/security/manager/ssl/src/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 ++++ mozilla-release/security/manager/ssl/src/Makefile.in 2013-06-18 14:01:18.659377663 +0200 +@@ -86,7 +86,6 @@ endif + CSRCS += md4.c + + DEFINES += \ +- -DNSS_ENABLE_ECC \ + -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ + -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \ + $(NULL) diff --git a/SOURCES/rhbz-872752.patch b/SOURCES/rhbz-872752.patch new file mode 100644 index 0000000..63404c7 --- /dev/null +++ b/SOURCES/rhbz-872752.patch @@ -0,0 +1,38 @@ +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in.orig 2012-11-05 11:17:57.000000000 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in 2012-11-05 11:56:22.513385775 +0100 +@@ -46,6 +46,7 @@ + + pkg_config_files = \ + libxul.pc \ ++ libxul-embedding-lib.pc \ + libxul-embedding.pc \ + mozilla-js.pc \ + mozilla-plugin.pc \ +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in.orig 2012-11-05 11:59:31.493626458 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in 2012-11-05 12:01:03.547230893 +0100 +@@ -0,0 +1,11 @@ ++prefix=%prefix% ++sdkdir=%sdkdir% ++includedir=%includedir% ++idldir=%idldir% ++ ++Name: libxul-embedding-lib ++Description: Static library for version-independent embedding of the Mozilla runtime for libraries ++Version: %MOZILLA_VERSION% ++Requires: %NSPR_NAME% >= %NSPR_VERSION% ++Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in.fixembed 2012-11-05 11:17:57.227491778 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in 2012-11-05 12:01:56.140574788 +0100 +@@ -4,8 +4,8 @@ + idldir=%idldir% + + Name: libxul-embedding +-Description: Static library for version-independent embedding of the Mozilla runtime ++Description: Static library for version-independent embedding of the Mozilla runtime for applications + Version: %MOZILLA_VERSION% +-Requires: %NSPR_NAME% >= %NSPR_VERSION% +-Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Requires: %NSPR_NAME% >= %NSPR_VERSION% , libxul-embedding-lib = %MOZILLA_VERSION% ++Libs: -L${sdkdir}/lib -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl -rdynamic + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/SOURCES/rhbz-966424.patch b/SOURCES/rhbz-966424.patch new file mode 100644 index 0000000..c4c332e --- /dev/null +++ b/SOURCES/rhbz-966424.patch @@ -0,0 +1,23 @@ +--- a/toolkit/modules/CertUtils.jsm ++++ b/toolkit/modules/CertUtils.jsm +@@ -170,17 +170,19 @@ this.checkCert = + issuerCert = issuerCert.QueryInterface(Ci.nsIX509Cert3); + var tokenNames = issuerCert.getAllTokenNames({}); + + if (!tokenNames || !tokenNames.some(isBuiltinToken)) + throw new Ce(certNotBuiltInErr, Cr.NS_ERROR_ABORT); + } + + function isBuiltinToken(tokenName) { +- return tokenName == "Builtin Object Token"; ++ return tokenName == "Builtin Object Token" || ++ tokenName == "Default Trust" || ++ tokenName == "System Trust"; + } + + /** + * This class implements nsIBadCertListener. Its job is to prevent "bad cert" + * security dialogs from being shown to the user. It is better to simply fail + * if the certificate is bad. See bug 304286. + * + * @param aAllowNonBuiltInCerts (optional) diff --git a/SOURCES/xulrunner-2.0-chromium-types.patch b/SOURCES/xulrunner-2.0-chromium-types.patch new file mode 100644 index 0000000..a350b41 --- /dev/null +++ b/SOURCES/xulrunner-2.0-chromium-types.patch @@ -0,0 +1,34 @@ +diff -up xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h +--- xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2011-06-15 23:57:26.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h 2011-06-29 08:23:46.807314175 +0200 +@@ -61,10 +61,14 @@ typedef PRInt16 int16; + #define ARCH_CPU_ARM_FAMILY 1 + #define ARCH_CPU_ARMEL 1 + #define ARCH_CPU_32_BITS 1 +-#elif defined(__ppc__) || defined(__powerpc) || defined(__PPC__) ++#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) + #define ARCH_CPU_PPC_FAMILY 1 + #define ARCH_CPU_PPC 1 + #define ARCH_CPU_32_BITS 1 ++#elif defined(__powerpc64__) ++#define ARCH_CPU_PPC_FAMILY 1 ++#define ARCH_CPU_PPC 1 ++#define ARCH_CPU_64_BITS 1 + #elif defined(__sparc) + #define ARCH_CPU_SPARC_FAMILY 1 + #define ARCH_CPU_SPARC 1 +@@ -73,6 +77,14 @@ typedef PRInt16 int16; + #define ARCH_CPU_SPARC_FAMILY 1 + #define ARCH_CPU_SPARC 1 + #define ARCH_CPU_64_BITS 1 ++#elif defined(__s390__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_32_BITS 1 ++#elif defined(__s390x__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_64_BITS 1 + #else + #warning Please add support for your architecture in chromium_types.h + #endif diff --git a/SOURCES/xulrunner-24.0-gcc47.patch b/SOURCES/xulrunner-24.0-gcc47.patch new file mode 100644 index 0000000..a6bff8e --- /dev/null +++ b/SOURCES/xulrunner-24.0-gcc47.patch @@ -0,0 +1,13 @@ +diff -up xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in +--- xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 2013-09-11 01:15:24.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in 2013-09-13 13:33:49.866875578 +0200 +@@ -60,6 +60,9 @@ $(DIST)/bin/crashreporter.crt: $(topsrcd + $(PYTHON) $(srcdir)/certdata2pem.py < $< > $@ + endif + ++# Needed for moz_free ++LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc ++ + LIBS += \ + $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \ + $(NULL) diff --git a/SOURCES/xulrunner-24.0-jemalloc-ppc.patch b/SOURCES/xulrunner-24.0-jemalloc-ppc.patch new file mode 100644 index 0000000..fe404ca --- /dev/null +++ b/SOURCES/xulrunner-24.0-jemalloc-ppc.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c +--- xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc 2013-09-11 01:15:18.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c 2013-09-13 13:36:34.171680919 +0200 +@@ -1104,7 +1104,7 @@ static unsigned ncpus; + * controlling the malloc behavior are defined as compile-time constants + * for best performance and cannot be altered at runtime. + */ +-#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) ++#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !(defined(__powerpc__)) + #define MALLOC_STATIC_SIZES 1 + #endif + diff --git a/SOURCES/xulrunner-install-dir.patch b/SOURCES/xulrunner-install-dir.patch new file mode 100644 index 0000000..e788fa0 --- /dev/null +++ b/SOURCES/xulrunner-install-dir.patch @@ -0,0 +1,23 @@ +diff -up mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/config/baseconfig.mk +--- mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/config/baseconfig.mk 2012-09-26 10:13:45.258240426 +0200 +@@ -2,7 +2,7 @@ INCLUDED_AUTOCONF_MK = 1 + + includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) + idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME) + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + DIST = $(DEPTH)/dist + +diff -up mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk +--- mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk 2012-09-26 10:14:07.353351833 +0200 +@@ -1,6 +1,6 @@ + INCLUDED_AUTOCONF_MK = 1 + +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME) + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + + ifneq (,$(filter /%,$(TOP_DIST))) diff --git a/SOURCES/xulrunner-mozconfig b/SOURCES/xulrunner-mozconfig new file mode 100755 index 0000000..fe0c85f --- /dev/null +++ b/SOURCES/xulrunner-mozconfig @@ -0,0 +1,43 @@ +. $topsrcdir/xulrunner/config/mozconfig + +# --with-system-png is disabled because Mozilla requires APNG support in libpng +#ac_add_options --with-system-png + +ac_add_options --prefix="$PREFIX" +ac_add_options --libdir="$LIBDIR" +ac_add_options --with-system-jpeg +ac_add_options --with-system-zlib +ac_add_options --with-system-bz2 +ac_add_options --disable-system-cairo +ac_add_options --with-pthreads +ac_add_options --disable-strip +ac_add_options --disable-tests +ac_add_options --disable-mochitest +ac_add_options --disable-installer +ac_add_options --disable-debug +ac_add_options --enable-optimize +ac_add_options --enable-default-toolkit=cairo-gtk2 +ac_add_options --enable-pango +ac_add_options --enable-svg +ac_add_options --enable-canvas +ac_add_options --disable-javaxpcom +ac_add_options --disable-crashreporter +ac_add_options --enable-safe-browsing +ac_add_options --enable-extensions=default +ac_add_options --disable-necko-wifi +ac_add_options --disable-libjpeg-turbo +ac_add_options --disable-cpp-exceptions +ac_add_options --disable-updater +ac_add_options --disable-gnomevfs +ac_add_options --enable-gio +ac_add_options --disable-gstreamer + +export BUILD_OFFICIAL=1 +export MOZILLA_OFFICIAL=1 +mk_add_options BUILD_OFFICIAL=1 +mk_add_options MOZILLA_OFFICIAL=1 +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir + +export CFLAGS="$CFLAGS -gdwarf-2" +export CXXFLAGS="$CXXFLAGS -gdwarf-2" + diff --git a/SOURCES/xulrunner-nspr-version.patch b/SOURCES/xulrunner-nspr-version.patch new file mode 100644 index 0000000..79b318b --- /dev/null +++ b/SOURCES/xulrunner-nspr-version.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-17.0.8/mozilla-esr17/xulrunner/installer/Makefile.in.nspr xulrunner-17.0.8/mozilla-esr17/xulrunner/installer/Makefile.in +--- xulrunner-17.0.8/mozilla-esr17/xulrunner/installer/Makefile.in.nspr 2013-08-01 13:59:21.000000000 +0200 ++++ xulrunner-17.0.8/mozilla-esr17/xulrunner/installer/Makefile.in 2013-08-01 15:20:51.311864276 +0200 +@@ -91,7 +91,7 @@ endif + -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \ + -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \ + -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \ +- -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \ ++ -e "s|%NSPR_VERSION%|__RH_NSPR_VERSION__|" \ + -e "s|%MOZ_XUL_LINK%|$(MOZ_XUL_LINK)|" \ + -e "s|%MOZ_JS_LINK%|$(MOZ_JS_LINK)|" > $@ + chmod 644 $@ diff --git a/SOURCES/xulrunner-redhat-default-prefs.js b/SOURCES/xulrunner-redhat-default-prefs.js new file mode 100644 index 0000000..4d15c04 --- /dev/null +++ b/SOURCES/xulrunner-redhat-default-prefs.js @@ -0,0 +1,15 @@ +pref("app.update.enabled", false); +pref("app.update.autoInstallEnabled", false); +pref("browser.display.use_system_colors", true); +pref("browser.link.open_external", 3); +pref("general.smoothScroll", true); +pref("general.useragent.vendor", "Red Hat"); +pref("general.useragent.vendorSub", "RPM_VERREL"); +pref("intl.locale.matchOS", true); +pref("network.manage-offline-status", true); +pref("toolkit.networkmanager.disable", false); +pref("offline.autoDetect", true); +pref("toolkit.storage.synchronous", 0); +pref("browser.startup.homepage", "http://www.redhat.com"); +pref("startup.homepage_override_url", "http://www.redhat.com"); +pref("startup.homepage_welcome_url", "http://www.redhat.com"); diff --git a/SOURCES/xulrunner-webrtc-secondarch.patch b/SOURCES/xulrunner-webrtc-secondarch.patch new file mode 100644 index 0000000..f0c4c37 --- /dev/null +++ b/SOURCES/xulrunner-webrtc-secondarch.patch @@ -0,0 +1,34 @@ +diff -up xulrunner-17.0/mozilla-esr17/media/webrtc/trunk/src/typedefs.h.old xulrunner-17.0/mozilla-esr17/media/webrtc/trunk/src/typedefs.h +--- xulrunner-17.0/mozilla-esr17/media/webrtc/trunk/webrtc/typedefs.h.old 2012-11-16 20:47:22.000000000 +0100 ++++ xulrunner-17.0/mozilla-esr17/media/webrtc/trunk/webrtc/typedefs.h 2012-11-27 15:24:26.910592024 +0100 +@@ -37,6 +37,30 @@ + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN + #define WEBRTC_LITTLE_ENDIAN ++#elif defined(__powerpc64__) ++#define WEBRTC_ARCH_PPC_FAMILY ++#define WEBRTC_ARCH_PPC ++#define WEBRTC_ARCH_64_BITS ++#define WEBRTC_ARCH_BIG_ENDIAN ++#define WEBRTC_BIG_ENDIAN ++#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) ++#define WEBRTC_ARCH_PPC_FAMILY ++#define WEBRTC_ARCH_PPC ++#define WEBRTC_ARCH_32_BITS ++#define WEBRTC_ARCH_BIG_ENDIAN ++#define WEBRTC_BIG_ENDIAN ++#elif defined(__s390x__) ++#define WEBRTC_ARCH_S390_FAMILY ++#define WEBRTC_ARCH_S390 ++#define WEBRTC_ARCH_64_BITS ++#define WEBRTC_ARCH_BIG_ENDIAN ++#define WEBRTC_BIG_ENDIAN ++#elif defined(__s390__) ++#define WEBRTC_ARCH_S390_FAMILY ++#define WEBRTC_ARCH_S390 ++#define WEBRTC_ARCH_32_BITS ++#define WEBRTC_ARCH_BIG_ENDIAN ++#define WEBRTC_BIG_ENDIAN + #elif defined(__ARMEL__) + // TODO(andrew): We'd prefer to control platform defines here, but this is + // currently provided by the Android makefiles. Commented to avoid duplicate diff --git a/SOURCES/xulrunner.1 b/SOURCES/xulrunner.1 new file mode 100644 index 0000000..2086325 --- /dev/null +++ b/SOURCES/xulrunner.1 @@ -0,0 +1,125 @@ +.TH FIREFOX 1 "August 07, 2001" firefox "Linux User's Manual" +.SH NAME +firefox \- a Web browser for X11 derived from the Mozilla browser + +.SH SYNOPSIS +.B firefox +[\fIOPTIONS\fR] [\fIURL\fR] + +.B firefox-bin +[\fIOPTIONS\fR] [\fIURL\fR] + +.SH DESCRIPTION +\fBMozilla Firefox\fR is an open-source web browser, designed for +standards compliance, performance and portability. + +.SH USAGE +\fBfirefox\fR is a simple shell script that will set up the +environment for the actual executable, \fBfirefox-bin\fR. + +.SH OPTIONS +A summary of the options supported by \fBfirefox\fR is included below. + +.SS "GTK options" +\fB\-\-gdk-debug=\fR\fIFLAGS\fR +Gdk debugging flags to set +.TP +\fB\-\-gdk-no-debug=\fR\fIFLAGS\fR +Gdk debugging flags to unset +.TP +\fB\-\-gtk-debug=\fR\fIFLAGS\fR +Gtk+ debugging flags to set +.TP +\fB\-\-gtk-no-debug=\fR\fIFLAGS\fR +Gtk+ debugging flags to unset +.TP +\fB\-\-gtk-module=\fR\fIMODULE\fR +Load an additional Gtk module + +.SS "X11 options" +.TP +.BI \-\-display= DISPLAY +X display to use +.TP +.B \--sync +Make X calls synchronous +.TP +.B \-\-no-xshm +Don't use X shared memory extension +.TP +.BI \-\-xim-preedit= STYLE +.TP +.BI \-\-xim-status= STYLE +.TP +.B \-\-g-fatal-warnings +Make all warnings fatal + +.SS "Firefox options" +.TP +\fB\-height\fR \fIvalue\fR +Set height of startup window to \fIvalue\fR. +.TP +.B \-h, \-help +Show summary of options. +.TP +.B \-installer +Start with 4.x migration window. +.TP +\fB\-width\fR \fIvalue\fR +Set width of startup window to \fIvalue\fR. +.TP +.B \-v, \-version +Print \fB/usr/bin/firefox-bin\fR version. +.TP +\fB\-CreateProfile\fR \fIprofile\fR +Create \fIprofile\fR. +.TP +\fB\-P\fR \fIprofile\fR +Start with \fIprofile\fR. +.TP +.B \-ProfileWizard +Start with profile wizard. +.TP +.B \-ProfileManager +Start with profile manager. +.TP +.B \-SelectProfile +Start with profile selection dialog. +.TP +\fB\-lang\fR \fIlang-region\fR +Start with \fIlang-region\fR resources. +.TP +\fB\-remote\fR \fIcommand\fR +Execute \fIcommand\fR in an already running Firefox process. For more info, +see: \fIhttp://www.mozilla.org/unix/remote.html\fR +.TP +.B \-splash +Enable splash screen. +.TP +.B \-jsconsole +Start with Javascript Console +.TP +\fB\-chrome\fR \fIurl\fR +Load the specified chrome. +.TP + +.SH FILES +\fI/usr/bin/firefox\fR - shell script wrapping +\fBfirefox\fR +.br +\fI/usr/lib/mozilla/firefox-bin\fR - \fBfirefox\fR +executable + +.SH VERSION +1.0 + +.SH BUGS +To report a bug, please visit \fIhttp://bugzilla.mozilla.org/\fR + +.SH "SEE ALSO" +.BR mozilla(1) + +.SH AUTHORS +.TP +.B The Mozilla Organization +.I http://www.mozilla.org/about.html diff --git a/SOURCES/xulrunner.sh.in b/SOURCES/xulrunner.sh.in new file mode 100644 index 0000000..af0d466 --- /dev/null +++ b/SOURCES/xulrunner.sh.in @@ -0,0 +1,62 @@ +#!/bin/sh +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +## +## Usage: +## +## $ xulrunner +## +## This script is meant to run a xulrunner program from the xulrunner +## rpm installation. +## + +cmdname=`basename $0` + +## +## Variables +## +XUL_ARCH=$(uname -m) +case $XUL_ARCH in + x86_64 | ia64 | s390 ) + XUL_LIB_DIR="/usr/lib64" + SECONDARY_LIB_DIR="/usr/lib" + ;; + * ) + XUL_LIB_DIR="/usr/lib" + SECONDARY_LIB_DIR="/usr/lib64" + ;; +esac + +if [ ! -x $XUL_LIB_DIR/xulrunner/xulrunner ]; then + if [ ! -x $SECONDARY_LIB_DIR/xulrunner/xulrunner ]; then + echo "Error: $XUL_LIB_DIR/xulrunner/xulrunner not found" + if [ -d $SECONDARY_LIB_DIR ]; then + echo " $SECONDARY_LIB_DIR/xulrunner/xulrunner not found" + fi + exit 1 + fi + XUL_LIB_DIR="$SECONDARY_LIB_DIR" +fi +XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner" +XUL_PROGRAM="$XUL_DIST_BIN/xulrunner" + +exec $XUL_PROGRAM "$@" diff --git a/SPECS/xulrunner.spec b/SPECS/xulrunner.spec new file mode 100644 index 0000000..b00a011 --- /dev/null +++ b/SPECS/xulrunner.spec @@ -0,0 +1,659 @@ +# Use system sqlite? +%define system_sqlite 1 + +# Use system nss/nspr? +%define system_nss 1 + +# Enable webm +%ifarch %{ix86} x86_64 +%define enable_webm 1 +%else +%define enable_webm 0 +%endif + +# Build as a debug package? +%define debug_build 0 + +# Do we build a final version? +%define official_branding 1 + +# Minimal required versions +%if %{?system_nss} +%define nspr_version 4.9.2 +%define nss_version 3.13.6 +%endif + +%define cairo_version 1.6.0 +%define freetype_version 2.1.9 +# gecko_dir_ver should be set to the version in our directory names +# alpha_version should be set to the alpha number if using an alpha, 0 otherwise +# beta_version should be set to the beta number if using a beta, 0 otherwise +# rc_version should be set to the RC number if using an RC, 0 otherwise +%global gecko_dir_ver %{version} +%global alpha_version 0 +%global beta_version 0 +%global rc_version 0 + +%global mozappdir %{_libdir}/%{name} + +%if %{?system_sqlite} +%define sqlite_version 3.6.22 +# The actual sqlite version (see #480989): +%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) +%endif + +%global tarballdir mozilla-esr24 +%global ext_version esr + +%if %{alpha_version} > 0 +%global pre_version a%{alpha_version} +%global pre_name alpha%{alpha_version} +%global tarballdir mozilla-aurora +%endif +%if %{beta_version} > 0 +%global pre_version b%{beta_version} +%global pre_name beta%{beta_version} +%global tarballdir mozilla-beta +%endif +%if %{rc_version} > 0 +%global pre_version rc%{rc_version} +%global pre_name rc%{rc_version} +%global tarballdir mozilla-release +%global ext_version esr +%endif +%if %{defined pre_version} +%global gecko_verrel %{expand:%%{version}}-%{pre_name} +%global pre_tag .%{pre_version} +%else +%global gecko_verrel %{expand:%%{version}} +%endif + +Summary: XUL Runtime for Gecko Applications +Name: xulrunner +Version: 24.1.0 +Release: 1%{?pre_tag}%{?dist} +URL: http://developer.mozilla.org/En/XULRunner +License: MPLv1.1 or GPLv2+ or LGPLv2+ +Group: Applications/Internet +Source0: ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{ext_version}%{?pre_version}.source.tar.bz2 +Source10: %{name}-mozconfig +Source12: %{name}-redhat-default-prefs.js +Source21: %{name}.sh.in +Source23: %{name}.1 +Source100: find-external-requires + +# Xulrunner patches +# Build patches +Patch0: xulrunner-nspr-version.patch +Patch1: mozilla-build.patch +Patch2: xulrunner-install-dir.patch +Patch3: xulrunner-webrtc-secondarch.patch +Patch16: xulrunner-2.0-chromium-types.patch +Patch17: camelia.patch +Patch20: xulrunner-24.0-jemalloc-ppc.patch + +# RHEL specific patches +Patch51: mozilla-193-pkgconfig.patch +# Solves runtime crash of yelp: +Patch54: rhbz-872752.patch +Patch55: rhbz-966424.patch + +# RHEL specific patches +Patch100: xulrunner-24.0-gcc47.patch + +# Upstream patches + +# --------------------------------------------------- + +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +%if %{?system_nss} +BuildRequires: nspr-devel >= %{nspr_version} +BuildRequires: nss-devel >= %{nss_version} +%endif +BuildRequires: libpng-devel +BuildRequires: libjpeg-devel +BuildRequires: zip +BuildRequires: bzip2-devel +BuildRequires: zlib-devel +BuildRequires: libIDL-devel +BuildRequires: gtk2-devel +BuildRequires: gnome-vfs2-devel +BuildRequires: libgnome-devel +BuildRequires: libgnomeui-devel +BuildRequires: krb5-devel +BuildRequires: pango-devel +BuildRequires: freetype-devel >= %{freetype_version} +BuildRequires: libXt-devel +BuildRequires: libXrender-devel +BuildRequires: startup-notification-devel +BuildRequires: alsa-lib-devel +BuildRequires: libnotify-devel +BuildRequires: autoconf213 +BuildRequires: mesa-libGL-devel + +Requires: liberation-fonts-common +Requires: liberation-sans-fonts + +%if %{?system_nss} +Requires: nspr >= %{nspr_version} +Requires: nss >= %{nss_version} +%endif + +# RHEL6 BuildRequires and Requires +BuildRequires: cairo-devel >= %{cairo_version} +BuildRequires: hunspell-devel +Requires: mozilla-filesystem +%if %{?system_sqlite} +BuildRequires: sqlite-devel >= %{sqlite_version} +Requires: sqlite >= %{sqlite_build_version} +%endif + +%if %{?enable_webm} +BuildRequires: libvpx-devel >= 1.0.0 +Requires: libvpx >= 1.0.0 +%endif + +Provides: gecko-libs = %{gecko_verrel} +Provides: gecko-libs%{?_isa} = %{gecko_verrel} +Conflicts: firefox < 3.6 + +%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 provides mechanisms +for installing, upgrading, and uninstalling these applications. XULRunner also +provides libxul, a solution which allows the embedding of Mozilla technologies +in other projects and products. + +%package devel +Summary: Development files for Gecko +Group: Development/Libraries +Obsoletes: mozilla-devel < 1.9 +Obsoletes: firefox-devel < 2.1 +Obsoletes: xulrunner-devel-unstable +Provides: gecko-devel = %{gecko_verrel} +Provides: gecko-devel%{?_isa} = %{gecko_verrel} +Provides: gecko-devel-unstable = %{gecko_verrel} +Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} + +Requires: xulrunner = %{version}-%{release} +%if %{?system_nss} +Requires: nspr-devel >= %{nspr_version} +Requires: nss-devel >= %{nss_version} +%endif +Requires: libjpeg-devel +Requires: zip +Requires: bzip2-devel +Requires: zlib-devel +Requires: libIDL-devel +Requires: gtk2-devel +Requires: gnome-vfs2-devel +Requires: libgnome-devel +Requires: libgnomeui-devel +Requires: krb5-devel +Requires: pango-devel +Requires: freetype-devel >= %{freetype_version} +Requires: libXt-devel +Requires: libXrender-devel +Requires: startup-notification-devel +Requires: alsa-lib-devel +Requires: libnotify-devel +# RHEL6 specific Requires: +Requires: cairo-devel >= %{cairo_version} +Requires: hunspell-devel +Requires: sqlite-devel + +%description devel +This package contains the libraries amd header files that are needed +for writing XUL+XPCOM applications with Mozilla XULRunner and Gecko. + +#--------------------------------------------------------------------- +# Override internal dependency generator to avoid showing libraries provided by this package +# in dependencies: +AutoProv: 0 +%define _use_internal_dependency_generator 0 +%define __find_requires %{SOURCE100} + +%prep +%setup -q -c +cd %{tarballdir} + +sed -e 's/__RH_NSPR_VERSION__/%{nspr_version}/' %{P:%%PATCH0} > version.patch +%{__patch} -p2 -b --suffix .nspr --fuzz=0 < version.patch + +%patch1 -p1 -b .build +%patch2 -p1 +%patch3 -p2 -b .webrtc-secondarch + +%patch16 -p2 -b .chromium-types +%patch17 -p1 -b .camelia +%patch20 -p2 -b .jemalloc-ppc + +%patch51 -p2 -b .pk +%patch54 -p2 -b .embedlink +%patch55 -p1 -b .973720 + +%patch100 -p2 -b .gcc-4.7 + +%{__rm} -f .mozconfig +%{__cp} %{SOURCE10} .mozconfig + +%if %{?system_nss} +echo "ac_add_options --with-system-nspr" >> .mozconfig +echo "ac_add_options --with-system-nss" >> .mozconfig +%else +echo "ac_add_options --without-system-nspr" >> .mozconfig +echo "ac_add_options --without-system-nss" >> .mozconfig +%endif + +%if %{?system_sqlite} +echo "ac_add_options --enable-system-sqlite" >> .mozconfig +%else +echo "ac_add_options --disable-system-sqlite" >> .mozconfig +%endif + +%if %{?enable_webm} +echo "ac_add_options --with-system-libvpx" >> .mozconfig +echo "ac_add_options --enable-webm" >> .mozconfig +echo "ac_add_options --enable-webrtc" >> .mozconfig +echo "ac_add_options --enable-ogg" >> .mozconfig +%else +echo "ac_add_options --without-system-libvpx" >> .mozconfig +echo "ac_add_options --disable-webm" >> .mozconfig +echo "ac_add_options --disable-webrtc" >> .mozconfig +echo "ac_add_options --disable-ogg" >> .mozconfig +%endif + +%ifnarch %{ix86} x86_64 +echo "ac_add_options --disable-methodjit" >> .mozconfig +echo "ac_add_options --disable-monoic" >> .mozconfig +echo "ac_add_options --disable-polyic" >> .mozconfig +echo "ac_add_options --disable-tracejit" >> .mozconfig +%endif + +# RHEL 6 mozconfig changes: +echo "ac_add_options --enable-system-hunspell" >> .mozconfig +echo "ac_add_options --enable-libnotify" >> .mozconfig +echo "ac_add_options --enable-startup-notification" >> .mozconfig +echo "ac_add_options --enable-jemalloc" >> .mozconfig + +# s390(x) fails to start with jemalloc enabled +%ifarch s390 s390x +echo "ac_add_options --disable-jemalloc" >> .mozconfig +%endif + +# Debug build flags +%if %{?debug_build} +echo "ac_add_options --enable-debug" >> .mozconfig +echo "ac_add_options --disable-optimize" >> .mozconfig +%else +echo "ac_add_options --disable-debug" >> .mozconfig +echo "ac_add_options --enable-optimize" >> .mozconfig +%endif + +#--------------------------------------------------------------------- + +%build +%if %{?system_sqlite} +# Do not proceed with build if the sqlite require would be broken: +# make sure the minimum requirement is non-empty, ... +sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 +# ... and that major number of the computed build-time version matches: +case "%{sqlite_build_version}" in + "$sqlite_version"*) ;; + *) exit 1 ;; +esac +%endif + +cd %{tarballdir} + +# Mozilla builds with -Wall with exception of a few warnings which show up +# everywhere in the code; so, don't override that. +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | %{__sed} -e 's/-Wall//') +%if %{?debug_build} +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') +%endif +%ifarch s390 +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') +%endif +%ifarch s390 %{arm} ppc +MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +%endif + +export CFLAGS=$MOZ_OPT_FLAGS +export CXXFLAGS=$MOZ_OPT_FLAGS +export LDFLAGS=$MOZ_LINK_FLAGS + +export PREFIX='%{_prefix}' +export LIBDIR='%{_libdir}' + +MOZ_SMP_FLAGS=-j1 +%ifnarch ppc ppc64 s390 s390x +[ -z "$RPM_BUILD_NCPUS" ] && \ + RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" +[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 +[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 +[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 +%endif + +make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" + +#--------------------------------------------------------------------- + +%install +cd %{tarballdir} +%{__rm} -rf $RPM_BUILD_ROOT + +DESTDIR=$RPM_BUILD_ROOT make -C objdir install STAGE_SDK=1 + +# set up our default preferences +%{__cat} %{SOURCE12} | %{__sed} -e 's,RPM_VERREL,%{version}-%{release},g' > rh-default-prefs +%{__install} -p -D -m 644 rh-default-prefs $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-redhat.js +%{__rm} rh-default-prefs + +# Start script install +%{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} +%{__cat} %{SOURCE21} | %{__sed} -e 's,XULRUNNER_VERSION,%{gecko_dir_ver},g' > \ + $RPM_BUILD_ROOT%{_bindir}/%{name} +%{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/%{name} + +%{__rm} -f $RPM_BUILD_ROOT%{mozappdir}/%{name}-config + +# Copy pc files (for compatibility with 1.9.1) +%{__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 + +# Fix multilib devel conflicts... +%ifarch x86_64 ia64 s390x ppc64 +%define mozbits 64 +%else +%define mozbits 32 +%endif + +function install_file() { +genheader=$* +mv ${genheader}.h ${genheader}%{mozbits}.h +cat > ${genheader}.h << EOF +/* This file exists to fix multilib conflicts */ +#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) +#include "${genheader}64.h" +#else +#include "${genheader}32.h" +#endif +EOF +} + +INTERNAL_APP_NAME=%{name}-%{gecko_dir_ver} + +# Install 32 and 64 bit headers separatelly due to multilib conflicts: +pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME} +install_file "mozilla-config" +popd + +pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME} +install_file "js-config" +popd + +# Link libraries in sdk directory instead of copying them: +pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/lib +for i in *.so; do + rm $i + ln -s %{mozappdir}/$i $i +done +popd + +# Library path +LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d +LD_CONF_FILE=xulrunner-%{mozbits}.conf + +%{__mkdir_p} ${RPM_BUILD_ROOT}${LD_SO_CONF_D} +%{__cat} > ${RPM_BUILD_ROOT}${LD_SO_CONF_D}/${LD_CONF_FILE} << EOF +%{mozappdir} +EOF + +# Copy over the LICENSE +%{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir} + +# Use the system hunspell dictionaries for RHEL6+ +%{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries +ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries + +# Remove tmp files +find $RPM_BUILD_ROOT/%{mozappdir} -name '.mkdir.done' -exec rm -rf {} \; + +# ghost files +%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/components +touch $RPM_BUILD_ROOT%{mozappdir}/components/compreg.dat +touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat + +#--------------------------------------------------------------------- + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +#--------------------------------------------------------------------- + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%preun +# is it a final removal? +if [ $1 -eq 0 ]; then + %{__rm} -rf %{mozappdir}/components +fi + +%files +%defattr(-,root,root,-) +%{_bindir}/xulrunner +%dir %{mozappdir} +%doc %attr(644, root, root) %{mozappdir}/LICENSE +%doc %attr(644, root, root) %{mozappdir}/README.xulrunner +%{mozappdir}/chrome +%{mozappdir}/chrome.manifest +%dir %{mozappdir}/components +%ghost %{mozappdir}/components/compreg.dat +%ghost %{mozappdir}/components/xpti.dat +%{mozappdir}/components/*.so +%{mozappdir}/components/*.manifest +%{mozappdir}/defaults +%{mozappdir}/omni.ja +%{mozappdir}/*.so +%{mozappdir}/mozilla-xremote-client +%{mozappdir}/run-mozilla.sh +%{mozappdir}/xulrunner +%{mozappdir}/xulrunner-stub +%{mozappdir}/platform.ini +%{mozappdir}/dependentlibs.list +%{_sysconfdir}/ld.so.conf.d/xulrunner*.conf +%{mozappdir}/dictionaries +%{mozappdir}/plugin-container +%if !%{?system_nss} +%{mozappdir}/*.chk +%endif + +%files devel +%defattr(-,root,root,-) +%dir %{_libdir}/%{name}-devel-* +%{_datadir}/idl/%{name}*%{gecko_dir_ver} +%{_includedir}/%{name}*%{gecko_dir_ver} +%{_libdir}/%{name}-devel-*/* +%{_libdir}/pkgconfig/*.pc +%{mozappdir}/xpcshell +%{mozappdir}/js-gdb.py +%ghost %{mozappdir}/js-gdb.pyc +%ghost %{mozappdir}/js-gdb.pyo + +#--------------------------------------------------------------------- + +%changelog +* Wed Nov 6 2013 Martin Stransky - 24.1.0-1 +- Update to 24.1.0 ESR + +* Wed Oct 23 2013 Martin Stransky - 24.0-1 +- Update to 24.0 ESR + +* Thu Sep 12 2013 Jan Horak - 17.0.9-1 +- Update to 17.0.9 ESR + +* Wed Sep 4 2013 Jan Horak - 17.0.8-5 +- Fixed mozbz#633001 - Cannot open ipv6 address with self-signed certificate + +* Tue Sep 3 2013 Martin Stransky - 17.0.8-4 +- Fixed rhbz#818636 - Firefox allows install of addons, + disregarding xpinstall.enabled flag set as false. + +* Tue Aug 6 2013 Martin Stransky - 17.0.8-3 +- Update to 17.0.8 ESR Build 2 + +* Thu Aug 1 2013 Martin Stransky - 17.0.8-2 +- Added fix for rhbz#990921 - firefox does not build with + required nss/nspr + +* Wed Jul 31 2013 Martin Stransky - 17.0.8-1 +- Update to 17.0.8 ESR + +* Thu Jun 20 2013 Jan Horak - 17.0.7-1 +- Update to 17.0.7 ESR + +* Tue Jun 18 2013 Jan Horak - 17.0.6-2 +- Fixed launch script, rhbz#974006 +- Fixed problems with addon installation, rhbz#973720 + +* Fri May 17 2013 Jan Horak - 17.0.6-1 +- Update to 17.0.6 ESR + +* Tue Apr 2 2013 Jan Horak - 17.0.5-1 +- Update to 17.0.5 ESR + +* Wed Mar 13 2013 Martin Stransky - 17.0.4-1 +- Update to 17.0.4 ESR +- Added fix for mozbz#239254 - [Linux] Support disk cache on a local path +- Use an official firefox tarball + +* Tue Jan 15 2013 Martin Stransky - 17.0.2-3 +- Added fix for NM regression (mozbz#791626) + +* Fri Jan 11 2013 Martin Stransky - 17.0.2-2 +- Added fix for rhbz#816234 - NFS fix + +* Thu Jan 10 2013 Jan Horak - 17.0.2-1 +- Update to 17.0.2 ESR + +* Thu Dec 20 2012 Jan Horak - 17.0.1-1 +- Update to 17.0.1 ESR + +* Mon Nov 19 2012 Martin Stransky 17.0-1 +- Update to 17.0 ESR + +* Thu Nov 8 2012 Martin Stransky 17.0-0.6.b5 +- Update to 17 Beta 5 +- Updated fix for rhbz#872752 - embeded crash + +* Tue Nov 6 2012 Martin Stransky 17.0-0.5.b4 +- Added fix for rhbz#872752 - embeded crash + +* Thu Nov 1 2012 Martin Stransky 17.0-0.4.b4 +- Update to 17 Beta 4 + +* Wed Oct 24 2012 Martin Stransky 17.0-0.3.b3 +- Update to 17 Beta 3 +- Updated ppc(64) patch (mozbz#746112) + +* Wed Oct 24 2012 Martin Stransky 17.0-0.2.b2 +- Built with system nspr/nss + +* Fri Oct 19 2012 Martin Stransky 17.0-0.1.b2 +- Update to 17 Beta 2 + +* Wed Oct 10 2012 Martin Stransky 17.0-0.1.b1 +- Update to 17 Beta 1 + +* Sat Aug 25 2012 Jan Horak - 10.0.7-1 +- Update to 10.0.7 ESR + +* Thu Aug 16 2012 Martin Stransky 10.0.6-2 +- Added fix for rhbz#770276 - Firefox segfaults, should + have a font dependency + +* Sat Jul 14 2012 Martin Stransky 10.0.6-1 +- Update to 10.0.6 ESR + +* Tue Jun 26 2012 Martin Stransky 10.0.5-3 +- Added fix for rhbz#808136 (mozbz#762301) + +* Tue Jun 12 2012 Martin Stransky 10.0.5-2 +- Enabled WebM (rhbz#798880) + +* Fri Jun 1 2012 Martin Stransky 10.0.5-1 +- Update to 10.0.5 ESR + +* Tue May 29 2012 Martin Stransky 10.0.4-2 +- Added patch for mozbz#703633 + +* Sat Apr 21 2012 Martin Stransky 10.0.4-1 +- Update to 10.0.4 ESR + +* Wed Apr 18 2012 Martin Stransky 10.0.3-3 +- Fixed mozbz#746112 - ppc(64) freeze + +* Mon Apr 2 2012 Kai Engert 10.0.3-2 +- Fixed mozbz#681937 + +* Mon Mar 5 2012 Martin Stransky 10.0.3-1 +- Update to 10.0.3 ESR + +* Thu Feb 16 2012 Jan Horak - 10.0.1-2 +- Fixed mozbz#727401 + +* Thu Feb 9 2012 Jan Horak - 10.0.1-1 +- Update to 10.0.1 ESR + +* Tue Feb 7 2012 Martin Stransky 10.0-5 +- Update to 10.0 ESR + +* Sun Jan 29 2012 Martin Stransky 10.0-4 +- Update to 10.0 + +* Thu Jan 19 2012 Martin Stransky 10.0-0.3.b5 +- Update to 10.0 beta 5 + +* Wed Jan 18 2012 Martin Stransky 10.0-0.2.b4 +- Update to 10.0 beta 4 + +* Thu Jan 12 2012 Jan Horak - 10.0-0.1.b3 +- Update to 10.0 beta 3 + +* Tue Jan 3 2012 Jan Horak - 9.0.1-1 +- Update to 9.0.1 + +* Mon Nov 21 2011 Martin Stransky 8.0-6 +- Updated to 8.0 + +* Fri Oct 14 2011 Martin Stransky 8.0-5 +- Updated to 8.0 Beta 3 + +* Tue Oct 11 2011 Martin Stransky 8.0-4 +- Added gtkmozembed patch + +* Fri Oct 7 2011 Martin Stransky 8.0-3 +- Updated to 8.0 Beta 2 + +* Mon Oct 3 2011 Martin Stransky 8.0-2 +- Updated to 8.0 Beta 1 + +* Mon Sep 26 2011 Martin Stransky 7.0-7 +- Updated to 7.0 + +* Mon Sep 19 2011 Jan Horak - 7.0-6.b6 +- Updated to 7.0 Beta 6 +- Added fix for mozbz#674522: s390x javascript freeze fix + +* Wed Sep 14 2011 Martin Stransky 7.0-2.b5 +- Updated to 7.0 Beta 5 + +* Fri Sep 2 2011 Martin Stransky 7.0-1.b4 +- Updated to 7.0 Beta 4 +- Added ability to build with in-tree nss +