aboutsummaryrefslogtreecommitdiffstats
path: root/community/nbd/APKBUILD
blob: 07dd72da0d544b84c6521607104b18a5017ebc37 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=nbd
pkgver=3.17
pkgrel=2
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 gnutls-dev libnl3-dev bash"
subpackages="$pkgname-doc $pkgname-client $pkgname-openrc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.xz
	nbd-server.initd
	"

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

build() {
	cd "$builddir"
	./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
	install -Dm755 "$srcdir"/nbd-server.initd \
		"$pkgdir"/etc/init.d/nbd-server
	mkdir -p "$pkgdir"/etc/nbd-server
}

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
3e71f0cd79d378abb1901038952748b548d18540aa7ebe94bcda65bc331021c1eef942c26283dbbd39471ecfa33c2c5b6165acfcf0abd7d17aed1bdcd47fea31  nbd-server.initd"