diff options
author | Damien Tardy-Panis | 2022-01-16 11:34:20 +0100 |
---|---|---|
committer | Damien Tardy-Panis | 2022-01-16 11:34:20 +0100 |
commit | f3789031882152333c69bd8785ac7fd6f9e87533 (patch) | |
tree | a75813ace665b3ec87d3c33c78ae9944fd685eb3 /PKGBUILD | |
download | aur-asciitosvg-git.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9b19409192bd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +pkgname=asciitosvg-git +pkgver=r49.ca82a5c +pkgrel=1 +pkgdesc="Create beautiful SVG diagrams from ASCII art" +arch=("any") +url="https://github.com/asciitosvg/asciitosvg/" +license=("MIT") + +makedepends=( + 'git' + 'go-pie' +) + +source=( + "git+https://github.com/asciitosvg/asciitosvg" +) + +sha512sums=( + 'SKIP' +) + +pkgver() { + cd asciitosvg + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd asciitosvg + go mod init 'github.com/asciitosvg/asciitosvg' + go mod tidy +} + +build() { + mkdir -p gopath/src/github.com/asciitosvg + ln -rTsf asciitosvg gopath/src/github.com/asciitosvg/asciitosvg + export GOPATH="$srcdir/gopath" + cd "$GOPATH/src/github.com/asciitosvg/asciitosvg" + go install \ + -gcflags "all=-trimpath=$GOPATH" \ + -asmflags "all=-trimpath=$GOPATH" \ + -ldflags "-extldflags $LDFLAGS" \ + -v ./... +} + +package() { + install -Dm755 "gopath/bin/a2s" "$pkgdir/usr/bin/a2s" +} |