aboutsummaryrefslogtreecommitdiffstats
path: root/main/drbd9-grsec/APKBUILD
blob: ec0ede7ec75d1d2ed65a0ebbf1a9c36f87812d9e (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
72
73
# Contributor: Roland Kammerer <roland.kammerer@linbit.com>
# Maintainer: Roland Kammerer <roland.kammerer@linbit.com>
_usname=drbd
_flavor=${FLAVOR:-grsec}
_name=$_usname-$_flavor

_kpkg=linux-$_flavor
_kver=4.4.39
_kpkgrel=4

_usver=9.0.6
# upstream now also has a -rel in the tar-balls
# set it here for "source", but don't mangle it into pkgrel/_mypkgrel
# if there is a new upstream rel (eg. 9.0.1-2), we just increase _mypkgrel
_usrel=1

_mypkgrel=1

_kernelver=$_kver-r$_kpkgrel
_abi_release=${_kver}-${_kpkgrel}-${_flavor}

pkgname=${_usname}9-$_flavor
pkgver=$_kver
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="Network-based RAID 1 version 9"
url="http://www.drbd.org"
arch="x86 x86_64 armhf"
license="GPL"
depends=""
depends_dev=""
makedepends="linux-grsec-dev"
install=""
subpackages=""
source="http://www.drbd.org/download/$_usname/${_usver%.*}/$_usname-$_usver-$_usrel.tar.gz"

_builddir=$srcdir/$_usname-$_usver-$_usrel
prepare() {
	local i
	# verify the kernel version
	(cd $startdir
	if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then
		. ../../main/linux-${_flavor}/APKBUILD
		[ "$_kver" != "$pkgver" ] \
			&& die "please update _kver to $pkgver"
		[ "$_kpkgrel" != "$pkgrel" ] \
			&& die "please update _kpkgrel to $pkgrel"
	else
		die "could not determine kernel flavor: linux-${_flavor}"
	fi
	return 0) || return 1


	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"
	make KVER=$_abi_release || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

md5sums="c9a87636fddead3dfd8e1a84388664de  drbd-9.0.6-1.tar.gz"
sha256sums="7e07d1c42f954e34e1cff96c8bc2b2db91594b66a115904bb5c1743922257ba7  drbd-9.0.6-1.tar.gz"
sha512sums="f035d94f6dfe05849a2756e45d1423a097a917c377dff00b55080b81195d299efc0f189fe043784ade610aca07bae23dce4228fb238c21581348fa0eb6a8b54d  drbd-9.0.6-1.tar.gz"