tidal-hifi-git/PKGBUILD

58 lines
2.0 KiB
Bash
Raw Normal View History

# Maintainer: Rick van Lieshout <info@rickvanlieshout.com>
2021-06-26 16:03:22 +02:00
pkgname=tidal-hifi-git
pkgrel=1
pkgver=2.3.0.r0.g8fea526
pkgdesc="The web version of listen.tidal.com running in electron with hifi support thanks to widevine."
2021-06-26 16:03:22 +02:00
arch=(x86_64)
url="https://github.com/Mastermindzh/tidal-hifi"
license=("custom:MIT")
2021-06-26 16:03:22 +02:00
depends=(libxss nss gtk3)
makedepends=(npm git)
provides=(tidal-hifi)
conflicts=(tidal-hifi)
source=("git+https://github.com/Mastermindzh/tidal-hifi.git"
"tidal-hifi.desktop")
sha512sums=('SKIP'
'31cf40fb3ac81c4a64a8410a78e97c268a440577bce54347ce62f8a9566c8897f8083cd1e5afa40b0fbe9a149fc4fb4f29cad91a12e5b47cf8e300e56351a4f1')
pkgver() {
cd "${srcdir}/${pkgname%-git}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
2021-06-26 16:03:22 +02:00
cd "${srcdir}/${pkgname%-git}"
# install build dependencies
npm install
}
build() {
2021-06-26 16:03:22 +02:00
cd "${srcdir}/${pkgname%-git}"
# We are not using the systems Electron as we need castlab's Electron.
2020-10-05 11:19:22 +02:00
npm run build-arch
}
package() {
2021-06-26 16:03:22 +02:00
cd "${srcdir}/${pkgname%-git}"
2021-06-26 16:03:22 +02:00
install -d "${pkgdir}/opt/tidal-hifi/" "${pkgdir}/usr/bin" "${pkgdir}/usr/share/doc" "${pkgdir}/usr/share/licenses"
2021-06-26 16:03:22 +02:00
cp -r dist/linux-unpacked/* "${pkgdir}/opt/tidal-hifi/"
chmod +x "${pkgdir}/opt/tidal-hifi/tidal-hifi"
2021-06-26 16:03:22 +02:00
ln -s "/opt/tidal-hifi/tidal-hifi" "${pkgdir}/usr/bin/tidal-hifi"
2021-06-26 16:03:22 +02:00
install -Dm 644 "build/icon.png" "${pkgdir}/usr/share/pixmaps/tidal-hifi.png"
install -Dm 644 "${srcdir}/tidal-hifi.desktop" "${pkgdir}/usr/share/applications/tidal-hifi.desktop"
install -Dm 644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
install -Dm 644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
2021-06-26 16:03:22 +02:00
# install -dm755 "icon.png" "${pkgdir}/usr/share/pixmaps/tidal-hifi.png"
ln -s "/opt/tidal-hifi/LICENSE.electron.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.electron.txt"
ln -s "/opt/tidal-hifi/LICENSES.chromium.html" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSES.chromium.html"
}