unos-repository

APK repository for unos
git clone git://git.finwo.net/misc/unos-repository
Log | Files | Refs | README

template (2084B)


      1 # Template file for 'tinyssh'
      2 pkgname=tinyssh
      3 version=20260906
      4 revision=4
      5 short_desc="Small SSH server"
      6 maintainer="finwo <finwo@pm.me>"
      7 license="CC0-1.0"
      8 homepage="https://tinyssh.org"
      9 distfiles="https://github.com/janmojzis/tinyssh/archive/refs/tags/20260906.tar.gz"
     10 checksum=54c143281e3a7430e9db80847c3242bbd6bf859ceafb5a18562bc4ecbbb2806d
     11 depends="busybox"
     12 
     13 # Notes:
     14 # - Daemon-only package: upstream ships no client. tinysshd is a multicall
     15 #   binary (makekey/printkey/noneauthd are argv[0] modes); the template
     16 #   installs real symlinks rather than the copies `make install` would lay.
     17 # - Host keys are provisioned by the service run script itself
     18 #   (idempotent tinysshd-makekey guarded on ed25519.pk), never packaged.
     19 #   Auth is stock ~/.ssh/authorized_keys, ssh-ed25519 only.
     20 # - No `make install`: full control over destinations via vinstall.
     21 
     22 do_build() {
     23   cd "${WRKSRC}"
     24   make -j"$(nproc)"
     25   [ -x ./tinysshd ] || die "tinyssh: tinysshd binary missing after build"
     26 }
     27 
     28 do_install() {
     29   cd "${WRKSRC}"
     30   vinstall tinysshd 755 usr/sbin tinysshd
     31   # -f: DESTDIR persists across rebuilds, links may already exist
     32   ( cd "${DESTDIR}/usr/sbin" && ln -sfn tinysshd tinysshd-makekey ) || die "link makekey"
     33   ( cd "${DESTDIR}/usr/sbin" && ln -sfn tinysshd tinysshd-printkey ) || die "link printkey"
     34   ( cd "${DESTDIR}/usr/sbin" && ln -sfn tinysshd tinysshnoneauthd ) || die "link noneauthd"
     35   vinstall man/tinysshd.8 644 usr/share/man/man8 tinysshd.8
     36   vinstall man/tinysshd-makekey.8 644 usr/share/man/man8 tinysshd-makekey.8
     37   vinstall man/tinysshd-printkey.8 644 usr/share/man/man8 tinysshd-printkey.8
     38   vinstall man/tinysshnoneauthd.8 644 usr/share/man/man8 tinysshnoneauthd.8
     39   vinstall ${FILESDIR}/tinyssh-run 755 etc/sv/tinyssh run
     40   vinstall ${FILESDIR}/tinyssh-check 755 etc/sv/tinyssh check
     41   vinstall ${FILESDIR}/tinyssh-log-run 755 etc/sv/tinyssh/log run
     42   # owned (empty) so the keydir parent always exists; the run script also
     43   # mkdir -p's defensively for wiped-state recovery
     44   install -d "${DESTDIR}/etc/tinyssh"
     45   install -d "${DESTDIR}/var/log/tinyssh"
     46 }