Advertisement
Guest User

Untitled

a guest
Apr 8th, 2019
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.19 KB | None | 0 0
  1. # Contributor: Caleb Maclennan <caleb@alerque.com>
  2. # Contributor: Jacob Mischka <jacob@mischka.me>
  3. # Contributor: Manuel Mazzuola <origin.of@gmail.com>
  4. # Contributor: Simón Oroño <simonorono@protonmail.com>
  5. # Contributor: now-im <now im 627 @ gmail . com>
  6. # Contributor: Giusy Digital <kurmikon at libero dot it>
  7. # Mantainer: Andrés Rodríguez <hello@andres.codes>
  8. # https://aur.archlinux.org/packages/brave-bin/
  9.  
  10. pkgname=brave-bin
  11. pkgver=0.62.51
  12. pkgrel=2
  13. pkgdesc='Web browser that blocks ads and trackers by default (binary release).'
  14. arch=('x86_64')
  15. url='https://brave.com/download'
  16. license=('custom')
  17. depends=('gtk3' 'nss' 'alsa-lib' 'libxss' 'ttf-font')
  18. optdepends=(
  19.     'gconf: Obsolete configuration database system support'
  20.     'libgnome-keyring: GNOME keyring support'
  21.     'cups: Printer support'
  22.     'pepper-flash: Adobe Flash support')
  23. provides=("${pkgname-bin}" 'brave-browser')
  24. conflicts=("${pkgname-bin}")
  25. source=(
  26.     "$pkgname-$pkgver.zip::https://github.com/brave/brave-browser/releases/download/v${pkgver}/brave-v${pkgver}-linux-x64.zip"
  27.     "$pkgname-$pkgver.deb::https://github.com/brave/brave-browser/releases/download/v${pkgver}/brave-browser_${pkgver}_amd64.deb"
  28.     "MPL2::https://raw.githubusercontent.com/brave/brave-browser/master/LICENSE"
  29.     "$pkgname.sh"
  30.     "$pkgname.desktop"
  31.     "logo.png")
  32. options=(!strip)
  33. sha512sums=(
  34.     '51fd6ea69d1e599944745fe8a89e12a7c9b591430bb2d4aef6038edefbbb2be9c44bc0183ceb5292b32c5b7e1e64a37bfe80c37dafde1bef372a0e0ab2d0ddf5'
  35.     'a4445955fd1bdefdedb0ad27b66120de4f0c87f8c9f55120622380ce95597c3358b19df45838398aa555e3bff9aaa4566e989ab963396e9d169d931a67e88a26'
  36.     'b8823586fead21247c8208bd842fb5cd32d4cb3ca2a02339ce2baf2c9cb938dfcb8eb7b24c95225ae625cd0ee59fbbd8293393f3ed1a4b45d13ba3f9f62a791f'
  37.     '20b010e199127fa185da2e78eb97724a1b4d6d279c79b87bb0901ceb832d19ea755485c9039d06d92e6ffd686683990cd1939dc78f37859a798f4a8ba40e05b5'
  38.     'c21aecaafec43bc1ce1ea3439667efb4c7ea5e54bfa87346a9ae9650de1e90c80174b1610a9216f936f693593816c9585c6be1875b3bd318d067079c06251e92'
  39.     'd7bef52e336bd908d24bf3a084a1fc480831d27a3c80af4c31872465b6a0ce39bdf298e620ae9865526c974465807559cc75610b835e60b4358f65a8a8ff159e')
  40. noextract=("$pkgname-$pkgver.zip" "$pkgname-$pkgver.deb")
  41.  
  42. prepare() {
  43.   mkdir -p brave
  44.   cat $pkgname-$pkgver.zip | bsdtar -xf- -C brave
  45.   chmod +x brave/brave
  46. }
  47.  
  48. _bsdtardir="brave"
  49. _debpack="data.tar.xz"
  50.  
  51. package() {
  52.     install -d -m0755 "$pkgdir/usr/lib"
  53.     cp -a --reflink=auto $_bsdtardir "$pkgdir/usr/lib/$pkgname"
  54.  
  55.     install -Dm0755 "$pkgname.sh" "$pkgdir/usr/bin/brave"
  56.     install -Dm0644 -t "$pkgdir/usr/share/applications" "$pkgname.desktop"
  57.     install -Dm0644 "logo.png" "$pkgdir/usr/share/pixmaps/brave.png"
  58.     install -Dm0664 -t "$pkgdir/usr/share/licenses/$pkgname" "MPL2"
  59.     mv "$pkgdir/usr/lib/$pkgname/"{LICENSE,LICENSES.chromium.html} "$pkgdir/usr/share/licenses/$pkgname"
  60.  
  61.     ln -s /usr/lib/PepperFlash "$pkgdir/usr/lib/pepperflashplugin-nonfree"
  62.    
  63.     # Copy resources directory from deb package
  64.     ar x $pkgname-$pkgver.deb $_debpack
  65.     mkdir deb
  66.     tar -C ./deb -xvf $_debpack ./opt/brave.com/brave/resources/
  67.     cp -a --reflink=auto deb/opt/brave.com/brave/resources/ "$pkgdir/usr/lib/$pkgname"
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement