# This is an example PKGBUILD file. Use this as a start to creating your own, # and remove these comments. For more information, see 'man PKGBUILD'. # NOTE: Please fill out the license field for your package! If it is unknown, # then please put 'unknown'. # Maintainer: Future Linux Team pkgname=openssh pkgver=9.9p1 pkgrel=2 pkgdesc="SSH protocol implementation for remote login, command execution and file transfer" arch=('x86_64') url="https://www.openssh.com/portable.html" license=('BSD-2-Clause' 'BSD-3-Clause' 'ISC' 'LicenseRef-Public-Domain' 'MIT') depends=('glibc' 'systemd') makedepends=('krb5' 'libedit' 'libfido2' 'libxcrypt' 'openssl' 'linux-pam' 'zlib') backup=(etc/pam.d/sshd etc/ssh/ssh_config etc/ssh/sshd_config) source=(https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz 99-futurelinux.conf openssh.tmpfiles sshdgenkeys.service sshd.service ssh-agent.service sshd.pam) sha256sums=(b343fbcdbff87f15b1986e6e15d6d4fc9a7d36066be6b7fb507087ba8f966c02 ba6c12f54ae8f2da4203f33836ed52a9731501fe210868fe2fe6e6e69fe7e521 3c0d87d73c5b6b7be3d55663835e5c20186529a071745a839a3ad2bbd370c31d d3e74cd6d6851a566b6bc33b1a1c2a082a46006143fb1ca6e79a14d3d6383eb1 ae67d5185bccd63e8c033996d63de8921c6aec65c19056486878dad637dfa144 6685eea63cffe44194c758efcc4dc3dee41005c86737db6ec295cf700635dbdb 15e711122662d6c7cc7f671b688f1e1709c543d2e61e61e2832c52d6d55f0530) prepare() { cd ${pkgname}-${pkgver} # remove variable (but useless) first line in config (related to upstream VCS) sed '/^#.*\$.*\$$/d' -i ssh{,d}_config # prepend configuration option to include drop-in configuration files for sshd_config printf "# Include drop-in configurations\nInclude /etc/ssh/sshd_config.d/*.conf\n" | cat - sshd_config > sshd_config.tmp mv -v sshd_config.tmp sshd_config # prepend configuration option to include drop-in configuration files for ssh_config printf "# Include drop-in configurations\nInclude /etc/ssh/ssh_config.d/*.conf\n" | cat - ssh_config > ssh_config.tmp mv -v ssh_config.tmp ssh_config } build() { cd ${pkgname}-${pkgver} ${CONFIGURE} \ --sysconfdir=/etc/ssh \ --disable-strip \ --with-libedit \ --with-security-key-builtin \ --with-privsep-path=/var/lib/sshd \ --with-default-path=/usr/bin \ --with-superuser-path=/usr/sbin:/usr/bin \ --with-pid-dir=/run \ --with-kerberos5=/usr \ --with-xauth=/usr/bin/xauth \ --with-pam \ --with-ssl-engine \ --with-privsep-user=nobody \ --without-zlib-version-check make } package() { cd ${pkgname}-${pkgver} make DESTDIR=${pkgdir} install install -vDm 644 ${srcdir}/99-futurelinux.conf -t ${pkgdir}/etc/ssh/sshd_config.d/ install -vdm 755 ${pkgdir}/etc/ssh/ssh_config.d install -Dm644 ${srcdir}/sshdgenkeys.service -t ${pkgdir}/usr/lib/systemd/system/ install -Dm644 ${srcdir}/sshd.service -t ${pkgdir}/usr/lib/systemd/system/ install -Dm644 ${srcdir}/ssh-agent.service -t ${pkgdir}/usr/lib/systemd/user/ install -Dm644 ${srcdir}/sshd.pam ${pkgdir}/etc/pam.d/sshd # factory files install -vDm 644 ${srcdir}/${pkgname}.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf install -Dm755 contrib/findssl.sh -t ${pkgdir}/usr/bin/ install -Dm755 contrib/ssh-copy-id -t ${pkgdir}/usr/bin/ install -Dm644 contrib/ssh-copy-id.1 -t ${pkgdir}/usr/share/man/man1/ }