Skip to content

Instantly share code, notes, and snippets.

@mariow
Created November 10, 2018 20:32
Show Gist options
  • Save mariow/b295c2f0c6dc9f274cdf324873a1d712 to your computer and use it in GitHub Desktop.
Save mariow/b295c2f0c6dc9f274cdf324873a1d712 to your computer and use it in GitHub Desktop.
PKGBUILD to update brave-bin on Arch/Manjaro to 0.56.12 kind-of-stable
# Contributor: Caleb Maclennan <[email protected]>
# Contributor: Jacob Mischka <[email protected]>
# Maintainer: Manuel Mazzuola <[email protected]>
# https://aur.archlinux.org/packages/brave-bin/
pkgname=brave-bin
pkgver=0.56.12
pkgrel=1
pkgdesc='Web browser that blocks ads and trackers by default (binary release).'
arch=('x86_64')
url='https://brave.com/download'
license=('custom')
depends=('gtk3' 'gconf' 'nss' 'alsa-lib' 'libxss' 'libgnome-keyring' 'ttf-font')
optdepends=('cups: Printer support'
'pepper-flash: Adobe Flash support')
provides=("${pkgname-bin}" 'brave-browser')
conflicts=("${pkgname-bin}")
source=("$pkgname-$pkgver.zip::https://github.com/brave/brave-browser/releases/download/v${pkgver}/brave-v${pkgver}-linux-x64.zip"
"MPL2::https://raw.githubusercontent.com/brave/brave-browser/master/LICENSE"
"$pkgname.sh"
"$pkgname.desktop"
"braveAbout.png")
options=(!strip)
sha512sums=('beaa393a4eb5cfef039e95b638489ad18cbd448b06cf88eaf4bba5ebd9db08d9fa1ee75afae7ae6e39d8a8b461187de8ecf644dbe4b7ad74bd89085b4b7ee918'
'b8823586fead21247c8208bd842fb5cd32d4cb3ca2a02339ce2baf2c9cb938dfcb8eb7b24c95225ae625cd0ee59fbbd8293393f3ed1a4b45d13ba3f9f62a791f'
'9b027e4ff5fd8b718b3f3eb2b4a78deccd5f7cfd577943b9d4a2c63031231f3ca8f892fed8c1b4f9f35d148b9656501d0f054719b24d355adcca96bb4975d947'
'400d345271a3c98be668e4aa08743d707647c92ee35951e937238ac07074119cfdb9601e1934cdf46014bd181b26ab0b568e4cab67c790efe53d029d8b0f9c55'
'd7bef52e336bd908d24bf3a084a1fc480831d27a3c80af4c31872465b6a0ce39bdf298e620ae9865526c974465807559cc75610b835e60b4358f65a8a8ff159e')
noextract=("$pkgname-$pkgver.zip")
prepare() {
mkdir -p brave
cat $pkgname-$pkgver.zip | bsdtar -xf- -C brave
chmod +x brave/brave
}
_bsdtardir="brave"
package() {
install -d -m0755 "$pkgdir/usr/lib"
cp -a --reflink=auto $_bsdtardir "$pkgdir/usr/lib/$pkgname"
install -Dm0755 "$pkgname.sh" "$pkgdir/usr/bin/brave"
install -Dm0644 -t "$pkgdir/usr/share/applications" "$pkgname.desktop"
install -Dm0644 "braveAbout.png" "$pkgdir/usr/share/pixmaps/brave.png"
install -Dm0664 -t "$pkgdir/usr/share/licenses/$pkgname" "MPL2"
mv "$pkgdir/usr/lib/$pkgname/"{LICENSE,LICENSES.chromium.html} "$pkgdir/usr/share/licenses/$pkgname"
ln -s /usr/lib/PepperFlash "$pkgdir/usr/lib/pepperflashplugin-nonfree"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment