diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2023-01-01 22:27:12 +0100 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2023-01-01 22:27:57 +0100 |
commit | 9f92dcbfc481d575480b9f6df2b82270c7baf08c (patch) | |
tree | 125533c4dc1fec57622209ef576d5eea62625edb | |
parent | net-misc/tinyssh: drop 20220222 (diff) | |
download | guru-9f92dcbf.tar.gz guru-9f92dcbf.tar.bz2 guru-9f92dcbf.zip |
net-misc/tinyssh: add 20230101
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
-rw-r--r-- | net-misc/tinyssh/Manifest | 1 | ||||
-rw-r--r-- | net-misc/tinyssh/tinyssh-20230101.ebuild | 71 | ||||
-rw-r--r-- | net-misc/tinyssh/tinyssh-99999999.ebuild | 4 |
3 files changed, 74 insertions, 2 deletions
diff --git a/net-misc/tinyssh/Manifest b/net-misc/tinyssh/Manifest index 739578697..a02f1ece6 100644 --- a/net-misc/tinyssh/Manifest +++ b/net-misc/tinyssh/Manifest @@ -1 +1,2 @@ DIST tinyssh-20220801.tar.gz 249071 BLAKE2B 77509d2e2c7f84d675bb1f64df6ee7925e5c1f3f1be998b8438fa6e63954fca5dcbc724eb9993f22267f23e840e5f66077d48dfaba0f8d3c0b4b51d5098b457f SHA512 fe9f45f7a06c7c30d56a2ce32e656b1d3a8d12ccdb99dfd4087a145fdf4c5b54a1f1739f5a83dc8158f1164f36c89c6e349b370e1946ca0cfc81d27cae143135 +DIST tinyssh-20230101.tar.gz 249091 BLAKE2B 5efb6eab07c136763ab27588661618763d2ca174dce4b0f4b5fd5dcca56044f8361342de780931070cff8efe43f6efa68eaf912e9ae38febfcff733f79e23018 SHA512 6beaf266058a89a78c710abd1a02feff0641a93d0d92aa07a1ad1ba3f6b3344bc312bb5a4cd5c06c6dcc83d25e48a801f9cfcfbb3de0f73904f36d32d4430482 diff --git a/net-misc/tinyssh/tinyssh-20230101.ebuild b/net-misc/tinyssh/tinyssh-20230101.ebuild new file mode 100644 index 000000000..cd991afca --- /dev/null +++ b/net-misc/tinyssh/tinyssh-20230101.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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() { + # Leave optimization level to user CFLAGS + sed -i 's/-Os -fomit-frame-pointer -funroll-loops//g' ./conf-cc || die + + # 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 +} + +src_compile() { + if use sodium + then + emake \ + CC="$(tc-getCC)" + LIBS="-lsodium" \ + CFLAGS="${CFLAGS} -I/usr/include/sodium" \ + LDFLAGS="${LDFLAGS} -L/usr/lib" + else + emake CC="$(tc-getCC)" + fi +} + +src_install() { + dosbin build/bin/tinysshd{,-makekey} + dobin build/bin/tinysshd-printkey + doman man/* + + 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 99c90d3e6..cd991afca 100644 --- a/net-misc/tinyssh/tinyssh-99999999.ebuild +++ b/net-misc/tinyssh/tinyssh-99999999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -15,7 +15,7 @@ else KEYWORDS="~amd64 ~x86" fi -LICENSE="public-domain" +LICENSE="CC0-1.0" SLOT="0" IUSE="+sodium" |