yochananmarqos

nuclear-player-git

Aug 31st, 2021 (edited)
177
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=nuclear-player-git
  2. _app_id=org.js.nuclear.Nuclear
  3. pkgver=0.6.16.r37.gc4ef0f1e
  4. pkgrel=1
  5. pkgdesc="Streaming music player that finds free music for you"
  6. arch=('x86_64')
  7. url="https://nuclear.js.org"
  8. license=('GPL3')
  9. depends=('gtk3' 'nss')
  10. makedepends=('git' 'nodejs-lts-erbium' 'setconf')
  11. provides=("${pkgname%-git}")
  12. conflicts=("${pkgname%-git}")
  13. source=('git+https://github.com/nukeop/nuclear.git')
  14. sha256sums=('SKIP')
  15.  
  16. pkgver() {
  17.   cd "$srcdir/nuclear"
  18.   git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
  19. }
  20.  
  21. prepare() {
  22.   cd "$srcdir/nuclear"
  23.   setconf "flatpak/${_app_id}.desktop" Exec nuclear
  24. }
  25.  
  26. build(){
  27.   cd "$srcdir/nuclear"
  28.   npm install --cache "$srcdir/npm-cache"
  29.   npm run build
  30. }
  31.  
  32. check() {
  33.   cd "$srcdir/nuclear"
  34.   npm test
  35. }
  36.  
  37. package(){
  38.   cd "$srcdir/nuclear"
  39.   install -d "$pkgdir/opt/nuclear/"
  40.   cp -r release/linux-unpacked/* "$pkgdir/opt/nuclear/"
  41.  
  42.   install -Dm644 "flatpak/${_app_id}.desktop" -t "$pkgdir/usr/share/applications/"
  43.   install -Dm644 "flatpak/${_app_id}.metainfo.xml" -t "$pkgdir/usr/share/metainfo/"
  44.  
  45.   install -d "$pkgdir/usr/share/icons/hicolor/512x512/apps/"
  46.   ln -s /opt/nuclear/resources/media/512x512.png \
  47.     "$pkgdir/usr/share/icons/hicolor/512x512/apps/${_app_id}.png"
  48.  
  49.   install -d "$pkgdir/usr/bin"
  50.   ln -s /opt/nuclear/nuclear "$pkgdir/usr/bin/"
  51. }
RAW Paste Data