yochananmarqos

youtube-dl-front-git

Sep 10th, 2020
104
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=youtube-dl-front-git
  2. pkgver=r163.9ba1816
  3. pkgrel=1
  4. pkgdesc="A youtube-dl interface"
  5. arch=('any')
  6. url="https://github.com/Enriquito/youtube-dl-front"
  7. license=('MIT')
  8. depends=('nodejs' 'youtube-dl')
  9. makedepends=('git' 'npm')
  10. provides=("${pkgname%-git}")
  11. conflicts=("${pkgname%-git}")
  12. source=('git+https://github.com/Enriquito/youtube-dl-front.git')
  13. sha256sums=('SKIP')
  14.  
  15. pkgver() {
  16.     cd "$srcdir/${pkgname%-git}"
  17.     printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  18. }
  19.  
  20. package() {
  21.     npm install -g --user root --prefix "$pkgdir/usr" "$srcdir/${pkgname%-git}/server"
  22.  
  23.     # Non-deterministic race in npm gives 777 permissions to random directories.
  24.     # See https://github.com/npm/npm/issues/9359 for details.
  25.     find "$pkgdir/usr" -type d -exec chmod 755 {} +
  26.  
  27.     # npm gives ownership of ALL FILES to build user
  28.     # https://bugs.archlinux.org/task/63396
  29.     chown -R root:root "$pkgdir"
  30. }
RAW Paste Data