aboutsummaryrefslogtreecommitdiffstats
path: root/main/drbd/APKBUILD
blob: 94df102e5c0a015187fe31eb7fe79d28f5bd7fd2 (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
70
71
72
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=drbd
pkgver=8.4.3
pkgbase=${pkgver%.*}
pkgrel=1
pkgdesc="Network-based RAID 1"
url="http://www.drbd.org"
arch="all"
license="GPL"
depends="bash"
depends_dev="bash bison flex"
makedepends="$depends_dev linux-headers"
install=
subpackages="$pkgname-doc $pkgname-pacemaker"
source="http://oss.linbit.com/$pkgname/$pkgbase/$pkgname-$pkgver.tar.gz
	bits_per_long.patch
	$pkgname.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
	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
8b289fddf94aff469879f0263ffbb294  bits_per_long.patch
d60b4214a512a5dd450fb298cf421c97  drbd.initd"
sha256sums="abeb09309b77b533b8e738a601d703b338dce6e4d6cf59741e2f0693fbf94527  drbd-8.4.3.tar.gz
fab540bc721b5f759b33bf8bea04d2b25cf9dc64657483afdfb821dec5b6ee79  bits_per_long.patch
e91440fb27e4824fe171283f605f3f554f60facd903d3dfd304ab54b48676d48  drbd.initd"
sha512sums="cdc90bdd9491fe6d29e3b779d69ba2aac1aacdb336586f1ef414d0a0195d922dbefa8b2d9c4868a2476998a713c893403344a2934c7768ff6f4ba9f13bb7277a  drbd-8.4.3.tar.gz
a567bedd4064da2c74c39174e13ca9920219128e55185311909ced884129d40dfc6f3cac552cbe669c48ce24a2db6c461219df91168e27554eaa45c3765edc71  bits_per_long.patch
200e0203706fe5146ba266b518e6ff6ce61aa2cd2e3ca06cccabadff58df834dd61d700a375a31a2bc382f838f87d44c79b80fa15ade628aee345ee3431ede74  drbd.initd"