aboutsummaryrefslogtreecommitdiffstats
path: root/main/flashcache-grsec
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-10-23 09:35:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-10-23 09:35:05 +0000
commit83507b0af1ff05a470d062769b4455e3e4ee2c6c (patch)
treec83b981162a354ab94381029fb3f98a7e351b144 /main/flashcache-grsec
parentf5c280973fdc7ff0a7b031ba98157cc509f5ad56 (diff)
downloadaports-83507b0af1ff05a470d062769b4455e3e4ee2c6c.tar.bz2
aports-83507b0af1ff05a470d062769b4455e3e4ee2c6c.tar.xz
main/flashcashe: moved from testing
fixes #2221
Diffstat (limited to 'main/flashcache-grsec')
-rw-r--r--main/flashcache-grsec/APKBUILD68
-rw-r--r--main/flashcache-grsec/depmod.patch20
2 files changed, 88 insertions, 0 deletions
diff --git a/main/flashcache-grsec/APKBUILD b/main/flashcache-grsec/APKBUILD
new file mode 100644
index 0000000000..e9d9eeef17
--- /dev/null
+++ b/main/flashcache-grsec/APKBUILD
@@ -0,0 +1,68 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+_flavor=${FLAVOR:-grsec}
+_kpkg=linux-$_flavor
+_realname=flashcache
+_name=$_realname-$_flavor
+
+_kver=3.10.17
+_kpkgrel=1
+
+_realver=2.1
+_mypkgrel=0
+
+# 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/"
+arch="all"
+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
+ depmod.patch"
+
+# 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
+}
+
+md5sums="b05b48124e4a542122a9e7874c54fafe flashcache-2.1.tar.gz
+ef9bd511f2b964bf22863814679bfba3 depmod.patch"
+sha256sums="e8d251411fd703383d46e10a80a0ad8b8b52cdf1b172e58001779085c25fb798 flashcache-2.1.tar.gz
+05c0fefaaaea624c12b9ff3e66e0029b8dcc0c0d3246e10683bf217e10b3c450 depmod.patch"
+sha512sums="b65f2f0a2170b312ca5e7720d2206574f25d2f6bac3ae3531ba171b0e979a1f42045dad24ee8c8eb8c9d884982d0e6708b3d9dd5cba1fa40247d2adb5c8d89a0 flashcache-2.1.tar.gz
+55543347d76171352199294a29bcf19ba6b511f57e63c2a4254c4ebad8829912c65cdbef95bc7485d079dd66c56c1624b9570e7faf038cc5cb80e81079fcadc6 depmod.patch"
diff --git a/main/flashcache-grsec/depmod.patch b/main/flashcache-grsec/depmod.patch
new file mode 100644
index 0000000000..15c0615057
--- /dev/null
+++ b/main/flashcache-grsec/depmod.patch
@@ -0,0 +1,20 @@
+--- ./src/Makefile.orig 2013-08-15 11:20:54.575932175 +0000
++++ ./src/Makefile 2013-08-15 11:21:37.813472296 +0000
+@@ -24,6 +24,8 @@
+ KERNEL_TREE := $(RHEL5_TREE)
+ endif
+
++DEPMOD ?= depmod
++
+ obj-m += flashcache.o
+ flashcache-objs := flashcache_conf.o flashcache_main.o flashcache_subr.o flashcache_ioctl.o flashcache_procfs.o
+
+@@ -42,7 +44,7 @@
+ modules_install: modules
+ install -o root -g root -m 0755 -d $(DESTDIR)/lib/modules/$(KERNEL_SOURCE_VERSION)/extra/flashcache/
+ install -o root -g root -m 0755 flashcache.ko $(DESTDIR)/lib/modules/$(KERNEL_SOURCE_VERSION)/extra/flashcache/
+- depmod -a $(KERNEL_SOURCE_VERSION)
++ $(DEPMOD) -a $(KERNEL_SOURCE_VERSION)
+
+ .PHONY: utils_install
+ utils_install: utils