summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFabioLolix <fabio.loli@disroot.org>2021-09-17 21:11:58 +0200
committerFabioLolix <fabio.loli@disroot.org>2021-09-17 21:11:58 +0200
commit4cf8e90bddedb80a4c3673b65d6edc5263880cf1 (patch)
treee62c72dddb84cf3e59abf63f808a7d73ccf53906 /PKGBUILD
parent4e2e83730fcaadd00773c9247eee3284b1f59a8d (diff)
revision
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 21 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ec6cae6..5f0c02b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,38 @@
# Maitainer: Loek Le Blansch <loek@pipeframe.xyz>
pkgname=arduino-language-server-git
-pkgver=1.0.0
+pkgver=r239.134ca4d
pkgrel=1
-epoch=1
pkgdesc="An Arduino Language Server based on Clangd to Arduino code autocompletion"
-arch=('any')
-makedepends=('git' 'go')
+arch=(x86_64 i686 i486 pentium4 arm armv6h armv7h aarch64)
url="https://github.com/arduino/arduino-language-server"
-license=('APACHE')
-source=(git+https://github.com/arduino/arduino-language-server)
-sha256sums=('SKIP')
+license=('Apache')
+makedepends=('git' 'go')
provides=('arduino-language-server')
conflicts=('arduino-language-server')
+source=(git+https://github.com/arduino/arduino-language-server)
+sha256sums=('SKIP')
pkgver() {
- cd ${pkgname}
- git describe --tags | sed "s+-+.r+" | tr - .
+ cd "${pkgname%-git}"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}
build() {
- cd ${pkgname}
-
- msg2 'Building...'
- go build
+ cd "${pkgname%-git}"
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
+ .
}
package() {
- cd ${pkgname}
-
- msg2 'Installing executables...'
- install -Dm 755 arduino-language-server -t "$pkgdir"/usr/bin
-
- msg2 'Cleaning up pkgdir...'
- find "$pkgdir" -type d -name .git -exec rm -r '{}' +
+ cd "${pkgname%-git}"
+ install -Dm 755 arduino-language-server -t "$pkgdir"/usr/bin
}