# Maintainer (Arch:firefox): Jan Alexander Steffens (heftig) # Contributor (Arch:firefox): Ionut Biru # Contributor (Arch:firefox): Jakub Schmidtke # Contributor (ConnochaetOS): Henry Jensen # Maintainer: Andreas Grapentin # Maintainer: Luke Shumaker # Contributor: André Silva # Contributor: Márcio Silva # Contributor: fauno # Contributor: vando # Contributor: Figue # Contributor: taro-k # Contributor: Michał Masłowski # Contributor: Luke R. # Contributor: Isaac David # Contributor: bill-auger # Contributor: evr # Contributor: Muhammad 'MJ' Jassim # Rational for inclusion in [libre]: # - Modify the addons pages to use GNU IceCat plugins sources, rather # than addons.mozilla.org, which hosts non-free addons. # - Disable EME, which is implemented via the non-free libWideVine # CDM. # # The above changes cause us to run afoul of the Firefox trademark # policy[1], so making those changes also requires us to: # - Rebrand to Iceweasel # # While we're at it, while not strictly nescessary for FSDG # compliance: # - Remove Google API keys and usage # - Disable Mozilla telemetry and crash reporting (good manners # because of all of the other patching we're doing # - keep using a bunch of system libs # # [1]: https://www.mozilla.org/en-US/foundation/trademarks/policy/ pkgname=iceweasel replaces=('firefox') epoch=1 pkgver=66.0.3 pkgrel=1 pkgrel+=.parabola1 _brandingver=66.0 _brandingrel=1 pkgdesc="Libre standalone web browser based on Mozilla Firefox" arch=(x86_64) arch+=(i686 armv7h) license=(MPL GPL LGPL) url="https://wiki.parabola.nu/$pkgname" depends=(gtk3 mozilla-common libxt startup-notification mime-types dbus-glib ffmpeg nss ttf-font libpulse sqlite icu) makedepends=(unzip zip diffutils python2-setuptools yasm mesa imake inetutils xorg-server-xvfb autoconf2.13 rust clang llvm jack gtk2 python nodejs python2-psutil cbindgen nasm) makedepends+=(mozilla-searchplugins quilt libxslt imagemagick) optdepends=('networkmanager: Location detection via available WiFi networks' 'libnotify: Notification integration' 'pulseaudio: Audio support' 'speech-dispatcher: Text-to-Speech' 'hunspell-en_US: Spell checking, American English') options=(!emptydirs !makeflags !debug) source=("https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz"{,.asc} 0001-bz-1468911.patch $pkgname.desktop https://repo.parabola.nu/other/iceweasel/${pkgname}_${_brandingver}-${_brandingrel}.branding.tar.xz{,.sig} libre-searchengines.patch libre.patch arm.patch build-arm-libopus.patch) sha256sums=('1fe4cfe4f4afce8d5532da8f36a48c333750c90a6ee67167309357edf514c22a' 'SKIP' '821f858bac2e13ce02b8c20d5387d4ecc8ab2d0e4ebe0a517cbf935da6aeb31b' 'e439117380218898cd5c60a8da8947847efbd0fe64cc06b129d6ca20a392cb3d' 'ffac6b832ba2f80ac0682aa5ee88006b7033543b8be89fc17deec30b1b2c4d12' 'SKIP' '52213bdc0078b83dcaf34d04316309504acefe8bfc9b4c0a1f69e0b1f5458e4d' 'a315507efe495ba55ab4ae52b1e2b3a0c1e7ac54b7ed976899da1dcd03532f95' '2c9e39b9b62d5a75e31908cb4d42ff8006ff9406aed2f7deff826fe1466cd31a' '2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9') validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353' # Mozilla Software Releases 'BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin prepare() { mkdir mozbuild cd firefox-$pkgver # https://bugzilla.mozilla.org/show_bug.cgi?id=1521249 patch -Np1 -i ../0001-bz-1468911.patch cat >.mozconfig <> .mozconfig <> .mozconfig < browser/base/content/newtab/newTab.xhtml # Load our searchplugins patch -Np1 -i "$srcdir/libre-searchengines.patch" rm -rvf -- browser/components/search/searchplugins/{*.xml,images/} cp -av -- /usr/lib/mozilla/searchplugins/* browser/components/search/searchplugins/ # Disable various components at the source level sed -i 's/;1/;0/' toolkit/components/telemetry/TelemetryStartup.manifest #sed -i 's/;1/;0/' browser/experiments/Experiments.manifest #sed -i '/pocket/d' browser/extensions/moz.build #sed -i '/activity-stream/d' browser/extensions/moz.build } build() { cd firefox-$pkgver export MOZ_NOSPAM=1 export MOZBUILD_STATE_PATH="$srcdir/mozbuild" if [[ $CARCH = armv7h ]]; then export RUSTFLAGS+=" -Cdebuginfo=0" export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" fi if [[ $CARCH = i686 ]]; then export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off" export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" fi # LTO needs more open files ulimit -n 4096 if [[ $CARCH == x86_64 ]]; then xvfb-run -a -n 97 -s "-screen 0 1600x1200x24" ./mach build else ./mach build fi ./mach buildsymbols } package() { local _icu_ver _icu_ver=$(pacman -S --print-format='%v' icu) depends+=("icu>=${_icu_ver}" "icu<$((${_icu_ver%%.*} + 1))") cd firefox-$pkgver DESTDIR="$pkgdir" ./mach install find . -name '*crashreporter-symbols-full.zip' -exec cp -fvt "$startdir" {} + _vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" install -Dm644 /dev/stdin "$_vendorjs" <> "$_vendorjs" <