summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSebastian Wiesner2021-03-25 08:16:58 +0100
committerSebastian Wiesner2021-03-25 08:16:58 +0100
commited795cfc45f2c59e03f898f7b3422d1039d166e0 (patch)
treeb4ee5e7dff7f53bddad4a8643f959a20d48a2bf6 /PKGBUILD
parent3446a9c12c68b88332aa1fc9aa9581c96aa0a3ad (diff)
downloadaur-ed795cfc45f2c59e03f898f7b3422d1039d166e0.tar.gz
upgpkg: zsa-wally 2.1.0-11
Restore source-based package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD68
1 files changed, 48 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3059a9c9048..6f0d395e0e0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,58 @@
-# Maintainer: Christopher Fair <christopherpfair@comcast.net>
+# Maintainer: Sebastian Wiesner <sebastian@swsnr.de>
pkgname=zsa-wally
pkgver=2.1.0
-pkgrel=10
-srcRepo="https://github.com/zsa/wally/raw/${pkgver}-linux"
-srcRepoExp="${srcRepo}/dist/linux64"
-pkgdesc="Wally: Flash your ZSA Keyboard the EZ way."
+pkgrel=11
+pkgdesc="Flash your ZSA Keyboard the EZ way."
arch=('i686' 'x86_64')
url="https://github.com/zsa/wally"
-license=('MIT')
-depends=('gtk3' 'webkit2gtk' 'libusb')
-provides=('wally')
-source=("https://github.com/zsa/wally/releases/download/${pkgver}-linux/wally"
- "${srcRepo}/appicon.png"
- "${srcRepoExp}/50-wally.rules"
- "${srcRepoExp}/wally.desktop"
+license=("MIT")
+depends=("gtk3" "webkit2gtk" "libusb")
+makedepends=("go" "npm")
+source=(
+ "$pkgname-$pkgver.tar.gz::https://github.com/zsa/wally/archive/refs/tags/$pkgver-linux.tar.gz"
+ "modernize-udev-rules.patch"
)
-sha256sums=('cdb168899d4e3a81eddfcfa7746d1e4e0dab886ea043644e54339b51f396c087'
- '81df9f24859cfd19ee8128d74a72155fe222e33349c9a647da98922f3f5b7857'
- '269c9196bc65b2e62be549e3d34e56768fe702ff099b7780a1661ca4c92a0143'
- 'd769c63305a6a4f5aa1d661826d8c475014ef8b456e60074596e940e7901c130'
- )
+md5sums=('f4a98a0e51d5d0b6d23a95858d230e11'
+ 'd444c2b74b3c51c265f91020942075bc')
+sha1sums=('deb20d7c9b1a1eb799bb2288540fb7119f1f8ba2'
+ '62c1903d3723399d209f0642849d850e91feaef8')
+sha512sums=('d84c469f7d43ba86eb5d0d527a17b588ea12e0272897231392e0572cef0a80f806948a225e263806e5cf7b2fc95eb58e02468ecbe8d12f69ec07919eb364e789'
+ '923cd4c9795f9828a827e8f5d832ee6f0b74aeb19d948f4e9d8eb7b59d93a570a4bd5e0e0e0b24adfa78644df60425063b37f19ae658e1a3c6200a6c9c126793')
+
+prepare() {
+ cd "wally-$pkgver-linux"
+
+ patch --strip=1 --input="$srcdir/modernize-udev-rules.patch"
+
+ export GOPATH="$srcdir/gopath"
+ go get -u github.com/wailsapp/wails/cmd/wails
+}
+
+build() {
+ cd "wally-$pkgver-linux"
+
+ export GOPATH="$srcdir/gopath"
+ export PATH="$(go env GOPATH)/bin:$PATH"
+
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath"
+ # Don't know what this does but it's in the install.linux.sh script from upstream
+ export CGO_ENABLED=1
+
+ wails build
+}
package() {
+ cd "wally-$pkgver-linux"
+ install -Dm755 build/wally "$pkgdir/usr/bin/wally"
+ install -Dm644 -t "$pkgdir/usr/lib/udev/rules.d/" dist/linux64/50-oryx.rules dist/linux64/50-wally.rules
+ install -Dm644 dist/linux64/wally.desktop "$pkgdir/usr/share/applications/wally.desktop"
install -Dm644 appicon.png "$pkgdir/usr/share/pixmaps/wally.png"
- install -Dm755 wally "$pkgdir/usr/bin/wally"
- install -Dm644 50-wally.rules "$pkgdir/etc/udev/rules.d/50-wally.rules"
- install -Dm644 wally.desktop "$pkgdir/usr/share/applications/wally.desktop"
+ # This file is only on master; meanwhile use the license from the Debian package copyright file
+ install -Dm644 dist/ppa/wally/template/debian/copyright "$pkgdir/usr/share/licenses/$pkgname/copyright"
+ #install -Dm644 license.md "$pkgdir/usr/share/licenses/$pkgname/license.md"
}