APKBUILD 2.69 KB
Newer Older
1
2
3
4
5
6
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=${FLAVOR:-grsec}
_kpkg=linux-$_flavor
_realname=flashcache
_name=$_realname-$_flavor

7
_kver=4.4.11
8
_kpkgrel=1
9

10
_realver=3.1.2
11
_mypkgrel=0
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

# source the kernel version
if [ -f ../linux-$_flavor/APKBUILD ]; then
	. ../linux-$_flavor/APKBUILD
	[ "$_kver" != "$pkgver" ] && die "$_name: Please update _kver to $pkgver"
	[ "$_kpkgrel" != "$pkgrel" ] && die "$_name: Please update _kpkgrel to $pkgrel"
fi

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

pkgname=$_name
pkgver=$_kver
pkgrel=$(($_kpkgrel + $_mypkgrel))
pkgdesc="a general purpose writeback block cache for Linux"
url="https://github.com/facebook/flashcache/"
28
arch=""
29
30
31
32
33
34
35
license="GPL"
depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver}"
install=
install_if="linux-$_flavor=$_kernelver $_realname"
subpackages=
source="$_realname-$_realver.tar.gz::https://github.com/facebook/flashcache/archive/$_realver.tar.gz
36
37
	depmod.patch
	kernel-3.18.patch
38
	kernel-4.2.patch
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

# override kernel's prepare()
prepare() {
	cd "$srcdir/$_realname-$_realver"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$srcdir/$_realname-$_realver"/src
	export GCC_SPECS=hardenednopie.specs
	make CC="${CC:-gcc}" KERNEL_SOURCE_VERSION=$_abi_release modules \
		|| return 1
}

package() {
	cd "$srcdir/$_realname-$_realver"/src

	make DESTDIR="$pkgdir" CC="${CC:-gcc}" \
		KERNEL_SOURCE_VERSION=$_abi_release \
		DEPMOD=: modules_install || return 1
}

67
md5sums="b569604f7efce881e87752c9efc01965  flashcache-3.1.2.tar.gz
68
ef9bd511f2b964bf22863814679bfba3  depmod.patch
69
70
24462dd41268d045bd91ba88274115fb  kernel-3.18.patch
29d3529370a569327a9a258f88dd30cc  kernel-4.2.patch"
71
sha256sums="f1d97395c744850a909e5f57b69a0ce87c773f2761e0147dd78de5fec3ea61e2  flashcache-3.1.2.tar.gz
72
05c0fefaaaea624c12b9ff3e66e0029b8dcc0c0d3246e10683bf217e10b3c450  depmod.patch
73
74
34a008e4c2382c757e030280fc6ce66c739251ca7883ef7d45feba44e2a05134  kernel-3.18.patch
cf21af11f507fe81094933e3c79379067661a32d834f2ac2378a4dd67f50d080  kernel-4.2.patch"
75
sha512sums="03d88b2622b7a41b66cd5cf4637be52c3bd6f25ac1099d7ea247e8e9bdad8a040bf0d10bcee2f49de8621f0da755dfd8a03810d709faaa330b78b6c564872e72  flashcache-3.1.2.tar.gz
76
55543347d76171352199294a29bcf19ba6b511f57e63c2a4254c4ebad8829912c65cdbef95bc7485d079dd66c56c1624b9570e7faf038cc5cb80e81079fcadc6  depmod.patch
77
78
f09255bdc66711e35736a018f870b7a398bf05e3f1e8e4574a84967672152c510a4d6f8687ced49f52cfa63c57b407a393805e4df900de8ee6817e9c8c455306  kernel-3.18.patch
82b1c885e2884a1ece0e003b726067ed0818f40f92689145b15aff1e15e14e5c34ed9b38f35010519d584dd5c6d5dda3393ed09d716bd1bf9aa4e85524fdd2a2  kernel-4.2.patch"