aboutsummaryrefslogtreecommitdiffstats
path: root/testing/drbd/APKBUILD
blob: 348d906ece8b7ac5832277c2ea3bcc887a0d5269 (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.2
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="b081f1046adda1d51ba351c40a8b1107  drbd-8.4.2.tar.gz
0b589553e3f3ea54c7f1696582bb49d3  drbd.initd"
sha256sums="f3d86bb5645c067bc61e9461a5d570a184912daedfe6f88623bbd920f8b5b5fa  drbd-8.4.2.tar.gz
548b14d6b15c39779f2723e6caf61ee8fce5c18767fb7c940de733c760393ce2  drbd.initd"
sha512sums="c32371e1fb89b479bf5136ee1c00d8e07dd15769654977dfcde71fcc24264c1dae2feda82e8f61b4caf57b9ac88e2861ee7270aa8c867f6245b52d65c45ada46  drbd-8.4.2.tar.gz
9497004b73db57ecb569ced7712937434ef180707fc7c3e822ac5e5dc17fa30f1cef4ce37b2c7439bedb779f9c27c96c0bce6bb61f8ddb3d1045ed3e6e5c38fa  drbd.initd"