# Maintainer: zxp19821005 pkgname=alspotron-bin _pkgname=Alspotron pkgver=0.20.1 _electronversion=29 pkgrel=1 pkgdesc="Shows the egg lyrics of the track, playing on Spotify / YouTube Music" arch=('x86_64') url="https://github.com/organization/alspotron" license=('Apache-2.0') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( 'java-runtime' "electron${_electronversion}" ) source=( "${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb" "${pkgname%-bin}.sh" ) sha256sums=('a4f8d1d07f6c6414fc35f09bc85235dd746a9a62ee5e0c0b9464a29a2b3f1664' 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') build() { sed -e "s|@electronversion@|${_electronversion}|" \ -e "s|@appname@|${pkgname%-bin}|g" \ -e "s|@runname@|app|g" \ -e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \ -i "${srcdir}/${pkgname%-bin}.sh" bsdtar -xf "${srcdir}/data."* sed "s|/opt/${_pkgname}/${pkgname%-bin}|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" install -Dm644 "${srcdir}/opt/${_pkgname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" cp -r "${srcdir}/opt/${_pkgname}/resources/"{app.asar.unpacked,assets} "${pkgdir}/usr/lib/${pkgname%-bin}" install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" install -Dm644 "${srcdir}/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" }