123 lines
4.6 KiB
Bash
123 lines
4.6 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgname=librewolf
|
|
provides=($pkgname-bin $pkgname)
|
|
conflicts=($pkgname-bin)
|
|
pkgver=123.0.1
|
|
pkgrel=02
|
|
_pkgrel=1
|
|
pkgdesc="Community-maintained fork of Firefox, focused on privacy, security and freedom -binary"
|
|
options=(!emptydirs)
|
|
install=librewolf.install
|
|
makedepends=(git)
|
|
backup=('usr/lib/librewolf/librewolf.cfg'
|
|
'usr/lib/librewolf/distribution/policies.json')
|
|
options=(!emptydirs)
|
|
proj_id=44042130
|
|
url="https://gitlab.com/api/v4/projects"
|
|
weburl="https://librewolf.net/"
|
|
info_url="https://librewolf-community.gitlab.io/"
|
|
srctag="${pkgver}-${_pkgrel}"
|
|
source=($url/${proj_id}/packages/generic/${pkgname//-bin/""}/${pkgver}-${_pkgrel}/${pkgname//-bin/""}-${pkgver}-${_pkgrel}-linux-x86_64-package.tar.bz2{,.sig}
|
|
"git+https://gitlab.com/${pkgname//-bin/""}-community/browser/source.git#tag=${srctag}"
|
|
librewolf.desktop
|
|
default192x192.png
|
|
librewolf.install)
|
|
install='librewolf.install'
|
|
|
|
package() {
|
|
depends=(gtk3 libxt startup-notification mime-types dbus
|
|
nss ttf-liberation libpulse ffmpeg)
|
|
optdepends=('hunspell-en_US: Spell checking, American English'
|
|
'libnotify: Notification integration'
|
|
'speech-dispatcher: Text-to-Speech'
|
|
'xdg-desktop-portal: Screensharing with Wayland')
|
|
|
|
# Yep, that's somewhat redundant. But it works.
|
|
install -dm 755 ${pkgdir}/usr/lib/librewolf
|
|
install -dm 755 ${pkgdir}/usr/bin
|
|
cp -r "${srcdir}"/${pkgname//-bin/""}/* "${pkgdir}"/usr/lib/librewolf
|
|
|
|
cd ${srcdir}/${pkgname//-bin/""}
|
|
|
|
local vendorjs="$pkgdir/usr/lib/${pkgname//-bin/""}/browser/defaults/preferences/vendor.js"
|
|
|
|
install -Dvm644 /dev/stdin "$vendorjs" <<END
|
|
// Use system-provided dictionaries
|
|
pref("spellchecker.dictionary_path", "/usr/share/hunspell");
|
|
|
|
// Don't disable extensions in the application directory
|
|
// done in librewolf.cfg
|
|
// pref("extensions.autoDisableScopes", 11);
|
|
END
|
|
|
|
local distini="$pkgdir/usr/lib/${pkgname//-bin/""}/distribution/distribution.ini"
|
|
install -Dvm644 /dev/stdin "$distini" <<END
|
|
|
|
[Global]
|
|
id=io.gitlab.${pkgname//-bin/""}-community
|
|
version=1.0
|
|
about=LibreWolf
|
|
|
|
[Preferences]
|
|
app.distributor="LibreWolf Community"
|
|
app.distributor.channel=${pkgname//-bin/""}
|
|
app.partner.librewolf=${pkgname//-bin/""}
|
|
END
|
|
|
|
for i in 16 32 48 64 128; do
|
|
install -Dvm644 ${srcdir}/source/themes/browser/branding/${pkgname//-bin/""}/default$i.png \
|
|
"$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname//-bin/""}.png"
|
|
done
|
|
# install -Dvm644 browser/branding/librewolf/content/about-logo.png \
|
|
# "$pkgdir/usr/share/icons/hicolor/192x192/apps/$pkgname.png"
|
|
install -Dvm644 ${srcdir}/default192x192.png \
|
|
"$pkgdir/usr/share/icons/hicolor/192x192/apps/${pkgname//-bin/""}.png"
|
|
|
|
# arch upstream provides a separate svg for this. we don't have that, so let's re-use 16.png
|
|
install -Dvm644 ${srcdir}/source/themes/browser/branding/${pkgname//-bin/""}/default16.png \
|
|
"$pkgdir/usr/share/icons/hicolor/symbolic/apps/${pkgname//-bin/""}-symbolic.png"
|
|
|
|
install -Dvm644 ${srcdir}/${pkgname//-bin/""}.desktop \
|
|
"$pkgdir/usr/share/applications/${pkgname//-bin/""}.desktop"
|
|
|
|
# Install a wrapper to avoid confusion about binary path
|
|
install -Dvm755 /dev/stdin "$pkgdir/usr/bin/${pkgname//-bin/""}" <<END
|
|
#!/bin/sh
|
|
exec /usr/lib/${pkgname//-bin/""}/librewolf "\$@"
|
|
END
|
|
|
|
# Replace duplicate binary with wrapper
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
|
|
ln -srfv "$pkgdir/usr/bin/${pkgname//-bin/""}" "$pkgdir/usr/lib/${pkgname//-bin/""}/librewolf-bin"
|
|
# Use system certificates
|
|
local nssckbi="$pkgdir/usr/lib/${pkgname//-bin/""}/libnssckbi.so"
|
|
if [[ -e $nssckbi ]]; then
|
|
ln -srfv "$pkgdir/usr/lib/libnssckbi.so" "$nssckbi"
|
|
fi
|
|
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=(MPL GPL LGPL)
|
|
|
|
validpgpkeys=('662E3CDD6FE329002D0CA5BB40339DD82B12EF16') # librewolf maintainers
|
|
|
|
sha256sums=(23f36e9b2b3d9d0e4afcd3c261b16d1dd6e74a5cb87237bf054eaea9331449e7 # librewolf-123.0.1-1-linux-x86_64-package.tar.bz2
|
|
5acca02fee4a311aa7d2f7c7c173295a64af62c4bf8722524cd47fa5e6e706c8 # librewolf-123.0.1-1-linux-x86_64-package.tar.bz2.sig
|
|
SKIP # git source
|
|
7d01d317b7db7416783febc18ee1237ade2ec86c1567e2c2dd628a94cbf2f25d # librewolf.desktop
|
|
959c94c68cab8d5a8cff185ddf4dca92e84c18dccc6dc7c8fe11c78549cdc2f1 # default192x192.png
|
|
c3d94f33b96944e80b6fe84e36eaa9b4179ab144fe7aa58c5aa2efae0e2004b9) # librewolf.install
|
|
|
|
## 53aadcb932cd9aaa1f424b585332aa1fe6c493c8c9a0c48bd8dd8cabb9e6f2db librewolf-123.0.1-02-x86_64.pkg.tar.lz
|
|
|