# Maintainer: jc_gargma # Maintainer (Arch): Jan Alexander Steffens (heftig) # Contributor: Aqua-sama # Contributor (Arch): Ionut Biru # Contributor (Arch): Jakub Schmidtke # # I maintain this because: # Arch version uses eme # Arch version uses git # Arch version uses python2 # Arch version doesn't use alsa # Arch version requires signed addons # Arch version doesn't remove system addons # Arch version lacks privacy and security by default # Arch version enables debug symbols pkgname=firefox pkgver=65.0.2 bz2ver=$(echo $pkgver | sed 's/\./_/g') pkgrel=1 pkgdesc="Standalone web browser from mozilla.org" arch=(x86_64) license=(MPL GPL LGPL) url="https://www.mozilla.org/firefox/" depends=(gtk3 mozilla-common libxt startup-notification mime-types dbus-glib ffmpeg nss ttf-font alsa-lib sqlite libvpx icu) makedepends=(unzip zip diffutils python-setuptools yasm mesa imake inetutils xorg-server-xvfb autoconf2.13 rust clang llvm gtk2 python nodejs python-psutil cbindgen nasm) optdepends=('networkmanager: Location detection via available WiFi networks' 'libnotify: Notification integration' 'speech-dispatcher: Text-to-Speech' 'hunspell-en_CA: Spell checking, Canadian English') options=(!emptydirs !makeflags) source=($pkgname-$pkgver.tar.bz2::https://hg.mozilla.org/releases/mozilla-release/archive/FIREFOX_${bz2ver}_RELEASE.tar.bz2 $pkgname.desktop $pkgname-symbolic.svg vendor.js pgo-1.patch pgo-2.patch moz.configure.diff package-manifest.diff) sha256sums=('e54b21b0faf56650461d39bb27352db2d3a09da5ee0f44d4e9abc8d91f04269b' '677e1bde4c6b3cff114345c211805c7c43085038ca0505718a11e96432e9811a' '9a1a572dc88014882d54ba2d3079a1cf5b28fa03c5976ed2cb763c93dabbd797' 'ea197946151c66f5454fa222c94afa222ad9907a1e2918b563e1d5860de88baf' 'a8c15c9d54ef8b360c0932f4ccf5e74954f14e9a9c2a1ae924b6c392075b2b8c' '33a91a7e8ca702ee493f483abe93bf6917881dc4192566587bdfb103da3a2422' 'ad8a270e1b2affb098440f82517c3952207b28ebf604fef695dad3e29a5ba30e' '927e400d6920b98d2fe7db2b6498f195135909a76e0da49441223956364d8227') prepare() { # mkdir mozbuild cd mozilla-release-FIREFOX_${bz2ver}_RELEASE # Apply pgo patches patch -p0 $srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/security/sandbox/linux/moz.build $srcdir/pgo-1.patch patch -p0 $srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/extensions/spellcheck/src/moz.build $srcdir/pgo-2.patch cat >$srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/.mozconfig <$srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/build/mozconfig.common.override <> browser/themes/shared/incontentprefs/preferences.inc.css # Hide plugindeprecation-notice echo "#plugindeprecation-notice { display: none !important; }" >> toolkit/mozapps/extensions/content/extensions.css # Hide warnings on unsigned extensions echo ".warning{display: none!important; } .addon[notification=warning]{background-image: none!important;}" >> toolkit/mozapps/extensions/content/extensions.css } build() { cd mozilla-release-FIREFOX_${bz2ver}_RELEASE # mkdir --parents $srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/obj-x86_64-pc-linux-gnu/dist/bin/browser/features # mkdir --parents $srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/extensions/webcompat-reporter/locales # mkdir --parents $srcdir/mozilla-release-FIREFOX_${bz2ver}_RELEASE/obj-x86_64-pc-linux-gnu/services/sync/locales export MOZ_NOSPAM=1 export MOZBUILD_STATE_PATH="$srcdir/mozbuild" # LTO needs more open files ulimit -n 4096 xvfb-run -a -n 97 -s "-screen 0 1600x1200x24" ./mach build ./mach buildsymbols } package() { cd mozilla-release-FIREFOX_${bz2ver}_RELEASE DESTDIR="$pkgdir" ./mach install install -Dm644 "$srcdir/vendor.js" "$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" _distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini" install -Dm644 /dev/stdin "$_distini" <