summaryrefslogtreecommitdiff
path: root/community/nbd/APKBUILD
blob: 99cc715fe2e202f3804a543a5349cba639a32ab1 (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.16.1
pkgrel=0
pkgdesc="Tools for network block devices"
url="http://nbd.sourceforge.net"
arch="all"
license="GPL-2.0"
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="0e8444333e0a41a725c08867b79634bca1b8e9c0e88011dcf8e2f37b6e8de5582208c5029eea16bee517530c8725f232c1c963848bd09da5c4dda6a15ee283de  nbd-3.16.1.tar.xz"