aboutsummaryrefslogtreecommitdiffstats
path: root/main/drbd9-vanilla/APKBUILD
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-01-12 05:45:14 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-01-12 05:45:14 +0000
commite81a5118bbed640d46971334343dd2ba54dca93d (patch)
tree084f6312927f091f8e9bdb6d6dfecb589929e33b /main/drbd9-vanilla/APKBUILD
parentdade6566e88b9b91cfedb713bf8384c8fa10c678 (diff)
downloadaports-e81a5118bbed640d46971334343dd2ba54dca93d.tar.bz2
aports-e81a5118bbed640d46971334343dd2ba54dca93d.tar.xz
main/drbd9-vanilla: new aport
Diffstat (limited to 'main/drbd9-vanilla/APKBUILD')
-rw-r--r--main/drbd9-vanilla/APKBUILD71
1 files changed, 71 insertions, 0 deletions
diff --git a/main/drbd9-vanilla/APKBUILD b/main/drbd9-vanilla/APKBUILD
new file mode 100644
index 0000000000..10f12a535a
--- /dev/null
+++ b/main/drbd9-vanilla/APKBUILD
@@ -0,0 +1,71 @@
+# Contributor: Roland Kammerer <roland.kammerer@linbit.com>
+# Maintainer: Roland Kammerer <roland.kammerer@linbit.com>
+_usname=drbd
+_flavor=${FLAVOR:-vanilla}
+_name=$_usname-$_flavor
+
+_kpkg=linux-$_flavor
+_kver=4.14.13
+_kpkgrel=2
+
+_usver=9.0.9
+# 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="linux-${_flavor}=${_kernelver}"
+depends_dev=""
+makedepends="linux-${_flavor}-dev bash"
+install=""
+subpackages=""
+source="https://links.linbit.com/sources/$_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
+}
+
+sha512sums="64e98eb055c3007231faf00b3b16d47a339d5aa2301e328a86c943d8d31cb73802e7d187a94bf84947750f98442370d8eb366a4675472050a1c0c095868152d5 drbd-9.0.9-1.tar.gz"