summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorzxp198210052024-05-14 16:40:44 +0800
committerzxp198210052024-05-14 16:40:44 +0800
commit20c3914546e8ccd1e8bc2ab26c37fce61ca987d2 (patch)
tree43d3f53e1ea21350b61f04db3e9e5fdc9fb8e8f5 /PKGBUILD
parent28f387a3407bc1de77a8a1a7e9b6d0401eae9016 (diff)
downloadaur-20c3914546e8ccd1e8bc2ab26c37fce61ca987d2.tar.gz
fix errors
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 20 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 45377cbb2925..f01570cf5c84 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,9 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=horen
pkgver=0.9.5
+_subver=perfect-lyric
_electronversion=28
-pkgrel=1
+pkgrel=2
pkgdesc="A music player by Electron"
arch=('any')
url="https://github.com/horenjs/horen"
@@ -13,40 +14,41 @@ depends=(
)
makedepends=(
'gendesk'
- 'git'
+ 'curl'
'npm'
'pnpm'
'nodejs'
'icoutils'
)
source=(
- "${pkgname}.git::git+${url}.git#tag=perfect-lyric"
+ "${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${_subver}.tar.gz"
"${pkgname}.sh"
)
-sha256sums=('SKIP'
- 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+sha256sums=('2387283f26d2f154f2d8a62767f7ee167eb6a8cb75770bc5d86da9ea34566067'
+ '41b6d61dffef064762b3eec3dfeca7a3e1f57cbcb6dce9a6940c06797a0eae9d')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname}|g" \
-e "s|@runname@|app|g" \
+ -e "s|@cfgdirname@|${pkgname}|g" \
-e "s|@options@||g" \
-i "${srcdir}/${pkgname}.sh"
- gendesk -q -f -n --categories="AudioVideo" --name="${pkgname}" --exec="${pkgname} %U"
- cd "${srcdir}/${pkgname}.git"
+ gendesk -q -f -n --pkgname="${pkgname}" --categories="AudioVideo" --name="${pkgname}" --exec="${pkgname} %U"
+ cd "${srcdir}/${pkgname}-${_subver}"
export npm_config_build_from_source=true
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
- export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
- export npm_config_target="${SYSTEM_ELECTRON_VERSION}"
- export ELECTRONVERSION="${_electronversion}"
- export npm_config_disturl=https://electronjs.org/headers
+ #export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
+ #export npm_config_target="${SYSTEM_ELECTRON_VERSION}"
+ #export ELECTRONVERSION="${_electronversion}"
HOME="${srcdir}/.electron-gyp"
pnpm config set store-dir "${srcdir}/.pnpm_store"
pnpm config set cache-dir "${srcdir}/.pnpm_cache"
pnpm config set link-workspace-packages true
- if [ `curl ifconfig.co/country` = "China" ];then
- echo 'registry="https://registry.npmmirror.com/"' >> .npmrc
- echo 'electron_mirror="https://registry.npmmirror.com/-/binary/electron/"' >> .npmrc
- echo 'electron_builder_binaries_mirror="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"' >> .npmrc
+ if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];then
+ export npm_config_registry=https://registry.npmmirror.com
+ export npm_config_disturl=https://registry.npmmirror.com/-/binary/node/
+ export npm_config_electron_mirror=https://registry.npmmirror.com/-/binary/electron/
+ export npm_config_electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/
else
echo "Your network is OK."
fi
@@ -59,8 +61,8 @@ build() {
package() {
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname}"
- cp -r "${srcdir}/${pkgname}.git/out/${pkgname}-linux-"*/resources/app "${pkgdir}/usr/lib/${pkgname}"
- install -Dm644 "${srcdir}/${pkgname}.git/preview/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ cp -r "${srcdir}/${pkgname}-${_subver}/out/${pkgname}-linux-"*/resources/app "${pkgdir}/usr/lib/${pkgname}"
+ install -Dm644 "${srcdir}/${pkgname}-${_subver}/preview/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
install -Dm644 "${srcdir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
- install -Dm644 "${srcdir}/${pkgname}.git/out/${pkgname}-linux-"*/LICENSE* -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/${pkgname}-${_subver}/out/${pkgname}-linux-"*/LICENSE* -t "${pkgdir}/usr/share/licenses/${pkgname}"
} \ No newline at end of file