mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-31 22:32:14 +01:00
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
# Contributor: Shawn Rose <shawnandrewrose@gmail.com>
|
|
# Maintainer: Shawn Rose <shawnandrewrose@gmail.com>
|
|
pkgname=zrepl
|
|
pkgver=0.6.1
|
|
pkgrel=1
|
|
pkgdesc="one-stop, integrated solution for ZFS replication"
|
|
url="https://zrepl.github.io/"
|
|
# s390x: failing tests
|
|
arch="all !s390x !armhf"
|
|
license="MIT"
|
|
makedepends="go bash"
|
|
subpackages="
|
|
$pkgname-openrc
|
|
$pkgname-bash-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
source="
|
|
$pkgname-$pkgver.tar.gz::https://github.com/zrepl/zrepl/archive/v$pkgver.tar.gz
|
|
zrepl.yml
|
|
zrepl.initd
|
|
"
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
export GO111MODULE=on
|
|
go build \
|
|
-mod=readonly \
|
|
-ldflags "-X github.com/zrepl/zrepl/version.zreplVersion=v$pkgver" \
|
|
-o "artifacts/zrepl"
|
|
./artifacts/zrepl gencompletion bash ./artifacts/bash-completion
|
|
./artifacts/zrepl gencompletion zsh ./artifacts/zsh-completion
|
|
}
|
|
|
|
check() {
|
|
go test -mod=readonly ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm0755 artifacts/zrepl "$pkgdir"/usr/bin/zrepl
|
|
install -Dm755 "$srcdir"/zrepl.initd \
|
|
"$pkgdir"/etc/init.d/zrepl
|
|
install -Dm644 "$srcdir"/zrepl.yml \
|
|
"$pkgdir"/etc/zrepl/zrepl.yml
|
|
install -Dm0644 artifacts/bash-completion \
|
|
"$pkgdir"/usr/share/bash-completion/completions/$pkgname
|
|
install -Dm0644 artifacts/zsh-completion \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_$pkgname
|
|
cd "$builddir/config/samples"
|
|
find ./* -type f -exec install -m 644 -D "{}" "$pkgdir/usr/share/$pkgname/examples/{}" \;
|
|
}
|
|
|
|
cleanup_srcdir() {
|
|
export GOPATH="$srcdir"
|
|
go clean -modcache
|
|
default_cleanup_srcdir
|
|
}
|
|
|
|
sha512sums="
|
|
0fb28014f4c50d2512eec2b767883b342f8fc6cd5661dd04bebfb75d9774f4face9402202e2e830c0ca9b831502fdeac1c00e874ea3b0e9188c8df54e353dc70 zrepl-0.6.1.tar.gz
|
|
ae39a92de1bfd3f0e957b70d02fe05918426fab9203da99d9ee2ee81c173f67e3a55ae525126c4cb0966d0911d7a5bb4c0977915bc0bd11c9a1b607777d39286 zrepl.yml
|
|
a6c77686e0189aec4e1ab281d6473c530f9b4371738aca392a6dd6599ed554af9e7d50d68221b4d575bdf3f607640892da34a96d53847d74bbfcf75a25b1836a zrepl.initd
|
|
"
|