yochananmarqos

Untitled

Mar 1st, 2021
779
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=watchit
  2. _pkgver=0.1.0-beta.2
  3. pkgver=${_pkgver//-/.}
  4. pkgrel=1
  5. pkgdesc="Watch movies everywhere"
  6. arch=('x86_64')
  7. url="http://watchitapp.site"
  8. license=('LGPL3')
  9. depends=('electron9')
  10. makedepends=('npm' 'python2')
  11. source=("$pkgname-$pkgver.tar.gz::https://github.com/ZorrillosDev/watchit-desktop/archive/v$_pkgver.tar.gz"
  12.         "$pkgname.desktop"
  13.         "$pkgname.sh")
  14. sha256sums=('2bc80991bff1284712890553c5d78a24ad12980ca5a784ec34d7887eedf48d21'
  15.             '7fd1f624a305246fc18420e4bde343e4de70f1b83a878f84b66f1293e95c01af'
  16.             '40edbecf7a6642ca10e61dfaead949086f23ad702bfcee49bf02c562bbb57352')
  17.  
  18. prepare() {
  19.     cd "$pkgname-desktop-$_pkgver"
  20.  
  21.     # Skip building dist packages
  22.     sed -i 's/"deb",/"dir"/g' package.json
  23.     sed -i '/"AppImage",/d' package.json
  24.     sed -i '/"tar.gz"/d' package.json
  25. }
  26.  
  27. build() {
  28.     cd "$pkgname-desktop-$_pkgver"
  29.     npm install --cache "$srcdir/npm-cache"
  30.     npm run build
  31.     npm run package:linux
  32. }
  33.  
  34. package() {
  35.     cd "$pkgname-desktop-$_pkgver"
  36.     install -d "$pkgdir/usr/lib/$pkgname"
  37.     cp -r release/linux-unpacked/resources "$pkgdir/usr/lib/$pkgname"
  38.  
  39.     install -Dm644 src/media/icons/icon.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
  40.     install -Dm644 "$srcdir/$pkgname.desktop" -t "$pkgdir/usr/share/applications"
  41.     install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
  42. }
RAW Paste Data