Merge updates from master

This commit is contained in:
Repository mirror & CI
2021-03-30 09:05:35 +00:00
8 changed files with 216 additions and 4 deletions

View File

@@ -1,10 +1,10 @@
# Copyright 2020 Gentoo Authors
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit acct-group
KEYWORDS="~amd64"
KEYWORDS="~amd64 ~x86"
ACCT_GROUP_ID=-1

View File

@@ -1,4 +1,4 @@
# Copyright 2020 Gentoo Authors
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,7 +6,7 @@ EAPI=7
inherit acct-user
DESCRIPTION="User for gemini daemon"
KEYWORDS="~amd64"
KEYWORDS="~amd64 ~x86"
ACCT_USER_ID=-1
ACCT_USER_GROUPS=( gemini )

1
net-misc/gmid/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST gmid-1.6.tar.gz 59402 BLAKE2B 1a13ae3f598a406e7920ad3a4f73cb230d70fe3bf4a1017d8d196ab80fdc0ffcf339ad79c64de93dc69d06e294132d714ad8ea1a5248dc69377e8d088f772d6c SHA512 cf118ac3b067b23d480006bccf36218ab0bf91d778092855a01706782fb0c68252157615d92d143d29deb8331422ef1263228b9eb53dd30e64a480b17c48af7a

View File

@@ -0,0 +1,13 @@
# /etc/conf.d/gmid
# Configuration file
#GMID_CONFIGFILE="/etc/gmid/gmid.conf"
# PID file
#GMID_PIDFILE="/var/run/gmid.pid"
# User to run gmid as
#GMID_USER="gemini"
# Group to run gmid as
#GMID_GROUP="gemini"

View File

@@ -0,0 +1,53 @@
#!/sbin/openrc-run
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
extra_commands="configtest"
extra_started_commands="reload"
description="Simple and secure Gemini server"
description_configtest="Run gmid's internal config check."
description_reload="Reload the gmid configuration without losing connections."
GMID_CONFIGFILE=${GMID_CONFIGFILE:-/etc/gmid/gmid.conf}
command="/usr/bin/gmid"
command_args="-c \"${GMID_CONFIGFILE}\""
pidfile=${GMID_PIDFILE:-/var/run/gmid.pid}
user=${GMID_USER:-gemini}
group=${GMID_GROUP:-gemini}
depend() {
need net
use dns logger netmount
}
start_pre() {
if [ "${RC_CMD}" != "restart" ]; then
configtest || return 1
fi
}
stop_pre() {
if [ "${RC_CMD}" = "restart" ]; then
configtest || return 1
fi
}
stop_post() {
rm -f ${pidfile}
}
reload() {
configtest || return 1
ebegin "Refreshing gmid's configuration"
start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
eend $? "Failed to reload gmid"
}
configtest() {
ebegin "Checking gmid's configuration"
${command} -c "${GMID_CONFIGFILE}" -n
eend $? "failed, please correct errors in the config file"
}

View File

@@ -0,0 +1,65 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
DESCRIPTION="simple and secure Gemini server"
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html"
if [[ ${PV} == "9999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://git.omarpolo.com/${PN}"
else
SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="ISC"
SLOT="0"
IUSE="libressl"
DEPEND="acct-user/gemini
dev-libs/libevent
!libressl? ( dev-libs/libretls )
libressl? ( dev-libs/libressl )"
BDEPEND="sys-devel/flex
virtual/yacc"
RDEPEND="${DEPEND}"
DOCS=( README.md ChangeLog )
src_prepare() {
default
# QA Notice: command not found
# remove `etags` from the "all" target
sed \
-e "s/^\(all: .*\) TAGS \(.*\)$/\1 \2/" \
-i Makefile || die
}
src_configure() {
# note: not an autoconf configure script
./configure \
CC="$(tc-getCC)" \
PREFIX="${EPREFIX}"/usr/share \
BINDIR="${EPREFIX}"/usr/bin \
CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" || die
}
src_install() {
default
newinitd "${FILESDIR}"/gmid.initd gmid
newconfd "${FILESDIR}"/gmid.confd gmid
}
pkg_postinst() {
einfo "This gemini server can be run as a user with zero configuration.\n"
einfo "In order to use it with the init service you will need to generate a"
einfo "self-signed TLS certificate and key and set up the configuration"
einfo "file (see man 1 gmid for details)."
}

View File

@@ -0,0 +1,65 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
DESCRIPTION="simple and secure Gemini server"
HOMEPAGE="https://www.omarpolo.com/pages/gmid.html"
if [[ ${PV} == "9999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://git.omarpolo.com/${PN}"
else
SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="ISC"
SLOT="0"
IUSE="libressl"
DEPEND="acct-user/gemini
dev-libs/libevent
!libressl? ( dev-libs/libretls )
libressl? ( dev-libs/libressl )"
BDEPEND="sys-devel/flex
virtual/yacc"
RDEPEND="${DEPEND}"
DOCS=( README.md ChangeLog )
src_prepare() {
default
# QA Notice: command not found
# remove `etags` from the "all" target
sed \
-e "s/^\(all: .*\) TAGS \(.*\)$/\1 \2/" \
-i Makefile || die
}
src_configure() {
# note: not an autoconf configure script
./configure \
CC="$(tc-getCC)" \
PREFIX="${EPREFIX}"/usr/share \
BINDIR="${EPREFIX}"/usr/bin \
CFLAGS="${CFLAGS}" \
LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" || die
}
src_install() {
default
newinitd "${FILESDIR}"/gmid.initd gmid
newconfd "${FILESDIR}"/gmid.confd gmid
}
pkg_postinst() {
einfo "This gemini server can be run as a user with zero configuration.\n"
einfo "In order to use it with the init service you will need to generate a"
einfo "self-signed TLS certificate and key and set up the configuration"
einfo "file (see man 1 gmid for details)."
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<upstream>
<maintainer>
<name>Omar Polo</name>
<email>op@omarpolo.com</email>
</maintainer>
<changelog>https://git.omarpolo.com/gmid/tree/ChangeLog</changelog>
</upstream>
<maintainer type="person">
<email>cyber@sysrq.in</email>
<name>Anna</name>
</maintainer>
</pkgmetadata>