diff --git a/cs-dev-sshkeys/.gitignore b/cs-dev-sshkeys/.gitignore index a7fbd40..e6cfb54 100644 --- a/cs-dev-sshkeys/.gitignore +++ b/cs-dev-sshkeys/.gitignore @@ -1,6 +1,6 @@ * -!*.sh !*.install !.gitignore +!authorized_keys !Makefile !PKGBUILD \ No newline at end of file diff --git a/cs-dev-sshkeys/PKGBUILD b/cs-dev-sshkeys/PKGBUILD index 5da2c84..43e5e30 100644 --- a/cs-dev-sshkeys/PKGBUILD +++ b/cs-dev-sshkeys/PKGBUILD @@ -1,11 +1,32 @@ # Maintainer: Markus Pesch pkgname=cs-dev-sshkeys -pkgver=0.1.0 -pkgrel=1 -pkgdesc='Register the development ssh keys in /root/.ssh/authorized_keys' +pkgver=0.2.0 +pkgrel=0 +pkgdesc='Register development ssh keys in /root/.ssh/authorized_keys' arch=('any') -url=https://git.cryptic.systems/volker.raschek/PKGBUILDs/any/cs-dev-sshkys +url=https://git.cryptic.systems/volker.raschek/set-sshkeys license=('Apache 2.0') depends=('openssh') -install=${pkgname}.install \ No newline at end of file +install=${pkgname}.install +makedepends=('git' 'go' 'make') +source=( + "https://git.cryptic.systems/volker.raschek/set-sshkeys/archive/v${pkgver}.tar.gz" + "local://authorized_keys" +) +sha512sums=( + "20f237a92d40ae0324ec5e6c4226965148ef8aef3c2cd41279d2278f93353b3f93d6e8cf1cc4fe9b9abe6dc7d9588e60d0a6a983bd7c6ff9ede000925b91479f" + "SKIP" +) + +build() { + GOBIN=${HOME}/go/bin + PATH=${GOBIN}:${PATH} + make --directory ${srcdir}/set-sshkeys bin/tmp/set-sshkeys VERSION=${pkgver} +} + +package() { + install -D --mode 644 ${srcdir}/authorized_keys ${pkgdir}/etc/set-sshkeys/authorized_keys + install -D --mode 4755 ${srcdir}/set-sshkeys/bin/tmp/set-sshkeys ${pkgdir}/usr/bin/set-sshkeys + install -D --mode 644 ${srcdir}/set-sshkeys/LICENSE ${pkgdir}/usr/share/licenses/set-sshkeys/LICENSE +} \ No newline at end of file diff --git a/cs-dev-sshkeys/authorized_keys b/cs-dev-sshkeys/authorized_keys new file mode 100644 index 0000000..d8db36b --- /dev/null +++ b/cs-dev-sshkeys/authorized_keys @@ -0,0 +1,3 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPOydCxv9/tAV7AdS2HsUIEu547Z5qUJnWYwiO7rI9YL markus@markus-pc +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUTcUBb+55jRY9TkpLgm8K/8nJfEXyjEX8zljdCCRpi markus@markus-nb +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFo3dc6H1FtVuliB70QY21+7Hsuheqq5ldfgGWg+QLXJ root@ares diff --git a/cs-dev-sshkeys/cs-dev-sshkeys.install b/cs-dev-sshkeys/cs-dev-sshkeys.install index fa1b333..8ccd792 100644 --- a/cs-dev-sshkeys/cs-dev-sshkeys.install +++ b/cs-dev-sshkeys/cs-dev-sshkeys.install @@ -1,25 +1,15 @@ post_install(){ - cat >> root/.ssh/authorized_keys <> root/.ssh/authorized_keys <