34 lines
978 B
Bash
34 lines
978 B
Bash
# Template file for 'etcd'
|
|
pkgname=etcd
|
|
version=3.2.6
|
|
revision=2
|
|
build_style=go
|
|
short_desc="Distributed reliable key-value store"
|
|
maintainer="Andrea Brancaleoni <abc@pompel.me>"
|
|
license="Apache-2.0"
|
|
hostmakedepends="git glide"
|
|
go_import_path="github.com/coreos/etcd"
|
|
homepage="https://coreos.com/etcd/docs/latest/"
|
|
distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
|
|
checksum=23ab4016bf0a057d36461cee001dc5b38d0d757fa5d9e8226833687dab06faa2
|
|
conf_files="/etc/sv/etcd/conf"
|
|
system_accounts="etcd"
|
|
make_dirs="/var/lib/etcd 0755 etcd etcd"
|
|
|
|
do_build() {
|
|
if [[ "${go_get}" != "yes" ]]; then
|
|
local path="${GOPATH}/src/${go_import_path}"
|
|
mkdir -p "$(dirname ${path})"
|
|
ln -fs $PWD "${path}"
|
|
fi
|
|
|
|
glide install
|
|
go_package=${go_package:-$go_import_path}
|
|
go get -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
|
|
go get -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_import_path}/etcdctl
|
|
}
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
vsv etcd
|
|
}
|