logo

overlay

My (experimental) gentoo overlay
commit: db99a948dfa7e6cd3049eba7d87547adc5082ddf
parent: 3167d99d601bd8fedf2d68ee6956ff6c3ef787a6
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed,  2 Jan 2019 22:48:52 +0100

net-misc/tinyssh: Bump to 20190101

Diffstat:

Mnet-misc/tinyssh/Manifest1+
Anet-misc/tinyssh/tinyssh-20190101.ebuild65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/net-misc/tinyssh/Manifest b/net-misc/tinyssh/Manifest @@ -1 +1,2 @@ DIST tinyssh-20181206.tar.gz 344395 BLAKE2B 42582d91aef40cce0aa2b0985a8f86172fd4d44214ecafc8033b3de750cf9e1cc39f8aab2d9e9c3923d1eb0501126a590834eee17e58aa98fd8e9ae0d90dfd80 SHA512 866a23331aa536a884430776cb33e7b5ae564a28c0d0f128ee59e7698a2e4d56d87da1d4eced7d67a9747c4f01a4a2aa9d68b04ace5e231f526201ea750ac0b6 +DIST tinyssh-20190101.tar.gz 244848 BLAKE2B a115bca82db020970a1cd8dd27f65f0d586f291fdcbcd786802babaa82befddd39ec8651dd4d6ebc3503e8c4e5903a335a6b14dc2957bae5519e4a7dee6fd495 SHA512 bf3829a71c29e8b0d5c2a145be9dfaf05efb1b98932f34f19f76e07871da4be10022bdde4c57ca49557b69931077b451bc2efbeab38d8ef24151fb73990f1012 diff --git a/net-misc/tinyssh/tinyssh-20190101.ebuild b/net-misc/tinyssh/tinyssh-20190101.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd + +DESCRIPTION="A small SSH server with state-of-the-art cryptography" +HOMEPAGE="https://tinyssh.org" +SRC_URI="https://github.com/janmojzis/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +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/tinyssh/tinysshcc/g' ./Makefile || die + + default +} + +src_compile() { + if use sodium + then + emake \ + LIBS="-lsodium" \ + CFLAGS="$CFLAGS -I/usr/include/sodium" \ + LDFLAGS="-L/usr/lib" + else + emake + 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." +}