summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoredward-p2018-08-30 22:29:10 +0800
committeredward-p2018-08-30 22:29:10 +0800
commitb6150670f38ab318dfbfafa383f1fe1080d0a4ce (patch)
tree57d186dea3e09e424e2ffdccf6dc5a0ab3cd3afb
parentb0e24b6b2f6777587c05b57ac4ad5b220faf2df6 (diff)
downloadaur-b6150670f38ab318dfbfafa383f1fe1080d0a4ce.tar.gz
fix kernelver
-rw-r--r--Makefile.patch10
-rw-r--r--PKGBUILD11
-rw-r--r--dkms.conf2
3 files changed, 18 insertions, 5 deletions
diff --git a/Makefile.patch b/Makefile.patch
new file mode 100644
index 00000000000..10ec936d699
--- /dev/null
+++ b/Makefile.patch
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,5 @@
+ obj-m = xt_FULLCONENAT.o
+ CFLAGS_xt_FULLCONENAT.o := ${CFLAGS}
+-KVERSION = $(shell uname -r)
+ all:
+ make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
+ clean:
+
diff --git a/PKGBUILD b/PKGBUILD
index 3b33f6acb15..72bc0b5b597 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgbase=netfilter-full-cone-nat
pkgname=netfilter-full-cone-nat-dkms
pkgver=git+ec14efe
-pkgrel=2
+pkgrel=3
pkgdesc="A kernel module that turns MASQUERADE into full cone SNAT"
arch=('x86_64')
url="https://github.com/Chion82/netfilter-full-cone-nat"
@@ -11,15 +11,18 @@ license=('GPL2')
depends=('dkms')
conflicts=("${_pkgbase}")
source=('dkms.conf'
+ 'Makefile.patch'
'xt_FULLCONENAT.c.patch'
'git+https://github.com/Chion82/netfilter-full-cone-nat')
-md5sums=('777351816b13fdf7da0e573fb160eab2'
- 'ceda7d1fc776845741cc0acf12f3fb2e'
- 'SKIP')
+md5sums=('426b17a1544478bcbe5ecc56fd392db0'
+ 'ca672d85174ea52d57758bd53c0a0ed9'
+ 'ceda7d1fc776845741cc0acf12f3fb2e'
+ 'SKIP')
build() {
cd ${srcdir}/${_pkgbase}
patch -p1 -i "${srcdir}"/xt_FULLCONENAT.c.patch
+ patch -p1 -i "${srcdir}"/Makefile.patch
}
package() {
diff --git a/dkms.conf b/dkms.conf
index 4006a3535be..b4003b4a560 100644
--- a/dkms.conf
+++ b/dkms.conf
@@ -1,6 +1,6 @@
PACKAGE_NAME="@_PKGBASE@"
PACKAGE_VERSION="@PKGVER@"
-MAKE[0]="make"
+MAKE[0]="KVERSION=$kernelver make"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="xt_FULLCONENAT"
DEST_MODULE_LOCATION[0]="/kernel/net/netfilter"