blob: 9b2431f2f9d74b6ed7a2bc40dd7d43e0a4ea49d5 (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Contributor: David Huffman <storedbox@outlook.com>
# Maintainer: David Huffman <storedbox@outlook.com>
_gosu_repo='github.com/tianon/gosu'
_gosu_ver=1.9
_gosu_src="gosu-$_gosu_ver"
_runc_repo='github.com/opencontainers/runc'
_runc_ver=0.1.0
_runc_src="runc-$_runc_ver"
pkgname=gosu
pkgver=$_gosu_ver
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 coreutils go"
install=""
subpackages=""
source="https://github.com/tianon/gosu/archive/$_gosu_ver/$_gosu_src.tar.gz
https://github.com/opencontainers/runc/archive/v$_runc_ver/$_runc_src.tar.gz"
_builddir="$srcdir"/$_gosu_repo
prepare() {
mkdir -p $_gosu_repo $_runc_repo
mv -T $_gosu_src $_gosu_repo || return 1
mv -T $_runc_src $_runc_repo || return 1
local i
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
CGO_ENABLED=0 GOPATH="$startdir:$srcdir/$_runc_repo/Godeps/_workspace" \
go build -v -ldflags '-s -w' || return 1
}
package() {
cd "$_builddir"
local bindir="$pkgdir/usr/bin"
mkdir -p "$bindir" || return 1
cp gosu "$bindir" || return 1
}
md5sums="9c0dfb590c317cde7592652764f2c341 gosu-1.9.tar.gz
73971b4020a39445f071c3b3d5361a30 runc-0.1.0.tar.gz"
sha256sums="12770f2127ec436a6e368750258631d1eda3f5fe647059f2219fbd27d5d6d838 gosu-1.9.tar.gz
681d6d89541ae2e06757f999a242a1f97bbcb1ad6e10f4cdee287ec4a9d2bff9 runc-0.1.0.tar.gz"
sha512sums="f4bc1fa812f7588b657fbab3394407133a42422e54500c9e9adb9010f550b45839d7bfa3bbb79241a7c00e67292ba3ff9ffcf5ce7c000d88e6b64ac6f88fb169 gosu-1.9.tar.gz
8a9ff02b0161eda0a730194b0fbf7ad76e8f379992e74061ef49302da3492fd0c53f06db9153ded4d934d67bbf6f4291d6154254f1b924ef73c97c44cd14ffcf runc-0.1.0.tar.gz"
|