diff options
author | mebitek | 2023-06-09 14:30:35 +0200 |
---|---|---|
committer | mebitek | 2023-06-09 14:30:35 +0200 |
commit | d83c3bdb3539ba37531e029a9e98580ddbe77857 (patch) | |
tree | a2c2b0f4fad2a35054e9df6f2c03d614ee379fe4 | |
parent | 6d08bb8f481974abd825206a9250d114a613f638 (diff) | |
download | aur-d83c3bdb3539ba37531e029a9e98580ddbe77857.tar.gz |
update build script
-rw-r--r-- | PKGBUILD | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -1,23 +1,37 @@ # Maintainer: myname <mebitek@zohomail.eu> pkgname=tui-deck _gitname=tui-deck -pkgver=0.5.8 +pkgver=r77.95a83ce pkgrel=1 pkgdesc="A TUI frontend for Nextcloud Deck app written in GO using the Rich Interactive Widgets for Terminal UIs" url="https://github.com/mebitek/tui-deck" license=("GPL3") -source=("git+$url#tag=$pkgver") +source=("git+$url") md5sums=("SKIP") arch=("x86_64") -depends=("bash") +provides=(tui-deck) +conflicts=(tui-deck) makedepends=("git" "go") build() { cd $_gitname - go build -o ${pkgname} -ldflags="-s -w" + go build \ + -gcflags "all=-trimpath=${PWD}" \ + -asmflags "all=-trimpath=${PWD}" \ + -ldflags "-extldflags ${LDFLAGS}" \ + -o $_gitname } package() { cd $_gitname install -Dm755 --no-target-directory "${pkgname}" "${pkgdir}/usr/bin/${pkgname}" } + +pkgver() { + cd $_gitname + ( + 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)" + ) +} |