blob: 333115b7055c8017e85af50e4322e510379fb950 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# Maintainer: Bastien Traverse <firstname at lastname dot email>
# Maintainer: Felix Buehler <account@buehler.rocks>
pkgname=primitive
pkgver=r152.0373c21
pkgrel=2
pkgdesc='Reproducing images with geometric primitives'
arch=('i686' 'x86_64')
url="https://github.com/fogleman/primitive"
license=('MIT')
makedepends=('go' 'git')
provides=("$pkgname")
conflicts=("$pkgname")
source=("$pkgname::git+$url.git")
md5sums=('SKIP')
pkgver() {
cd "$pkgname"
# Support both current absence of tags and possible future addition
( 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() {
unset GOBIN
GOPATH="$srcdir" go install -v -gcflags "-trimpath $GOPATH/src" \
"${url#https://}@latest"
}
package() {
install -D "$srcdir/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 "$srcdir/$pkgname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -d "$pkgdir/usr/share/$pkgname"
cp -r "$srcdir/$pkgname"/{bot,examples,scripts} "$pkgdir/usr/share/$pkgname"
find "$pkgdir/usr/share/$pkgname" -type f -name *.py -exec chmod +x {} \;
}
|