blob: 9715dab78202a81351abba789065d756395fce63 (
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
|
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=etcd
pkgver=3.2.8
pkgrel=0
pkgdesc="A highly-available key value store for shared configuration and service discovery"
url="https://github.com/coreos/etcd"
arch="x86_64 ppc64le"
license="ASL 2.0"
makedepends="go bash"
options="!strip"
install="$pkgname.pre-install"
pkgusers="$pkgname"
pkggroups="$pkgname"
subpackages="$pkgname-doc $pkgname-ctl"
source="$pkgname-$pkgver.tar.gz::https://github.com/coreos/etcd/archive/v$pkgver.tar.gz
$pkgname.confd
$pkgname.initd"
builddir="$srcdir"/$pkgname-$pkgver
prepare() {
default_prepare
export GOPATH="$(pwd)/_gopath"
_coreos="${GOPATH}/src/github.com/coreos"
mkdir -vp ${_coreos}
ln -vsf ${srcdir}/${pkgname}-${pkgver} ${_coreos}/${pkgname}
}
build() {
cd "$builddir"
bash -x ./build
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/var/lib/$pkgname
chown -R $pkgusers:$pkggroups "$pkgdir"/var/lib/$pkgname
install -Dm755 bin/etcd "$pkgdir"/usr/bin/etcd
install -Dm755 $srcdir/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
install -Dm755 $srcdir/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
ctl() {
pkgdesc="A command-line client for etcd"
install -Dm755 "$builddir"/bin/etcdctl "$subpkgdir"/usr/bin/etcdctl
}
sha512sums="7ef172e4e864ccfe07a3f93e31ef77fe9e225e30ca49ecda85038c36f775def0c2633c998fe840cfd665ac912c00ba238a3ded09cff616c1e7faae0dbd5d4152 etcd-3.2.8.tar.gz
440c9f23decb318c565a79d376b107dbd2333e72d5d812ec1460732543348737468b3e66e82e06a1afa0f09760c1eb066804a668a24e92a23977758727e049d2 etcd.confd
cee78d665c6449aceed2e12e13a461e614b7c71a4e4800c967bdfff0175e58aad1f8b0b186b8fa49ceffe315e5e68eccf24b8f3a3e3f805df8850f7e81b4ad12 etcd.initd"
|