aboutsummaryrefslogtreecommitdiffstats
path: root/main/drbd-utils/APKBUILD
blob: c35aecf72137560f487c645c365313a63c30c784 (plain) (blame)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=drbd-utils
pkgver=9.4.0
pkgrel=0
pkgdesc="Network-based RAID 1"
url="http://www.drbd.org"
arch="all"
license="GPL-2.0-or-later"
depends="bash"
makedepends="bison docbook-xsl flex libxslt linux-headers"
options="!check"  # no tests provided
provides="drbd=$pkgver-r$pkgrel"
subpackages="$pkgname-doc $pkgname-pacemaker::noarch
	$pkgname-bash-completion:bashcomp:noarch"
source="https://links.linbit.com/sources/drbd/utils/$pkgname-$pkgver.tar.gz
	drbdsetup-permissions.patch
	drbd.initd
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	./configure --prefix=/usr \
		--sbindir=/sbin \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-pacemaker \
		--with-drbdmon \
		--with-bashcompletion \
		--without-udev \
		--without-heartbeat \
		--without-rgmanager \
		--without-xen \
		--without-83support
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir/drbd.initd" "$pkgdir/etc/init.d/drbd"
}

pacemaker() {
	depends="$pkgname=$pkgver-r$pkgrel"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/ocf "$subpkgdir"/usr/lib
}

bashcomp() {
	pkgdesc="Bash completions for $pkgname"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/bash-completion
	mv "$pkgdir"/etc/bash_completion.d \
		"$subpkgdir"/usr/share/bash-completion/completions
}

sha512sums="8b0af8d90450cdb4b83252f743d99a27d3ddb19bfbcbe44e2212dded21f4d8220a6145d66cd7f3b1708aaa41d440b804d7244791d58c9a6bf57e94f3f704f3d1  drbd-utils-9.4.0.tar.gz
562ae8eee03148666fb6e6e700c1eb9086f6901e176ea6cd007e3ac4e39d1cdaf967064de74dc1ad620155996dc7011bd0e2abd1c9595ff9bf5f4413673726f3  drbdsetup-permissions.patch
bb465e32273aaba0b86ae681bc94c58bb51f542221f51ced197e22b316ce1bc9a0b4fe1f43af07ef13b3f0946466a43218f0a2ab7f4210adbb00174a503b64d7  drbd.initd"