diff --git a/srcpkgs/tinyssh/files/tinysshd/run b/srcpkgs/tinyssh/files/tinysshd/run new file mode 100644 index 0000000000..2e382737cc --- /dev/null +++ b/srcpkgs/tinyssh/files/tinysshd/run @@ -0,0 +1,14 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +# Override OPTS in conf. Suggested: +# OPTS='-x sftp=/usr/libexec/sftp-server -l -v' +# To run on a port other than 22, override SSHPORT. + +# tinyssh-makekey doesn't have the -A option from ssh-keygen. +# What do we do when tinyssh decides to add new key types? +# Tomorrow's problem; cross that bridge when we come to it. +if [ ! -d /etc/tinyssh/sshkeydir ]; then + tinysshd-makekey -q /etc/tinyssh/sshkeydir +fi + +exec tcpserver -HRDl0 0 ${SSHPORT:=22} tinysshd ${OPTS:=-l -v} /etc/tinyssh/sshkeydir 2>/dev/null diff --git a/srcpkgs/tinyssh/template b/srcpkgs/tinyssh/template new file mode 100644 index 0000000000..1a18499bea --- /dev/null +++ b/srcpkgs/tinyssh/template @@ -0,0 +1,32 @@ +# Template file for 'tinyssh' +pkgname=tinyssh +_datever=20160812 +version="0.0.${_datever}" +revision=1 +wrksrc=${pkgname}-${_datever} +build_style=gnu-makefile +make_dirs="/etc/tinyssh 0755 root root" +short_desc="A minimalistic SSH server" +maintainer="Christopher Brannon " +license="Public Domain" +depends="ucspi-tcp" +homepage="https://tinyssh.org" +distfiles="https://github.com/janmojzis/${pkgname}/archive/${_datever}.tar.gz" +checksum=89b407548cee0e98bf90a0bf43d5e70ac380f9ba02966a3eecce6c98d075b369 +nocross=yes + +pre_build() { + echo '/usr/bin' > conf-bin + # Some of the tinyssh tests really shouldn't be run under xbps-src + # or on builders, so comment them all out. + # Build system needs a way to disable tests. Here's a dirty hack. + echo 'int main(void) { return 0; }' > cmbbogustest.c + for i in tinyssh-tests/*test.c crypto-tests/*test.c; do + cp cmbbogustest.c "$i" + done +} + +post_install() { + vlicense LICENCE + vsv tinysshd +} diff --git a/srcpkgs/tinyssh/update b/srcpkgs/tinyssh/update new file mode 100644 index 0000000000..2fddfbd33c --- /dev/null +++ b/srcpkgs/tinyssh/update @@ -0,0 +1,3 @@ +version="${_datever}" +site="https://api.github.com/repos/janmojzis/tinyssh/releases" +pattern='"name"\s*:\s*"\K[\d]+(?=")'