blob: b2b79c9374ae35b448046bca579f2585c247a03a (
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
60
61
62
63
64
65
|
# Maintainer: robertfoster
_pkgname=openbazaard
pkgname=${_pkgname}-git
pkgver=v0.13.4.r56.gaba2ff77
pkgrel=1
pkgdesc="Server daemon for communication between client and OpenBazaar network (Latest devel version)"
arch=(arm armv6h armv7h aarch64 i686 x86_64)
url="https://github.com/OpenBazaar/openbazaar-go"
license=('MIT')
depends=()
backup=("var/lib/openbazaar")
makedepends=(go git)
conflicts=('openbazaard')
options=('strip')
_user=github.com/OpenBazaar
_repo=openbazaar-go
source=("${_repo}::git+https://${_user}/${_repo}.git"
${_pkgname}.service
${_pkgname}.conf
${_pkgname}.sysuser.conf
)
export GOOS=linux
case "$CARCH" in
x86_64) export GOARCH=amd64 ;;
i686) export GOARCH=386 GO386=387 ;;
arm) export GOARCH=arm GOARM=5 ;;
armv6h) export GOARCH=arm GOARM=6 ;;
armv7h) export GOARCH=arm GOARM=7 ;;
aarch64) export GOARCH=arm64 ;;
esac
pkgver() {
cd ${_repo}
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd $srcdir
export GOPATH=$PWD/.gopath
mkdir -p $GOPATH/src/${_user}
ln -sf $PWD/${_repo} $GOPATH/src/${_user}/${_repo}
cd $GOPATH/src/${_user}/${_repo}
go get -v
}
package() {
export PATH=$PATH:$PWD/.gopath/bin
cd $GOPATH/src/${_user}/${_repo}
go build
install -Dm755 $GOPATH/bin/${_repo} $pkgdir/usr/bin/${_pkgname}
install -Dm644 $srcdir/${_pkgname}.service $pkgdir/usr/lib/systemd/system/${_pkgname}.service
install -D -m644 $srcdir/${_pkgname}.conf $pkgdir/etc/conf.d/${_pkgname}
install -Dm755 $srcdir/${_pkgname}.sysuser.conf $pkgdir/usr/lib/sysusers.d/${_pkgname}.conf
}
sha256sums=('SKIP'
'bc3d5aee7cb2006c853ff7c007955367bc0f4d3972f627f09c3ea914b89951b2'
'8efe5e6b0bdc98b3d4813320a38f862607d716adecc28866e4d0cf2a24463b96'
'8187df684f82063aa90c5b31cbedcc6da870cb6b2e45d95c98c78e05aec6406b')
|