# Contributor: Roland Kammerer # Maintainer: Roland Kammerer _usname=drbd _flavor=${FLAVOR:-grsec} _name=$_usname-$_flavor _kpkg=linux-$_flavor _kver=4.4.6 _kpkgrel=0 _usver=9.0.1 # 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=0 _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="all" license="GPL" depends="" depends_dev="" makedepends="linux-grsec-dev" install="" subpackages="" source="http://oss.linbit.com/$_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="0d1d50e225ee0c8058af4fe1442d5242 drbd-9.0.1-1.tar.gz" sha256sums="f0862fffa5d73c433598fe1957bab61a2ae7ae1c4c7c0cecbef760e67a65fe20 drbd-9.0.1-1.tar.gz" sha512sums="0deb07d5c0217d35f85902064725311b3b74fe53ccb7faddb16624654c04edb44fb9462b0d967b1eb618a658ed66d32e71aa2b2048aa3fcd43a95d0f099f55d4 drbd-9.0.1-1.tar.gz"