blob: b3302bf0c3f79fd40744395be49c4cc3c9f20462 (
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
|
# Maintainer: Kuan-Yen Chou <kuanyenchou at gmail dot com>
pkgname=gllvm-git
pkgver=1.3.1.r13.g154531b
pkgrel=1
pkgdesc="Whole Program LLVM: wllvm ported to go"
arch=('any')
url="https://github.com/SRI-CSL/gllvm"
license=('BSD')
depends=()
makedepends=('git' 'go')
optdepends=('clang: backend LLVM compiler')
provides=('gllvm')
conflicts=('gllvm')
source=("$pkgname"::'git+https://github.com/SRI-CSL/gllvm')
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/$pkgname"
if git describe --long --tags >/dev/null 2>&1; then
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
else
printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git describe --always)"
fi
}
package() {
cd "$srcdir/$pkgname"
export GOPATH="$pkgdir/usr"
go install github.com/SRI-CSL/gllvm/cmd/...@latest
rm -rf "$pkgdir/usr/src"
# This is needed in case the `--clean` option is used with makepkg.
chmod -R u+w "$pkgdir/usr/pkg/mod"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim: set sw=4 ts=4 et:
|