diff options
author | Neel Chauhan <nc@FreeBSD.org> | 2021-04-27 18:09:20 +0000 |
---|---|---|
committer | Neel Chauhan <nc@FreeBSD.org> | 2021-04-27 18:11:49 +0000 |
commit | 4ed1dafde04789df5bb273299fb593af34ccd81b (patch) | |
tree | 02549a69b3e13f5044068c2b1ffc60874141f51c | |
parent | f0514a6946969c75c263aaf6182f141db9a77b9a (diff) |
-rw-r--r-- | GIDs | 2 | ||||
-rw-r--r-- | UIDs | 2 | ||||
-rw-r--r-- | net/gmid/Makefile | 33 | ||||
-rw-r--r-- | net/gmid/distinfo | 3 | ||||
-rw-r--r-- | net/gmid/files/gmid.conf.sample | 15 | ||||
-rw-r--r-- | net/gmid/files/gmid.in | 42 | ||||
-rw-r--r-- | net/gmid/pkg-descr | 6 | ||||
-rw-r--r-- | net/gmid/pkg-plist | 3 |
8 files changed, 104 insertions, 2 deletions
@@ -229,7 +229,7 @@ rancid:*:286: webdis:*:287: ntopng:*:288: victoria-metrics:*:289: -# free: 290 +_gmid:*:290: # free: 291 # free: 292 # free: 293 @@ -234,7 +234,7 @@ rancid:*:286:286::0:0:RANCID daemon user:/usr/local/var/rancid:/bin/sh webdis:*:287:287::0:0:webdis daemon user:/nonexistent:/usr/sbin/nologin ntopng:*:288:288::0:0:ntopng daemon user:/nonexistent:/usr/sbin/nologin victoria-metrics:*:289:289::0:0:VictoriaMetrics user:/nonexistent:/usr/sbin/nologin -# free: 290 +_gmid:*:290:290::0:0:gmid daemon user:/var/empty:/usr/sbin/nologin # free: 291 # free: 292 # free: 293 diff --git a/net/gmid/Makefile b/net/gmid/Makefile new file mode 100644 index 000000000000..b4320c2b24b3 --- /dev/null +++ b/net/gmid/Makefile @@ -0,0 +1,33 @@ +PORTNAME= gmid +DISTVERSION= v1.6.1 +CATEGORIES= net + +MAINTAINER= freebsd@omarpolo.com +COMMENT= Simple and secure Gemini server + +LICENSE= ISCL +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libevent.so:devel/libevent \ + libtls.so:security/libressl + +USES= localbase ssl +USE_GITHUB= yes +GH_ACCOUNT= omar-polo +USE_RC_SUBR= gmid + +HAS_CONFIGURE= yes + +TEST_TARGET= regress + +USERS= _gmid +GROUPS= _gmid + +post-build: + ${STRIP_CMD} ${WRKSRC}/gmid + +post-install: + ${INSTALL_DATA} ${FILESDIR}/gmid.conf.sample \ + ${STAGEDIR}${PREFIX}/etc/ + +.include <bsd.port.mk> diff --git a/net/gmid/distinfo b/net/gmid/distinfo new file mode 100644 index 000000000000..13b38ee14981 --- /dev/null +++ b/net/gmid/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1619421708 +SHA256 (omar-polo-gmid-v1.6.1_GH0.tar.gz) = bdbc8f184812554f3574791dfe43e435fa6c4cafcbd70b4e1e7a48b2407a54a2 +SIZE (omar-polo-gmid-v1.6.1_GH0.tar.gz) = 59388 diff --git a/net/gmid/files/gmid.conf.sample b/net/gmid/files/gmid.conf.sample new file mode 100644 index 000000000000..1443c67c961e --- /dev/null +++ b/net/gmid/files/gmid.conf.sample @@ -0,0 +1,15 @@ +# drop privileges +user "_gmid" + +# it's a good idea to enable chroot, but +# beware that can make CGI scripting harder +# +#chroot "/var/gemini" + +# An example of a server block: +# +#server "localhost" { +# root "/var/gemini/localhost" +# cert "/usr/local/etc/ssl/gmid/gmid.crt" +# key "/usr/local/etc/ssl/gmid/gmid.key" +#} diff --git a/net/gmid/files/gmid.in b/net/gmid/files/gmid.in new file mode 100644 index 000000000000..8ab69c3bfff2 --- /dev/null +++ b/net/gmid/files/gmid.in @@ -0,0 +1,42 @@ +#!/bin/sh +# + +# PROVIDE: gmid +# REQUIRE: SERVERS +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable gmid: +# gmid_enable (bool): Set it to "YES" to enable gmid +# Default is "NO". +# gmid_config (string): Path to gmid configuration file. +# Default is "%%PREFIX%%/etc/gmid.conf" +# +# + +. /etc/rc.subr + +name="gmid" +rcvar="gmid_enable" + +start_precmd="gmid_checkconfig" +configtest_cmd="gmid_checkconfig" +extra_commands="configtest" + +: ${gmid_enable:="NO"} +: ${gmid_config:="%%PREFIX%%/etc/gmid.conf"} + +load_rc_config $name + +command="%%PREFIX%%/bin/${name}" +command_flags="-c ${gmid_config}" + +required_files="${gmid_config}" + +gmid_checkconfig() +{ + echo "Performing sanity check on gmid configuration:" + eval ${command} -n ${command_flags} +} + +run_rc_command "$1" diff --git a/net/gmid/pkg-descr b/net/gmid/pkg-descr new file mode 100644 index 000000000000..6e2c141ad413 --- /dev/null +++ b/net/gmid/pkg-descr @@ -0,0 +1,6 @@ +gmid is a server for the Gemini protocol. It has various +features, among which Capsicum support and a "config-less" +mode akin to "python -m http.server" to quickly serve local +directories from the shell. + +WWW: https://github.com/omar-polo/gmid diff --git a/net/gmid/pkg-plist b/net/gmid/pkg-plist new file mode 100644 index 000000000000..2dbb6ab99576 --- /dev/null +++ b/net/gmid/pkg-plist @@ -0,0 +1,3 @@ +@sample etc/gmid.conf.sample +bin/gmid +man/man1/gmid.1.gz |