aboutsummaryrefslogtreecommitdiffstats
path: root/main/drbd-lts/APKBUILD
blob: cf92fdfd468a13b7dd2a396b9b989dd4c1e46625 (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
# Contributor: Roland Kammerer <roland.kammerer@linbit.com>
# Maintainer: Roland Kammerer <roland.kammerer@linbit.com>

# when changing _ver we *must* bump _rel
_name=drbd
_ver=9.0.27-1
_rel=0

_flavor=${FLAVOR:-lts}
_kpkg=linux-$_flavor
_kver=5.4.109
_krel=0
_kabi="$_kver-$_krel-$_flavor"
_kpkgver="$_kver-r$_krel"

pkgname=$_name-$_flavor
pkgver=$_kver
pkgrel=$(( $_krel + $_rel ))

pkgdesc="Network-based RAID 1 version 9"
url="https://www.linbit.com/en/drbd-community/drbd-download/"
arch="all !armhf"
license="GPL-2.0-or-later"
depends="$_kpkg=$_kpkgver"
makedepends="$_kpkg-dev=$_kpkgver bash coreutils"
source="http://www.linbit.com/downloads/drbd/${_ver%.*}/drbd-$_ver.tar.gz
	build-fix-32bit.patch
	"

builddir=$srcdir/$_name-$_ver

prepare() {
	default_prepare
	# verify the kernel version
	local _kapkbuild=../../main/linux-$_flavor/APKBUILD
	if [ -f $_kapkbuild ]; then
		(	. $_kapkbuild
			pkgname=$_name-$_flavor
			[ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
			[ "$_krel" != "$pkgrel" ] && die "please update _krel to $pkgrel"
			return 0
		)
	fi
}

build() {
	cd "$builddir"
	unset LDFLAGS
	make KVER=$_kabi
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="e8a2ec57241b9933dd5655e2d6e65d04c0e88017ed76773b5d351f0ed30c167a8b1f4e7145221fb0aec8bdb5ca3d95c428b46c9dceb2576b6c3598962abc699f  drbd-9.0.27-1.tar.gz
32e30116c51442a8c67ff250537bd63f199c7fb9749d8c502894c6da2de4b0e707cd8922e8331b6284721c4679061533f7cc6e681a7e85482060a212adb97d17  build-fix-32bit.patch"