summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD22
1 files changed, 15 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b99a9392252d..135e507abfc0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,14 +5,14 @@ _pkgname="Nuclear Player"
pkgver=0.6.30
_electronversion=12
_nodeversion=18
-pkgrel=5
+pkgrel=6
pkgdesc="A free, multiplatform music player app that streams from multiple sources."
arch=('any')
url="http://nuclear.gumblert.tech/"
_ghurl="https://github.com/nukeop/nuclear"
license=('AGPL-3.0-only')
depends=(
- "electron${_electronversion}"
+ "electron${_electronversion}-bin"
)
makedepends=(
'gendesk'
@@ -28,7 +28,7 @@ source=(
"${pkgname}.sh"
)
sha256sums=('SKIP'
- '0fb7b939a071f4a08476bdd5aa143d2aa8cd335c83309f9919be16cd5c3e2014')
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
_ensure_local_nvm() {
export NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
@@ -39,6 +39,7 @@ build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname}|g" \
-e "s|@runname@|app.asar|g" \
+ -e "s|@options@||g" \
-i "${srcdir}/${pkgname}.sh"
_ensure_local_nvm
gendesk -q -f -n --categories="AudioVideo" --name="${_pkgname}" --exec="${pkgname} %U"
@@ -51,14 +52,21 @@ build() {
export ELECTRONVERSION="${_electronversion}"
export npm_config_disturl=https://electronjs.org/headers
HOME="${srcdir}/.electron-gyp"
- sed -e '/"snap"/d;/"tar.gz",/d;/"rpm",/d;/"deb",/d;s|"AppImage",|"AppImage"|g;s|env.VERSION|version|g' -i package.json
- npm ci
+ 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
+ else
+ echo "Your network is OK."
+ fi
+ sed "s|--linux --publish onTag|build --dir|g;s|env.VERSION|version|g" -i package.json
+ npm install --legacy-peer-deps
npm run build:linux
}
package() {
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
- install -Dm755 "${srcdir}/${pkgname}.git/release/linux-unpacked/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname}"
- cp -r "${srcdir}/${pkgname}.git/release/linux-unpacked/resources/"{bin,media,musicgenresicons} "${pkgdir}/usr/lib/${pkgname}"
+ install -Dm755 "${srcdir}/${pkgname}.git/release/linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname}"
+ cp -r "${srcdir}/${pkgname}.git/release/linux-"*/resources/{bin,media,musicgenresicons} "${pkgdir}/usr/lib/${pkgname}"
install -Dm644 "${srcdir}/${pkgname}.git/build/icons/512x512.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
install -Dm644 "${srcdir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
} \ No newline at end of file