diff options
author | Kristof Provost <kp@FreeBSD.org> | 2021-04-19 12:35:35 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2021-05-04 16:26:09 +0000 |
commit | 5f000aa6a251e86829db81e144d8e150566097e5 (patch) | |
tree | 551c26c8ad1b0f0a635c48fabb7af671b8a00a1d | |
parent | 0a629bd71087f75c3b334edb53b01ec68709ab60 (diff) | |
download | ports-5f000aa6a251e86829db81e144d8e150566097e5.tar.gz ports-5f000aa6a251e86829db81e144d8e150566097e5.zip |
New port: net/libpfctl: library for interaction with pf(4)
The libpfctl port builds a shared library version of the base system
internal libpfctl library.
While the base system libpfctl API/ABI is not guaranteed to be stable
the ioctl interface is, so any version of libpfctl can be safely used.
Note that currently only FreeBSD main (i.e. what will become 14)
supports libpfctl. The relevant changes will be MFC'd back to stable/13
and stable/12 in due course. At that point libpfctl will also be useful
there.
Approved by: garga
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29836
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/libpfctl/Makefile | 43 | ||||
-rw-r--r-- | net/libpfctl/distinfo | 3 | ||||
-rw-r--r-- | net/libpfctl/files/patch-Makefile | 11 | ||||
-rw-r--r-- | net/libpfctl/pkg-descr | 6 |
5 files changed, 64 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 4afe30626bf1..16a00758c5e2 100644 --- a/net/Makefile +++ b/net/Makefile @@ -382,6 +382,7 @@ SUBDIR += libosip2 SUBDIR += libpcap SUBDIR += libpcapnav + SUBDIR += libpfctl SUBDIR += libproxy SUBDIR += libproxy-gnome3 SUBDIR += libproxy-kde diff --git a/net/libpfctl/Makefile b/net/libpfctl/Makefile new file mode 100644 index 000000000000..af42ee98f311 --- /dev/null +++ b/net/libpfctl/Makefile @@ -0,0 +1,43 @@ +# Created by: Kristof Provost <kp@FreeBSD.org> + +PORTNAME= libpfctl +PORTVERSION= 0.1 +CATEGORIES= net +MASTER_SITES= LOCAL/kp/ +DISTFILES= libpfctl-${_LIBPFCTL_HASH}.tar.gz + +MAINTAINER= kp@FreeBSD.org +COMMENT= Library for interaction with pf(4) + +LICENSE= BSD2CLAUSE + +BROKEN_FreeBSD_11= Will not work until nvlist-ified ioctls are available +BROKEN_FreeBSD_12= Will not work until nvlist-ified ioctls are available +BROKEN_FreeBSD_13= Will not work until nvlist-ified ioctls are available + +USE_LDCONFIG= yes + +WRKSRC= ${WRKDIR}/libpfctl + +_LIBPFCTL_HASH= 4ae3a97e127c + +PLIST_FILES= lib/libpfctl.so.0 \ + include/libpfctl.h + +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/lib + @${MKDIR} ${STAGEDIR}${PREFIX}/include + ${INSTALL_LIB} ${WRKSRC}/libpfctl.so.0 ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/*.h ${STAGEDIR}${PREFIX}/include + +.if defined(MAINTAINER_MODE) +upload: + cd /usr/src/lib && \ + HASH=$$(git rev-parse --short origin/main) && \ + git archive --format=tar.gz \ + --output=libpfctl-$${HASH}.tar.gz \ + origin/main libpfctl && \ + scp libpfctl-$${HASH}.tar.gz kp@freefall.freebsd.org:public_distfiles/ +.endif + +.include <bsd.port.mk> diff --git a/net/libpfctl/distinfo b/net/libpfctl/distinfo new file mode 100644 index 000000000000..c85746451541 --- /dev/null +++ b/net/libpfctl/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1618833133 +SHA256 (libpfctl-4ae3a97e127c.tar.gz) = dcafd22c84f129e301ffe3b0f7f8cb53b841d420bc357af8afa2a5f186b958b3 +SIZE (libpfctl-4ae3a97e127c.tar.gz) = 5260 diff --git a/net/libpfctl/files/patch-Makefile b/net/libpfctl/files/patch-Makefile new file mode 100644 index 000000000000..becc613d8e6b --- /dev/null +++ b/net/libpfctl/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig 2021-04-19 10:09:35 UTC ++++ Makefile +@@ -2,7 +2,7 @@ + + PACKAGE= lib${LIB} + LIB= pfctl +-INTERNALLIB= true ++SHLIB_MAJOR= 0 + + SRCS= libpfctl.c + INCS= libpfctl.h diff --git a/net/libpfctl/pkg-descr b/net/libpfctl/pkg-descr new file mode 100644 index 000000000000..65744bc64570 --- /dev/null +++ b/net/libpfctl/pkg-descr @@ -0,0 +1,6 @@ +Ports version of the base system pf(4) library, libpfctl. + +Ports should ideally use this interface rather than manually implementing the +pf(4) ioctl() interface. + +WWW: https://cgit.freebsd.org/src/tree/lib/libpfctl |