summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authornikatar2018-06-06 20:36:18 +0300
committernikatar2018-06-06 20:36:18 +0300
commita3bd9e45ea83c9747a98b10be4c231325d0dd6ce (patch)
treec2bb26a7c5347442c9939a4b1663647380f40d9c /PKGBUILD
downloadaur-a3bd9e45ea83c9747a98b10be4c231325d0dd6ce.tar.gz
60.0.1-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD197
1 files changed, 197 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1a85eb48edf0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,197 @@
+# $Id$
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Contributor: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Jakub Schmidtke <sjakub@gmail.com>
+# Additional patching: Nikita Tarasov <nikatar@disroot.org>
+
+_pkgname=firefox
+pkgname=firefox-appmenu
+pkgver=60.0.1
+pkgrel=1
+pkgdesc="Firefox from extra with appmenu patch"
+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 hunspell sqlite ttf-font libpulse libvpx icu)
+makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb
+ autoconf2.13 rust mercurial clang llvm jack gtk2)
+optdepends=('networkmanager: Location detection via available WiFi networks'
+ 'libnotify: Notification integration'
+ 'pulseaudio: Audio support'
+ 'speech-dispatcher: Text-to-Speech')
+provides=("firefox=$pkgver")
+conflicts=("firefox")
+options=(!emptydirs !makeflags !strip)
+_repo=https://hg.mozilla.org/mozilla-unified
+source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_RELEASE"
+ unity-menubar.patch.tar.xz
+ complete-csd-window-offset-mozilla-1457691.patch.xz
+ 0001-Bug-1435212-Add-support-for-FFmpeg-4.0.-r-bryce.patch.xz
+ $_pkgname.desktop firefox-symbolic.svg
+ no-crmf.diff)
+sha256sums=('SKIP'
+ '3fd0f41b3ec5fe524a2b24089e1493a9a41167702a6208d1571c1cf28d23df72'
+ 'a3fb3c3b6fb775c99afdbad507848b77c5e4bbaac2e8ceeb1bfb47699c4b6268'
+ '8422030440032535d918844263fbd92d39bff207acb5fff55ed0afee38bcf582'
+ '2adca824b52ab5bc6e7e4fa486c1ecb47d283832bd4b75d10494b033f1cab911'
+ '9a1a572dc88014882d54ba2d3079a1cf5b28fa03c5976ed2cb763c93dabbd797'
+ '02000d185e647aa20ca336e595b4004bb29cdae9d8f317f90078bdcc7a36e873')
+
+# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
+# Note: These are for Arch Linux use ONLY. For your own distribution, please
+# get your own set of keys. Feel free to contact foutrelis@archlinux.org for
+# more information.
+_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
+
+# Mozilla API keys (see https://location.services.mozilla.com/api)
+# Note: These are for Arch Linux use ONLY. For your own distribution, please
+# get your own set of keys. Feel free to contact heftig@archlinux.org for
+# more information.
+_mozilla_api_key=16674381-f021-49de-8622-3021c5942aff
+
+prepare() {
+ mkdir path
+ ln -s /usr/bin/python2 path/python
+
+ cd mozilla-unified
+
+ # actual appmenu patch from ubuntu repos
+ patch -Np1 -i ../unity-menubar.patch
+
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1283299#c158
+ patch -Np1 -i ../complete-csd-window-offset-mozilla-1457691.patch
+
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1435212
+ patch -Np1 -i ../0001-Bug-1435212-Add-support-for-FFmpeg-4.0.-r-bryce.patch
+
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1371991
+ patch -Np1 -i ../no-crmf.diff
+
+ echo -n "$_google_api_key" >google-api-key
+ echo -n "$_mozilla_api_key" >mozilla-api-key
+
+ cat >.mozconfig <<END
+ac_add_options --enable-application=browser
+
+ac_add_options --prefix=/usr
+ac_add_options --enable-release
+ac_add_options --enable-gold
+ac_add_options --enable-pie
+ac_add_options --enable-optimize="-O2"
+ac_add_options --enable-rust-simd
+
+# Branding
+ac_add_options --enable-official-branding
+ac_add_options --enable-update-channel=release
+ac_add_options --with-distribution-id=org.archlinux
+export MOZILLA_OFFICIAL=1
+export MOZ_TELEMETRY_REPORTING=1
+export MOZ_ADDON_SIGNING=1
+export MOZ_REQUIRE_SIGNING=1
+
+# Keys
+ac_add_options --with-google-api-keyfile=${PWD@Q}/google-api-key
+ac_add_options --with-mozilla-api-keyfile=${PWD@Q}/mozilla-api-key
+
+# System libraries
+ac_add_options --with-system-zlib
+ac_add_options --with-system-bz2
+ac_add_options --with-system-icu
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-libvpx
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --enable-system-hunspell
+ac_add_options --enable-system-sqlite
+ac_add_options --enable-system-ffi
+
+# Features
+ac_add_options --enable-alsa
+ac_add_options --enable-jack
+ac_add_options --enable-startup-notification
+ac_add_options --enable-crashreporter
+ac_add_options --disable-updater
+END
+}
+
+build() {
+ cd mozilla-unified
+
+ # _FORTIFY_SOURCE causes configure failures
+ CPPFLAGS+=" -O2"
+
+ export PATH="$srcdir/path:$PATH"
+ export MOZ_SOURCE_REPO="$_repo"
+
+ # Do PGO
+ #xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \
+ # MOZ_PGO=1 ./mach build
+ ./mach build
+ ./mach buildsymbols
+}
+
+package() {
+ cd mozilla-unified
+ 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" <<END
+// Use LANG environment variable to choose locale
+pref("intl.locale.requested", "");
+
+// Disable default browser checking.
+pref("browser.shell.checkDefaultBrowser", false);
+
+// Don't disable our bundled extensions in the application directory
+pref("extensions.autoDisableScopes", 11);
+pref("extensions.shownSelectionUI", true);
+
+// Opt all of us into e10s, instead of just 50%
+pref("browser.tabs.remote.autostart", true);
+END
+
+ _distini="$pkgdir/usr/lib/$_pkgname/distribution/distribution.ini"
+ install -Dm644 /dev/stdin "$_distini" <<END
+[Global]
+id=archlinux
+version=1.0
+about=Mozilla Firefox for Arch Linux
+
+[Preferences]
+app.distributor=archlinux
+app.distributor.channel=$_pkgname
+app.partner.archlinux=archlinux
+END
+
+ for i in 16 22 24 32 48 64 128 256; do
+ install -Dm644 browser/branding/official/default$i.png \
+ "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$_pkgname.png"
+ done
+ install -Dm644 browser/branding/official/content/about-logo.png \
+ "$pkgdir/usr/share/icons/hicolor/192x192/apps/$_pkgname.png"
+ install -Dm644 browser/branding/official/content/about-logo@2x.png \
+ "$pkgdir/usr/share/icons/hicolor/384x384/apps/$_pkgname.png"
+ install -Dm644 ../firefox-symbolic.svg \
+ "$pkgdir/usr/share/icons/hicolor/symbolic/apps/$_pkgname-symbolic.svg"
+
+ install -Dm644 ../$_pkgname.desktop \
+ "$pkgdir/usr/share/applications/$_pkgname.desktop"
+
+ # Use system-provided dictionaries
+ rm -r "$pkgdir/usr/lib/$_pkgname/dictionaries"
+ ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$_pkgname/dictionaries"
+ ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$_pkgname/hyphenation"
+
+ # Install a wrapper to avoid confusion about binary path
+ install -Dm755 /dev/stdin "$pkgdir/usr/bin/$_pkgname" <<END
+#!/bin/sh
+exec /usr/lib/$_pkgname/firefox "\$@"
+END
+
+ # Replace duplicate binary with wrapper
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=658850
+ ln -srf "$pkgdir/usr/bin/$_pkgname" \
+ "$pkgdir/usr/lib/$_pkgname/firefox-bin"
+}