mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 20:13:01 -04:00
net-misc/tinyssh: Add live ebuild
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
This commit is contained in:
@@ -7,11 +7,16 @@ inherit systemd
|
|||||||
|
|
||||||
DESCRIPTION="A small SSH server with state-of-the-art cryptography"
|
DESCRIPTION="A small SSH server with state-of-the-art cryptography"
|
||||||
HOMEPAGE="https://tinyssh.org"
|
HOMEPAGE="https://tinyssh.org"
|
||||||
SRC_URI="https://github.com/janmojzis/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
if [[ "${PV}" == "9999" ]]; 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="public-domain"
|
LICENSE="public-domain"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
|
|
||||||
IUSE="+sodium"
|
IUSE="+sodium"
|
||||||
|
|
||||||
|
|||||||
71
net-misc/tinyssh/tinyssh-99999999.ebuild
Normal file
71
net-misc/tinyssh/tinyssh-99999999.ebuild
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
# Copyright 1999-2021 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"
|
||||||
|
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="public-domain"
|
||||||
|
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."
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user