diff options
author | zxp19821005 | 2024-10-18 16:58:19 +0800 |
---|---|---|
committer | zxp19821005 | 2024-10-18 16:58:19 +0800 |
commit | 6399e14c1e2d439ca7154cfc2d6854885eaa0f01 (patch) | |
tree | 4daf44323649a5b0ae6079e8e0a5768f35bdf9e4 /PKGBUILD | |
parent | b88e020ae0648e74fb4fc6cb810289755da5760a (diff) | |
download | aur-6399e14c1e2d439ca7154cfc2d6854885eaa0f01.tar.gz |
update shell-scripts
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -3,9 +3,9 @@ pkgname=android-toolkit-git _pkgname=Android-Toolkit pkgver=1.5.23.r0.ge23050c _electronversion=25 -_nodeversion=18 +_nodeversion=20 pkgrel=1 -pkgdesc="A cross platform desktop app written in Typescript/Node using React and Electron.A GUI for adb and can be used to modify android devices such as firesticks and google TVs." +pkgdesc="A cross platform desktop app written in Typescript/Node using React and Electron.A GUI for adb and can be used to modify android devices such as firesticks and google TVs.Use system-wide electron." arch=('x86_64') url="https://github.com/AnthonyGress/Android-Toolkit" license=("MIT") @@ -51,28 +51,33 @@ build() { _ensure_local_nvm gendesk -q -f -n --pkgname="${pkgname%-git}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${_pkgname}" --exec="${pkgname%-git} %U" cd "${srcdir}/${pkgname%-git}.git" + electronDist="/usr/lib/electron${_electronversion}" export ELECTRON_SKIP_BINARY_DOWNLOAD=1 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')" HOME="${srcdir}/.electron-gyp" { - echo -e '\n' + echo -e '\n' #echo 'build_from_source=true' echo "cache=${srcdir}/.npm_cache" - if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then + } >> .npmrc + if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then + { echo 'registry=https://registry.npmmirror.com' echo 'disturl=https://registry.npmmirror.com/-/binary/node/' echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/' echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/' - fi - } >> .npmrc + } >> .npmrc + fi sed -i "s/AppImage/dir/g;s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json NODE_ENV=development npm install - NODE_ENV=production npm run package + NODE_ENV=production npx ts-node ./.erb/scripts/clean.js dist + NODE_ENV=production npm run build + NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist}" } package() { install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}" install -Dm644 "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname%-git}" - cp -r "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/resources/assets "${pkgdir}/usr/lib/${pkgname%-git}" + cp -Pr --no-preserve=ownership "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/resources/assets "${pkgdir}/usr/lib/${pkgname%-git}" _icon_sizes=(16x16 32x32 180x180 192x192 512x512 1024x1024) for _icons in "${_icon_sizes[@]}";do install -Dm644 "${srcdir}/${pkgname%-git}.git/assets/icons/${_icons}.png" \ |