summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD48
1 files changed, 39 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index cf5984149ee8..c137e0915374 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,21 +2,51 @@
pkgname=any-sync-gui
_appname="Lan同步"
pkgver=1.3.0
-pkgrel=2
+_electronversion=25
+pkgrel=3
pkgdesc="一款支持在pc与pc或移动设备之间同步文本信息或文件的应用"
arch=('any')
url="https://github.com/easyhutu/any-sync-gui"
license=('custom')
conflicts=("${pkgname}")
-depends=('libxcomposite' 'libxkbcommon' 'libxfixes' 'libcups' 'mesa' 'alsa-lib' 'expat' 'cairo' 'libxrandr' 'pango' 'glibc' \
- 'libxext' 'libxcb' 'at-spi2-core' 'libdrm' 'nspr' 'libxdamage' 'glib2' 'gcc-libs' 'nss' 'dbus' 'libx11' 'gtk3')
-makedepends=('npm' 'nodejs' 'gendesk')
-source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
-sha256sums=('f6194fd66558225c5f069db71013f4552d65d9152d482166d3c9ae87adbc79ee')
-prepare() {
- gendesk -f -n -q --categories "Utility" --name "${pkgname}-${_appname}" --exec "${pkgname} --no-sandbox %U"
-}
+depends=(
+ 'libxcomposite'
+ 'libxkbcommon'
+ 'libxfixes'
+ 'libcups'
+ 'mesa'
+ 'alsa-lib'
+ 'expat'
+ 'cairo'
+ 'libxrandr'
+ 'pango'
+ 'libxext'
+ 'libxcb'
+ 'at-spi2-core'
+ 'libdrm'
+ 'nspr'
+ 'libxdamage'
+ 'nss'
+ 'libx11'
+ 'gtk3'
+)
+makedepends=(
+ 'npm'
+ 'nodejs'
+ 'gendesk'
+ 'git'
+)
+source=(
+ "${pkgname}-${pkgver}::git+${url}.git#tag=v${pkgver}"
+)
+sha256sums=('SKIP')
build() {
+ gendesk -f -n -q --categories "Utility" --name "${pkgname}-${_appname}" --exec "${pkgname} --no-sandbox %U"
+ export npm_config_build_from_source=true
+ export npm_config_cache="${srcdir}/.npm_cache"
+ export ELECTRON_SKIP_BINARY_DOWNLOAD=1
+ export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
+ export ELECTRONVERSION="${_electronversion}"
cd "${srcdir}/${pkgname}-${pkgver}/fe"
npm install --force
npm run build