summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorzxp198210052024-03-22 13:02:49 +0800
committerzxp198210052024-03-22 13:02:49 +0800
commitd344cc729d043d642de5ccd7a7b7106ebdcb88dd (patch)
tree181279a565eedd67b5f9b76c799c0d5a598ef670 /PKGBUILD
parentbd7ae7dbabc926b167e900d2662316c838e352f0 (diff)
downloadaur-webtorrent-desktop-git.tar.gz
fix errors
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD19
1 files changed, 12 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d3ec049e14dc..35b591c5e1fc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,6 @@ pkgrel=1
pkgdesc="Streaming torrent client."
arch=(
'aarch64'
- 'armv7h'
'x86_64'
)
url="https://webtorrent.io/desktop"
@@ -18,19 +17,20 @@ license=('MIT')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}")
depends=(
- "electron${_electronversion}"
+ "electron${_electronversion}-bin"
)
makedepends=(
'git'
'nvm'
'npm'
+ 'curl'
)
source=(
"${pkgname%-git}.git::git+${_ghurl}.git"
"${pkgname%-git}.sh"
)
sha256sums=('SKIP'
- '50b10386d13e5bec806aeb78f819c4edd0208a4d184332e53866c802731217fe')
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
pkgver() {
cd "${srcdir}/${pkgname%-git}.git"
git describe --long --tags --exclude='*[a-z][a-z]*' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
@@ -45,6 +45,7 @@ build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-git}|g" \
-e "s|@runname@|app.asar|g" \
+ -e "s|@options@||g" \
-i "${srcdir}/${pkgname%-git}.sh"
_ensure_local_nvm
cd "${srcdir}/${pkgname%-git}.git"
@@ -56,8 +57,15 @@ build() {
export ELECTRONVERSION="${_electronversion}"
export npm_config_disturl=https://electronjs.org/headers
HOME="${srcdir}/.electron-gyp"
+ if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];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
npm install
- npm run package -- linux --package=deb
+ npm run package -- linux --package=zip
sed -e "s|Exec=\/opt\/${pkgname%-git}\/${_pkgname}|Exec=${pkgname%-git}|g" \
-e "s|Path=\/opt\/${pkgname%-git}|Path=\/usr\/lib\/${pkgname%-git}|g" \
-i static/linux/share/applications/"${pkgname%-git}.desktop"
@@ -68,9 +76,6 @@ package() {
aarch64)
_osarchdir="${_pkgname}-linux-arm64"
;;
- armv7h)
- _osarchdir="${_pkgname}-linux-armv7l"
- ;;
x86_64)
_osarchdir="${_pkgname}-linux-x64"
;;