aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gosu/APKBUILD
blob: 0b347c998e71b742323c39a98a36052fe59ef771 (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
39
40
41
42
43
44
45
46
# Contributor: David Huffman <storedbox@outlook.com>
# Maintainer: David Huffman <storedbox@outlook.com>
pkgname=gosu
pkgver=1.7
pkgrel=0
pkgdesc="Simple Go-based setuid+setgid+setgroups+exec"
url="https://github.com/tianon/gosu"
arch="all"
license="GPL3"
depends=""
depends_dev=""
makedepends="$depends_dev go"
install=""
subpackages=""
source="https://github.com/tianon/gosu/archive/$pkgver/$pkgname-$pkgver.tar.gz"

_builddir="$srcdir/github.com/tianon/$pkgname"
prepare() {
	mkdir -p "$_builddir"
	find "$srcdir" -name '*.go' -type f -exec mv {} "$_builddir" \+
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	export GOPATH="$startdir"
	go get || return 1
	go build -v || return 1
}

package() {
	cd "$_builddir"
	local bindir="$pkgdir/usr/bin"
	mkdir -p "$bindir" || return 1
	cp gosu "$bindir" || return 1
}

md5sums="84aa02fc06fcbb81834a7466bf2778e1  gosu-1.7.tar.gz"
sha256sums="a010c7e34de69bfc2aa4b104a73c63d09e51caa6a5c8d75e836be6c692e9aae1  gosu-1.7.tar.gz"
sha512sums="745afb75735321f2e239fe93fc947f969bda76dd9869cbf25850e7d7f4f271e5e00afceaead7da11063302e5af2b143ca42282b1a5907de99da3e90cf7197ed6  gosu-1.7.tar.gz"