From 8378fcc076b44e46203e9fc1a50d57bac73a1d8c Mon Sep 17 00:00:00 2001 From: ohfp <1813007-ohfp@users.noreply.gitlab.com> Date: Fri, 6 Mar 2020 21:17:06 +0100 Subject: Partial rewrite of build process Switching to an Arch based build process for easier maintenance and using specific runners for tasks where that might be necessary. Right now, parent/child pipelines for somewhat parallel builds for different architectures / semi-independent pak-builds don't seem to properly work yet due to `trigger:` not being recognized when it should, so that's not yet implemented. --- PKGBUILD | 276 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 PKGBUILD (limited to 'PKGBUILD') diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..30eb67f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,276 @@ +# Maintainer: lsf +# Contributor: Jan Alexander Steffens (heftig) +# Contributor: Ionut Biru +# Contributor: Jakub Schmidtke + +pkgname=librewolf +_pkgname=LibreWolf +pkgver=73.0.1 +pkgrel=1 +pkgdesc="Community-maintained fork of Librefox: a privacy and security-focused browser" +arch=(x86_64 aarch64) +license=(MPL GPL LGPL) +url="https://LibreWolf.gitlab.io" +depends=(gtk3 libxt startup-notification mime-types dbus-glib ffmpeg nss + ttf-font libpulse) +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 git binutils) +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 !strip) +install='librewolf.install' +source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz + $pkgname.desktop + $pkgname.cfg.patch + "git+https://gitlab.com/${pkgname}-community/browser/common.git" + "git+https://gitlab.com/${pkgname}-community/settings.git") +sha256sums=('53415180e74da60fc91700ce1ff33bf5b6f51e65353017a98270899a08e0c3d2' + '0471d32366c6f415f7608b438ddeb10e2f998498c389217cdd6cc52e8249996b' + 'e03332f0e865949df5af9c231a364e9e1068fca0439621b98c2d4160d93e674f' + 'SKIP' + 'SKIP') + +if [[ $CARCH == 'aarch64' ]]; then + source+=(arm.patch + https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/master/extra/firefox/build-arm-libopus.patch) + sha256sums+=('6ca87d2ac7dc48e6f595ca49ac8151936afced30d268a831c6a064b52037f6b7' + '2d4d91f7e35d0860225084e37ec320ca6cae669f6c9c8fe7735cdbd542e3a7c9') +fi + +prepare() { + _POCKET_SED_STRING="s/'pocket'/#'pocket'/g" + # this one only to remove an annoying error message: + _POCKET_SED_STRING_2='s#SaveToPocket.init();#// SaveToPocket.init();#g' + _POCKET_FILE=./browser/components/moz.build + _POCKET_FILE_2=./browser/components/BrowserGlue.jsm + + mkdir mozbuild + cd firefox-$pkgver + + # NOTE: + # unlock some prefs I deem worthy of keeping unlocked or slightly less restricted + # (with librewolf installed systemwide, you'd otherwise always have to sudo around in /usr/lib) + # it mainly keeps addon update / install settings / urls unlocked + # as well as form fill settings + # uncomment it if you are OK with a slight potential decrease in privacy, + # or even better: check what I'm doing there. + + cd ${srcdir}/settings + patch -Np1 -i ${srcdir}/${pkgname}.cfg.patch + rm -f librewolf.cfg.orig + cd ${srcdir}/firefox-$pkgver + + cat >../mozconfig <>../mozconfig <.mozconfig ../mozconfig - <.mozconfig ../mozconfig - <.mozconfig ../mozconfig +fi + + ./mach build + + echo "Building symbol archive..." + ./mach buildsymbols +} + +package() { + cd firefox-$pkgver + DESTDIR="$pkgdir" ./mach install + + # also create regular tarball for non-distro-specific packaging + ./mach package + + local vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" + install -Dvm644 /dev/stdin "$vendorjs" < Date: Fri, 6 Mar 2020 21:38:26 +0100 Subject: temporarily disable custom config/patches during build Some changes should be discussed before being integrated in the main LibreWolf releases, so they're disabled for the time being. --- PKGBUILD | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'PKGBUILD') diff --git a/PKGBUILD b/PKGBUILD index 30eb67f..1ceeb28 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -22,7 +22,7 @@ optdepends=('networkmanager: Location detection via available WiFi networks' 'speech-dispatcher: Text-to-Speech' 'hunspell-en_US: Spell checking, American English') options=(!emptydirs !makeflags !strip) -install='librewolf.install' +# install='librewolf.install' source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz $pkgname.desktop $pkgname.cfg.patch @@ -59,10 +59,10 @@ prepare() { # uncomment it if you are OK with a slight potential decrease in privacy, # or even better: check what I'm doing there. - cd ${srcdir}/settings - patch -Np1 -i ${srcdir}/${pkgname}.cfg.patch - rm -f librewolf.cfg.orig - cd ${srcdir}/firefox-$pkgver + # cd ${srcdir}/settings + # patch -Np1 -i ${srcdir}/${pkgname}.cfg.patch + # rm -f librewolf.cfg.orig + # cd ${srcdir}/firefox-$pkgver cat >../mozconfig <