summaryrefslogtreecommitdiffstats
path: root/testing/drbd/APKBUILD
blob: c93527a5534e1b0425ea5eea19d70b1c1a550227 (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
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=drbd
pkgver=8.4.3
pkgbase=${pkgver%.*}
pkgrel=0
pkgdesc="Network-based RAID 1"
url="http://www.drbd.org"
arch="all"
license="GPL"
depends="bash"
depends_dev="bash bison flex"
makedepends="$depends_dev"
install=
subpackages="$pkgname-doc $pkgname-pacemaker"
source="http://oss.linbit.com/$pkgname/$pkgbase/$pkgname-$pkgver.tar.gz
	$pkgname.initd"


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

prepare() {
	cd "$_builddir"
	sed -i "s/mv --force/mv -f/" drbd/Makefile || return 1
}

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

	make || return 1
}

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

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

md5sums="0c54a69603fa28b41de5fb33e03fd9e8  drbd-8.4.3.tar.gz
3a534a80fd82a31c003e9342bfecc496  drbd.initd"
sha256sums="abeb09309b77b533b8e738a601d703b338dce6e4d6cf59741e2f0693fbf94527  drbd-8.4.3.tar.gz
bfccbb5fbf6c0440798dd2b7615831635809cf1fd6e71b7508733408ef4d40cc  drbd.initd"
sha512sums="cdc90bdd9491fe6d29e3b779d69ba2aac1aacdb336586f1ef414d0a0195d922dbefa8b2d9c4868a2476998a713c893403344a2934c7768ff6f4ba9f13bb7277a  drbd-8.4.3.tar.gz
076baf34332bfd1447b109584145b9ee36b12d065c68d2d100c46ee5affdee6cdd834a1cf26a1e8d0986868fe34d8fe1f10991a3baed010ec642285edbc9be14  drbd.initd"