diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2024-11-12 05:24:20 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-11-23 16:54:03 +0000 |
commit | 91ddbe6aa350937b49c1b895342d2e4d1337c40c (patch) | |
tree | 27b0c023998de9afe30060cb420e20791dbb0b50 /net-misc | |
parent | sys-apps/syd: drop 3.28.4 (diff) | |
download | gentoo-91ddbe6aa350937b49c1b895342d2e4d1337c40c.tar.gz gentoo-91ddbe6aa350937b49c1b895342d2e4d1337c40c.tar.bz2 gentoo-91ddbe6aa350937b49c1b895342d2e4d1337c40c.zip |
net-misc/tinyssh: add 20241111
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/tinyssh/Manifest | 1 | ||||
-rw-r--r-- | net-misc/tinyssh/tinyssh-20241111.ebuild | 71 | ||||
-rw-r--r-- | net-misc/tinyssh/tinyssh-99999999.ebuild | 38 |
3 files changed, 89 insertions, 21 deletions
diff --git a/net-misc/tinyssh/Manifest b/net-misc/tinyssh/Manifest index 2bd2ee5a59e1..f924b1dc6fea 100644 --- a/net-misc/tinyssh/Manifest +++ b/net-misc/tinyssh/Manifest @@ -1 +1,2 @@ DIST tinyssh-20240101.tar.gz 249848 BLAKE2B 228547c6f4acae3b77a338df1ced3a49e0b4c72257ce081b3b50941c29c5a39a0b1623f6aefce2721b9dde9fae03cb8c1c87b6b019658d578ddcca99e0a021f5 SHA512 b48561cfc11bb6d2e9b1c805c9dfc36be5f1bbbf04a455b8db3f02b5b8df15e420fcd93d58fb23526baaf0fd70e9969deca261152a656015f12a433a61092e90 +DIST tinyssh-20241111.tar.gz 263324 BLAKE2B 81fbf6b3af4f6ef72acf1a339c4b0b6e7dce0aa3afee4947aa93ac45120836ff0febcf13dcbaea43be0dc4eb1e80c47a0a3b7dcfc8e4b00ad6577c1b366593ae SHA512 52716b6f8998f41180080a33cce0bcb3ff5eb1648b4c61b9ff99c3070f95c1900ab62bc23b30353905d146d557b2550b393c940f25a51d174648951cbc7ec2fc diff --git a/net-misc/tinyssh/tinyssh-20241111.ebuild b/net-misc/tinyssh/tinyssh-20241111.ebuild new file mode 100644 index 000000000000..07aeb225e8ec --- /dev/null +++ b/net-misc/tinyssh/tinyssh-20241111.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd toolchain-funcs + +DESCRIPTION="A small SSH server with state-of-the-art cryptography" +HOMEPAGE="https://tinyssh.org" +if [[ "${PV}" == "99999999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/janmojzis/tinyssh.git" +else + SRC_URI="https://github.com/janmojzis/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="CC0-1.0" +SLOT="0" + +IUSE="+sodium" + +DEPEND=" + sodium? ( dev-libs/libsodium:= ) +" +RDEPEND=" + ${DEPEND} + sys-apps/ucspi-tcp +" + +src_prepare() { + default + + echo 'gentoo-autoheaders: $(AUTOHEADERS)' >> Makefile +} + +src_configure() { + tc-export PKG_CONFIG CC + + if use sodium + then + # -I${includedir}/sodium needed as tinyssh uses `#include <randombytes.h>` rather than `#include <sodium.h>` + export CFLAGS="${CFLAGS} $("${PKG_CONFIG}" --cflags libsodium) -I$("${PKG_CONFIG}" --variable=includedir libsodium)/sodium/" + export LDFLAGS="${LDFLAGS} $("${PKG_CONFIG}" --libs libsodium)" + fi + + emake gentoo-autoheaders + + for i in has*.log + do + einfo "$i" + cat "$i" + done +} + +src_install() { + einstalldocs + emake install DESTDIR="$D" PREFIX=/usr + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + + systemd_newunit "${FILESDIR}/${PN}.service" "${PN}@.service" + systemd_newunit "${FILESDIR}/${PN}.socket" "${PN}@.socket" + systemd_dounit "${FILESDIR}/${PN}-makekey.service" +} + +pkg_postinst() { + einfo "TinySSH is in beta stage, and ready for production use." + einfo "See https://tinyssh.org for more information." +} diff --git a/net-misc/tinyssh/tinyssh-99999999.ebuild b/net-misc/tinyssh/tinyssh-99999999.ebuild index 9d2ed3e6c433..07aeb225e8ec 100644 --- a/net-misc/tinyssh/tinyssh-99999999.ebuild +++ b/net-misc/tinyssh/tinyssh-99999999.ebuild @@ -28,38 +28,34 @@ RDEPEND=" sys-apps/ucspi-tcp " -PATCHES=( - "${FILESDIR}/tinyssh-20240101_conf_cflags.patch" -) - src_prepare() { - # Use make-tinysshcc.sh script, which has no tests and doesn't execute - # binaries. See https://github.com/janmojzis/tinyssh/issues/2 - sed -i 's/make-tinyssh\.sh/make-tinysshcc.sh/g' ./Makefile || die - default + + echo 'gentoo-autoheaders: $(AUTOHEADERS)' >> Makefile } -src_compile() { - tc-export PKG_CONFIG +src_configure() { + tc-export PKG_CONFIG CC if use sodium then - # -I${includedir}/sodium needed as tinyssh uses `#include "crypto_auth_hmacsha256.h"` rather than `#include <sodium.h>` - emake \ - CC="$(tc-getCC)" \ - LIBS="$("${PKG_CONFIG}" --libs libsodium)" \ - CFLAGS="${CFLAGS} $("${PKG_CONFIG}" --cflags libsodium) -I$("${PKG_CONFIG}" --variable=includedir libsodium)/sodium/" \ - LDFLAGS="${LDFLAGS}" - else - emake CC="$(tc-getCC)" + # -I${includedir}/sodium needed as tinyssh uses `#include <randombytes.h>` rather than `#include <sodium.h>` + export CFLAGS="${CFLAGS} $("${PKG_CONFIG}" --cflags libsodium) -I$("${PKG_CONFIG}" --variable=includedir libsodium)/sodium/" + export LDFLAGS="${LDFLAGS} $("${PKG_CONFIG}" --libs libsodium)" fi + + emake gentoo-autoheaders + + for i in has*.log + do + einfo "$i" + cat "$i" + done } src_install() { - dosbin build/bin/tinysshd{,-makekey} - dobin build/bin/tinysshd-printkey - doman man/* + einstalldocs + emake install DESTDIR="$D" PREFIX=/usr newinitd "${FILESDIR}/${PN}.initd" "${PN}" newconfd "${FILESDIR}/${PN}.confd" "${PN}" |