diff options
author | j.r | 2022-01-18 00:05:10 +0100 |
---|---|---|
committer | j.r | 2022-01-18 00:05:12 +0100 |
commit | 0ac8aa66382080e2861032d2e55c4bade174425c (patch) | |
tree | 7b1c3f406a82a2a0ac56bb4f9f5369d345d29aaf /PKGBUILD | |
download | aur-0ac8aa66382080e2861032d2e55c4bade174425c.tar.gz |
sonixd: Initial upload: 0.11.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..84395e377698 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: j.r <j.r@jugendhacker.de> +pkgname=sonixd +pkgver=0.11.0 +pkgrel=1 +pkgdesc="A full-featured Subsonic/Jellyfin compatible desktop music player" +arch=('x86_64') +url="https://github.com/jeffvli/sonixd" +license=('GPL3') +depends=('electron13' 'nodejs') +makedepends=('yarn' 'nvm' 'asar') +conflicts=("$pkgname-appimage") +replaces=("$pkgname-appimage") +source=("$pkgname-$pkgver.tar.gz::https://github.com/jeffvli/sonixd/archive/refs/tags/v$pkgver.tar.gz" + "$pkgname") +sha256sums=('7a6f05612d2459d07d49d885d7547fd62d44745f53b4073f1da4e7bdab36fb13' + '89039f59dc58490cc5a2e05bb38b3645448df56b2e763d6170facb64e73241d0') + +_ensure_local_nvm() { + which nvm >/dev/null 2>&1 && nvm deactivate && nvm unload + export NVM_DIR="$srcdir/.nvm" + + source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]] +} + +prepare() { + cd "$pkgname-$pkgver" + + _ensure_local_nvm + nvm install --no-progress 15.14.0 + + _ver="$(</usr/lib/electron13/version)" + yarn upgrade --cache-folder="$srcdir/yarn-cache" "electron@$_ver" +} + +build() { + cd "$pkgname-$pkgver" + + _ver="$(</usr/lib/electron13/version)" + local i686=ia32 x86_64=x64 + export NODE_ENV=production + yarn build --cache-folder="$srcdir/yarn-cache" + yarn run --cache-folder="$srcdir/yarn-cache" \ + electron-builder --linux --"${!CARCH}" --dir \ + -c.electronDist=/usr/lib/electron \ + -c.electronVersion="$_ver" +} + +package() { + install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" + + cd "$pkgname-$pkgver" + local i686=linux-ia32-unpacked x86_64=linux-unpacked + + install -d "$pkgdir/usr/lib/$pkgname/" + + cp -r "release/${!CARCH}/resources/assets" "$pkgdir/usr/lib/$pkgname" + asar e "release/${!CARCH}/resources/app.asar" "$pkgdir/usr/lib/$pkgname/$pkgname/" +} |