aboutsummaryrefslogtreecommitdiffstats
path: root/community/nbd/APKBUILD
blob: 9ac904ff13b0f4b6f3c5f86c6fa1f273b9514869 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=nbd
pkgver=3.17
pkgrel=1
pkgdesc="Tools for network block devices"
url="http://nbd.sourceforge.net"
arch="all"
license="GPL-2.0-or-later"
makedepends="glib-dev linux-headers zlib-dev"
subpackages="$pkgname-doc $pkgname-client"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.xz"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	touch "systemd/nbd@.service.tmpl"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-lfs \
		--enable-syslog \
		--enable-gznbd
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

client() {
	pkgdesc="$pkgdesc (client)"
	mkdir -p "$subpkgdir"/usr/sbin
	mv "$pkgdir"/usr/sbin/nbd-client \
		"$subpkgdir"/usr/sbin/
}

sha512sums="bcbd025d829d407dc3c0b837cbc1c16f673c5f4c0483d5bee83a52b40d528088499860c775e4e77cf47a8ac1d83dcda24df1092d658dd915ed01c638b3ebc57b  nbd-3.17.tar.xz"