aboutsummaryrefslogtreecommitdiffstats
path: root/community/nbd/APKBUILD
blob: bfae782786e8181a465e1ce10c5fdf824a59923a (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=nbd
pkgver=3.17
pkgrel=0
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
}

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"