M README.md => README.md +1 -0
@@ 4,4 4,5 @@ A general overlay, with no specific focus. Currently includes:
* app-emulation/qemu-start : "Simple interactive POSIX shell script to facilitate launching QEMU VMs"
* app-text/epub-create : "POSIX shell script for creating a minimal EPUB from a small collection of files"
+* net-misc/nncp : "Utilities for securely store-and-forwarding files, mail and commands"
* net-news/newsd : "NNTP news server for private newsgroup serving on a single server"
A net-misc/nncp/Manifest => net-misc/nncp/Manifest +1 -0
@@ 0,0 1,1 @@
+DIST nncp-8.11.0.tar.xz 2662604 BLAKE2B 4084acc95efc235c9246384d3cefee85c241d40fff4ddc32a3d256a03f47d805c00424ca93c4ef8d3f88dacdc731b4af377fdb063ba68b4c82dc0d434fadf469 SHA512 5a19d08e144deaf7c1ab59a9a008da44f4a29e380ae8ffa3ccfb30cb38a85b8a1a330405efc97d29bf47d4ba345380940a6c58d0c4eef0bde7079f8369b16a55
A net-misc/nncp/files/nncp-caller.service => net-misc/nncp/files/nncp-caller.service +11 -0
@@ 0,0 1,11 @@
+[Unit]
+Description=Main NNCP tosser
+
+[Service]
+ExecStart=/usr/bin/nncp-caller -noprogress
+Restart=always
+User=nncp
+Group=nncp
+
+[Install]
+WantedBy=multi-user.target
A net-misc/nncp/files/nncp-daemon.service => net-misc/nncp/files/nncp-daemon.service +11 -0
@@ 0,0 1,11 @@
+[Unit]
+Description=Main NNCP daemon
+
+[Service]
+ExecStart=/usr/bin/nncp-daemon -noprogress
+Restart=always
+User=nncp
+Group=nncp
+
+[Install]
+WantedBy=multi-user.target
A net-misc/nncp/files/nncp-toss.service => net-misc/nncp/files/nncp-toss.service +11 -0
@@ 0,0 1,11 @@
+[Unit]
+Description=Main NNCP tosser
+
+[Service]
+ExecStart=/usr/bin/nncp-toss -noprogress -cycle 10
+Restart=always
+User=nncp
+Group=nncp
+
+[Install]
+WantedBy=multi-user.target
A net-misc/nncp/metadata.xml => net-misc/nncp/metadata.xml +12 -0
@@ 0,0 1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>flexibeast@gmail.com</email>
+ <name>Alexis</name>
+ </maintainer>
+ <use>
+ <flag name="yggdrasil">Enable support for the Yggdrasil experimental
+ routing scheme</flag>
+ </use>
+</pkgmetadata>
A net-misc/nncp/nncp-8.11.0.ebuild => net-misc/nncp/nncp-8.11.0.ebuild +87 -0
@@ 0,0 1,87 @@
+# Copyright 2019-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd
+
+DESCRIPTION="Utilities for securely store-and-forwarding files, mail and commands"
+HOMEPAGE="http://www.nncpgo.org/"
+SRC_URI="http://www.nncpgo.org/download/${P}.tar.xz"
+LICENSE="GPL-3"
+SLOT="0"
+
+KEYWORDS="~amd64"
+IUSE="doc systemd yggdrasil"
+RESTRICT="strip"
+
+export GOFLAGS="-buildmode=pie"
+export GO111MODULE=auto
+export EGO_PN="go.cypherpunks.ru/nncp/v8"
+
+BDEPEND="${BDEPEND}
+ app-arch/unzip
+ >=dev-lang/go-1.20
+"
+
+RDEPEND="${RDEPEND}
+ acct-user/nncp
+"
+
+src_prepare() {
+
+ touch nncp.hjson
+ eapply_user
+
+}
+
+src_configure() {
+
+ if ! use yggdrasil; then
+ export GO_CFLAGS='-tags noyggdrasil '
+ fi
+
+}
+
+src_compile() {
+
+ SENDMAIL=${SENDMAIL:-/usr/sbin/sendmail}
+ CFGPATH=${CFGPATH:-$PREFIX/etc/nncp/nncp.hjson}
+ SPOOLPATH=${SPOOLPATH:-/var/spool/nncp}
+ LOGPATH=${LOGPATH:-/var/spool/nncp/log}
+
+ cd src
+ MOD=$(go list -mod=vendor)
+ GO_LDFLAGS=''
+ GO_LDFLAGS="${GO_LDFLAGS} -X ${MOD}.DefaultCfgPath=${CFGPATH}"
+ GO_LDFLAGS="${GO_LDFLAGS} -X ${MOD}.DefaultSendmailPath=${SENDMAIL}"
+ GO_LDFLAGS="${GO_LDFLAGS} -X ${MOD}.DefaultSpoolPath=${SPOOLPATH}"
+ GO_LDFLAGS="${GO_LDFLAGS} -X ${MOD}.DefaultLogPath=${LOGPATH}"
+ for CMD in $(cat ../bin/cmd.list); do
+ go build -mod=vendor -o ../bin/${CMD} ${GOFLAGS} -ldflags "${GO_LDFLAGS}" ./cmd/${CMD}
+ done
+ go build -mod=vendor -o ../bin/hjson-cli ${GOFLAGS} github.com/hjson/hjson-go/v4/hjson-cli
+
+}
+
+src_install() {
+
+ for CMD in $(cat bin/cmd.list); do
+ dobin bin/${CMD}
+ done
+
+ insinto /etc/nncp
+ doins -r nncp.hjson
+
+ if use doc; then
+ dodoc AUTHORS NEWS NEWS.RU README README.RU THANKS
+ doinfo doc/nncp.info
+ fi
+
+ if use systemd; then
+ for UNIT in nncp-caller nncp-daemon nncp-toss; do
+ systemd_newunit "${FILESDIR}/${UNIT}.service" "${UNIT}.service"
+ done
+ fi
+
+}