aboutsummaryrefslogtreecommitdiffstats
path: root/main/drbd-utils/APKBUILD
blob: 45b056333209d7c8eb7d7013bbc4690115d81bda (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=drbd-utils
pkgver=8.9.6
pkgrel=0
pkgdesc="Network-based RAID 1"
url="http://www.drbd.org"
arch="all"
license="GPL"
depends="bash"
makedepends="bash bison flex linux-headers libxslt docbook-xsl"
install=
provides="drbd"
subpackages="$pkgname-doc $pkgname-pacemaker"
source="http://oss.linbit.com/drbd/drbd-utils-$pkgver.tar.gz
	drbdsetup-permissions.patch
	drbd.initd"


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

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sbindir=/sbin \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-pacemaker \
		--without-udev \
		--without-heartbeat \
		--without-rgmanager \
		--without-xen \
		--without-bashcompletion\
		--without-83support

	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
        install -m755 -D "$srcdir/drbd.initd" \
		"$pkgdir/etc/init.d/drbd" || return 1
}

pacemaker() {
	depends="drbd"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/ocf "$subpkgdir"/usr/lib
}

md5sums="76ed6d3190cd77b00890f3365353124b  drbd-utils-8.9.6.tar.gz
a3043b04ca494d206fffb4e2d57d2a4a  drbdsetup-permissions.patch
37a3e196fab9b4f568f79b3bfdee3081  drbd.initd"
sha256sums="297b77c9b3f88de2e7dae459234f2753ea4fc2805282b2d276e35cf51e292913  drbd-utils-8.9.6.tar.gz
c091d3e655aefefbd9f7e50621b008b862275968181ecc23353b884111c49330  drbdsetup-permissions.patch
9ea7427be45fc184cb4a74b6a7b0d688859d38c7a35a96c6c586dedaf4ce30df  drbd.initd"
sha512sums="cbdeeb7b298bc21de0d2188566362d7a634a72df243403f4bc91d5836c757f15ee86314b1385860aecda5657be5dc6309f2481b0403012bde841dd0618188938  drbd-utils-8.9.6.tar.gz
562ae8eee03148666fb6e6e700c1eb9086f6901e176ea6cd007e3ac4e39d1cdaf967064de74dc1ad620155996dc7011bd0e2abd1c9595ff9bf5f4413673726f3  drbdsetup-permissions.patch
bb465e32273aaba0b86ae681bc94c58bb51f542221f51ced197e22b316ce1bc9a0b4fe1f43af07ef13b3f0946466a43218f0a2ab7f4210adbb00174a503b64d7  drbd.initd"