aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2016-09-15 20:39:47 +0800
committerolgeni <olgeni@FreeBSD.org>2016-09-15 20:39:47 +0800
commit06b3f06ece5c75dbb92a296084c0ba2c94c5dd3e (patch)
tree9b3ffb3be22a361ff4674e125c047140abc5d158
parenta6b5d147ed6d263293be6e10020b1670c42e4db0 (diff)
downloadfreebsd-ports-gnome-06b3f06ece5c75dbb92a296084c0ba2c94c5dd3e.tar.gz
freebsd-ports-gnome-06b3f06ece5c75dbb92a296084c0ba2c94c5dd3e.tar.zst
freebsd-ports-gnome-06b3f06ece5c75dbb92a296084c0ba2c94c5dd3e.zip
Add a @sample configuration file to net/nats, plus some configuration
examples taken from the port's tests.
-rw-r--r--net/nats/Makefile12
-rw-r--r--net/nats/files/gnatsd.conf3
-rw-r--r--net/nats/files/gnatsd.sh.in2
-rw-r--r--net/nats/pkg-plist23
4 files changed, 36 insertions, 4 deletions
diff --git a/net/nats/Makefile b/net/nats/Makefile
index 4186e5539e67..7dddb9a9d111 100644
--- a/net/nats/Makefile
+++ b/net/nats/Makefile
@@ -3,7 +3,7 @@
PORTNAME= nats
PORTVERSION= 0.9.4
DISTVERSIONPREFIX= v
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net
MAINTAINER= olgeni@FreeBSD.org
@@ -13,12 +13,18 @@ LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go
-GO_PKGNAME= github.com/nats-io/gnatsd
+GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT}
USE_GITHUB= yes
GH_ACCOUNT= nats-io
GH_PROJECT= gnatsd
-PLIST_FILES= bin/gnatsd
USE_RC_SUBR= gnatsd.sh
+post-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc
+ ${INSTALL_SCRIPT} ${FILESDIR}/gnatsd.conf ${STAGEDIR}${PREFIX}/etc/gnatsd.conf.sample
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/server && ${COPYTREE_SHARE} configs ${STAGEDIR}${DOCSDIR}
+
.include <bsd.port.mk>
diff --git a/net/nats/files/gnatsd.conf b/net/nats/files/gnatsd.conf
new file mode 100644
index 000000000000..123fb4b595c3
--- /dev/null
+++ b/net/nats/files/gnatsd.conf
@@ -0,0 +1,3 @@
+listen: localhost:4222 # host/port to listen for client connections
+http: localhost:8222 # HTTP monitoring port
+syslog: true
diff --git a/net/nats/files/gnatsd.sh.in b/net/nats/files/gnatsd.sh.in
index 41c1c7e34992..086fd2f537be 100644
--- a/net/nats/files/gnatsd.sh.in
+++ b/net/nats/files/gnatsd.sh.in
@@ -19,7 +19,7 @@ rcvar=`set_rcvar`
load_rc_config ${name}
: ${gnatsd_enable="NO"}
: ${gnatsd_username="nobody"}
-: ${gnatsd_options="-m 8222 -s"}
+: ${gnatsd_options="-c %%PREFIX%%/etc/gnatsd.conf"}
command=/usr/sbin/daemon
procname=%%PREFIX%%/bin/gnatsd
diff --git a/net/nats/pkg-plist b/net/nats/pkg-plist
new file mode 100644
index 000000000000..1a3e6ccf9701
--- /dev/null
+++ b/net/nats/pkg-plist
@@ -0,0 +1,23 @@
+bin/gnatsd
+@sample etc/gnatsd.conf.sample
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTDOCS%%%%DOCSDIR%%/configs/authorization.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/certs/key.pem
+%%PORTDOCS%%%%DOCSDIR%%/configs/certs/server.pem
+%%PORTDOCS%%%%DOCSDIR%%/configs/cluster.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/listen.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/listen_port.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/listen_port_with_colon.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/multiple_users.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/seed.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/seed_tls.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/srv_a.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/srv_a_bcrypt.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/srv_b.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/srv_b_bcrypt.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/test.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/tls.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/tls_bad_cipher.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/tls_ciphers.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/tls_empty_cipher.conf
+%%PORTDOCS%%%%DOCSDIR%%/configs/tls_test.conf