first commit

This commit is contained in:
yo 2022-05-14 11:33:22 +02:00
commit 7b5a9e9eca
5 changed files with 92 additions and 0 deletions

43
Makefile Normal file
View File

@ -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 <bsd.port.mk>

3
distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1652519865
SHA256 (v1.0.0-rc1.tar.gz) = 20668e2612fd64759ebbc495202ab716728224b3cfdf793757a0495ee944ed2f
SIZE (v1.0.0-rc1.tar.gz) = 7744

40
files/mynettcptable.in Normal file
View File

@ -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"

5
pkg-descr Normal file
View File

@ -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/

1
pkg-plist Normal file
View File

@ -0,0 +1 @@
bin/mynettcptable