# 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=68.0.1 pkgrel=1 pkgrel+=.parabola2 _brandingver=67.0 _brandingrel=2 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) depends+=(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) # FIXME: 'mozilla-serarchplugins' package needs re-working makedepends+=(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} $pkgname.desktop https://repo.parabola.nu/other/iceweasel/${pkgname}_${_brandingver}-${_brandingrel}.branding.tar.xz{,.sig} arm.patch build-arm-libopus.patch newtab.patch libre.patch searchengines.patch) # FIXME: branding tarball needs re-working source+=(aboutlogins.svg) sha256sums=('6037f77bdab29d79ca5e3fbd1d32f6c209e09d2066189a13dc7f7491227f5568' 'SKIP' 'e439117380218898cd5c60a8da8947847efbd0fe64cc06b129d6ca20a392cb3d' '0151b49e9f5d3bdce64ac0854d84fa5157a65df2d7e16eb683366cbeee021805' 'SKIP' '2bb1f6b9b66a00f4f98eb5cdb2f25972018efe042153503cbc8c494780d7225e' '2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9' '294c88a7aa970f63c44dcb15cd0be12f73679b446804846825a16e4fb4a5d40f' '783e1b7c2f6f8719cc8a0751aacc823a5029c2326ac0b5ff7c659d831e286387' 'dfed11d97f1d4198a3dc608be159b6b53a11054f376cdb73bb0fe9a487ae9418') sha256sums+=('SKIP') validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353' # Mozilla Software Releases 'BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin prepare() { [[ -d mozbuild ]] && rm -rf mozbuild mkdir mozbuild cd firefox-$pkgver cat >.mozconfig <> .mozconfig <> .mozconfig </ # local _remove_engines_sed='s|.*oogle.*| "ddg", "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-labs", "parabola-packages", "parabola-wiki-en", "searx", "wikipedia", "yacy"|g' local _remove_engines_sed='s|.*oogle.*| "ddg", "wikipedia"|g' local _search_config_file=browser/components/search/extensions/list.json patch -Np1 -i "$srcdir/searchengines.patch" sed -i "${_remove_engines_sed}" ${_search_config_file} # Sanity-check search-engines patching _removed_engines_regex='Bing|Google|Seznam|Twitter|Yahoo|Yandex|Яндекс|amazon|bing|google|ebay|twitter' _err_msg="search-engines patch needs re-working" ! grep -E ${_removed_engines_regex} ${_search_config_file} > /dev/null || ! echo "${_err_msg}" } 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" <