commit 7b5a9e9eca4eb8ebf5aa8faaee9788602f2d4135 Author: yo Date: Sat May 14 11:33:22 2022 +0200 first commit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ea8605c --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +# Makefile 2022-05-13 10:36:39Z yo $ + +PORTNAME= mynettcptable +DISTVERSIONPREFIX=v +DISTVERSION= 1.0.0-rc1 +CATEGORIES= mail +MASTER_SITES= https://git.nosd.in/yo/mynettcptable/archive/ +# Gitea packaging need some tweaks +DISTNAME= ${DISTVERSIONPREFIX}${DISTVERSION} + +MAINTAINER= johan@nosd.in +COMMENT= Postfix tcp_table service to get mynetworks from LDAP + +LICENSE= BSD3CLAUSE + +USES= go + +# Gitea packaging need some tweaks +WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} +EXTRACT_AFTER_ARGS= && ${MV} ${PORTNAME} ${PORTNAME}-${DISTVERSION} + +USERS= nobody +GROUPS= nogroup + +GH_TUPLE= \ + Azure:go-ntlmssp:48547f28849e:azure_go_ntlmssp/vendor/github.com/Azure/go-ntlmssp \ + go-asn1-ber:asn1-ber:v1.5.4:go_asn1_ber_asn1_ber/vendor/github.com/go-asn1-ber/asn1-ber \ + go-ldap:ldap:v3.4.3:go_ldap_ldap_v3/vendor/github.com/go-ldap/ldap \ + golang:crypto:ae2d96664a29:golang_crypto/vendor/golang.org/x/crypto \ + golang:sys:665e8c7367d1:golang_sys/vendor/golang.org/x/sys \ + peterbourgon:ff:v1.7.1:peterbourgon_ff/vendor/github.com/peterbourgon/ff \ + sirupsen:logrus:v1.8.1:sirupsen_logrus/vendor/github.com/sirupsen/logrus \ + tabalt:pidfile:v1.1.0:tabalt_pidfile/vendor/github.com/tabalt/pidfile + +USE_RC_SUBR= mynettcptable + +pre-test: + ${SETENV} GOPATH="${WRKDIR}" + +post-install: + ${INSTALL_DATA} ${WRKSRC}/mynettcptable.conf.sample ${STAGEDIR}${PREFIX}/etc + +.include diff --git a/distinfo b/distinfo new file mode 100644 index 0000000..8d522c1 --- /dev/null +++ b/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1652519865 +SHA256 (v1.0.0-rc1.tar.gz) = 20668e2612fd64759ebbc495202ab716728224b3cfdf793757a0495ee944ed2f +SIZE (v1.0.0-rc1.tar.gz) = 7744 diff --git a/files/mynettcptable.in b/files/mynettcptable.in new file mode 100644 index 0000000..5fece35 --- /dev/null +++ b/files/mynettcptable.in @@ -0,0 +1,40 @@ +#!/bin/sh + +# mynettcptable/files/mynettcptable.in 2022-05-13 09:04:03Z yo $ +# +# PROVIDE: mynettcptable +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# mynettcptable_enable (bool): Set to "YES" to enable mynettcptable. +# (default: "NO") +# +# mynettcptable_config (str): Configuration file. +# (default: "/usr/local/etc/mynettcptable.conf") +# +# mynettcptable_loglevel (str): Log level +# (default: "warn") +# +# mynettcptable_logfile (str): MyNetTCPTable logfile +# (default: "/var/log/mynettcptable.log") +# + +. /etc/rc.subr + +name=mynettcptable +rcvar=mynettcptable_enable + +load_rc_config $name + +: ${mynettcptable_enable="NO"} +: ${mynettcptable_config="/usr/local/etc/mynettcptable.conf"} +: ${mynettcptable_loglevel="warn"} +: ${mynettcptable_user:="mynettcptable"} +: ${mynettcptable_pidfile:="/var/run/mynettcptable.pid"} +: ${mynettcptable_logfile="/var/log/mynettcptable.log"} + +command="/usr/local/bin/mynettcptable" +command_args="-config=\${mynettcptable_config} -logLevel=\${mynettcptable_loglevel} -logLevel=\${mynettcptable_loglevel} > ${mynettcptable_logfile} 2>&1" +start_cmd="/usr/sbin/daemon -u ${mynettcptable_user} ${command} ${command_args}" + +run_rc_command "$1" diff --git a/pkg-descr b/pkg-descr new file mode 100644 index 0000000..7acdd5c --- /dev/null +++ b/pkg-descr @@ -0,0 +1,5 @@ +MyNetTCPTable is a postfix tcp_table service to get mynetworks from LDAP. +As ldap_table does not allow matching network range, MyNetTCPTable responds to +this by querying ipNetwork objects in LDAP and working with CIDR Format. + +WWW: https://git.nosd.in/yo/mynettcptable/ diff --git a/pkg-plist b/pkg-plist new file mode 100644 index 0000000..00ea7f0 --- /dev/null +++ b/pkg-plist @@ -0,0 +1 @@ +bin/mynettcptable