diff options
author | Kris Moore <kmoore@FreeBSD.org> | 2019-06-11 19:51:54 +0000 |
---|---|---|
committer | Kris Moore <kmoore@FreeBSD.org> | 2019-06-11 19:51:54 +0000 |
commit | 4d7be57d721ad54cdeb45f999c66c3a10ba5429c (patch) | |
tree | 6d40e5678bf6e990980d2f7220f728e57aa68422 /sysutils/openzfs-kmod/Makefile | |
parent | 488b6cff8b6237d7ae78079daaceb341277d8884 (diff) | |
download | ports-4d7be57d721ad54cdeb45f999c66c3a10ba5429c.tar.gz ports-4d7be57d721ad54cdeb45f999c66c3a10ba5429c.zip |
Notes
Diffstat (limited to 'sysutils/openzfs-kmod/Makefile')
-rw-r--r-- | sysutils/openzfs-kmod/Makefile | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/sysutils/openzfs-kmod/Makefile b/sysutils/openzfs-kmod/Makefile new file mode 100644 index 000000000000..78f89b7ce34c --- /dev/null +++ b/sysutils/openzfs-kmod/Makefile @@ -0,0 +1,55 @@ +# $FreeBSD$ + +PORTNAME= openzfs +PORTVERSION= 2019061000 +DISTVERSIONPREFIX= v +CATEGORIES= sysutils +PKGNAMESUFFIX?= -kmod + +MAINTAINER= kmoore@FreeBSD.org +COMMENT= OpenZFS kernel module for FreeBSD + +LICENSE= CDDL + +USES= kmod +USE_GITHUB= yes +GH_ACCOUNT= zfsonfreebsd +GH_PROJECT= ZoF +GH_TAGNAME= ea4b6fc +KMODTARGET?= openzfs.ko + +PLIST_FILES= ${KMODDIR}/${KMODTARGET} + +OPTIONS_DEFINE= DEBUG GCOV +OPTIONS_SUB= yes +GCOV_DESC= Build kernel module with GCOV support (Requires gcc) + +.include <bsd.port.pre.mk> + +.if (${OSVERSION} < 1200504) || (${OSVERSION} >= 1300000 && ${OSVERSION} < 1300013) +IGNORE= needs FreeBSD 12/13 with AES-CCM support +.endif + +.if ${PORT_OPTIONS:MDEBUG} +MAKE_OPTS+= WITH_DEBUG=true +PLIST_FILES+= ${KMODDIR}/${KMODTARGET}.debug +.endif + +.if ${PORT_OPTIONS:MGCOV} +USE_GCC=yes +MAKE_OPTS+= WITH_GCOV=true +.endif + +post-patch: + ${CP} ${FILESDIR}/zfs_gitrev.h ${WRKSRC}/include + +do-build: + (cd ${WRKSRC}/module/ && make -f Makefile.bsd CC=${CC} ${MAKE_OPTS}) + +do-install: + ${INSTALL} ${WRKSRC}/module/openzfs.ko ${STAGEDIR}${KMODDIR}/${KMODTARGET} +.if ${PORT_OPTIONS:MDEBUG} + ${INSTALL} ${WRKSRC}/module/openzfs.ko.debug ${STAGEDIR}${KMODDIR}/${KMODTARGET}.debug +.endif + +.include <bsd.port.post.mk> |