Christoph Reiter b38b2b78f4 Remove all cygwin CHOST changes
Since #5448 CHOST defaults to cygwin now, so this
is no longer needed.
2025-06-27 07:42:37 +02:00

84 lines
2.6 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=openssh
pkgver=10.0p1
pkgrel=2
pkgdesc='Free version of the SSH connectivity tools'
url='https://www.openssh.com/portable.html'
msys2_changelog_url="https://www.openssh.com/releasenotes.html"
msys2_references=(
"cpe: cpe:/a:openbsd:openssh"
)
license=('custom:BSD')
arch=('i686' 'x86_64')
groups=('net-utils')
depends=('heimdal' 'libedit' 'libxcrypt' 'libfido2' 'openssl')
makedepends=('heimdal-devel' 'libedit-devel' 'libxcrypt-devel' 'libfido2-devel' 'openssl-devel' 'autotools' 'gcc' 'groff')
source=("https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz"{,.asc}
openssh-7.3p1-msys2.patch
openssh-7.3p1-msys2-setkey.patch
openssh-7.3p1-msys2-drive-name-in-path.patch)
sha256sums=('021a2e709a0edf4250b1256bd5a9e500411a90dddabea830ed59cef90eb9d85c'
'SKIP'
'4ac8da8f0933eae61e3b973e627c0c152ea4168c28cdc27066f9a5d54432f578'
'25079cf4a10c1ab70d60302bccaabee513762520dffd7c35285f7aae3ea36087'
'903b3eee51e492a125cab9c724ad967450307d53e457f025e4432b81cb145af5')
validpgpkeys=('7168B983815A5EEF59A4ADFD2A3F414E736060BA') # Damien Miller <djm@mindrot.org>
backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -p1 -i ${srcdir}/openssh-7.3p1-msys2.patch
patch -p1 -i ${srcdir}/openssh-7.3p1-msys2-setkey.patch
patch -p1 -i ${srcdir}/openssh-7.3p1-msys2-drive-name-in-path.patch
autoreconf -fvi
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
# setproctitle is new in Cygwin 3.6, and we want openssh
# to work with older Cygwin versions too.
export ac_cv_func_setproctitle=no
export MSYSTEM=CYGWIN
TEST_SSH_UTF8=no \
./configure \
--build=${CHOST} \
--prefix=/usr \
--sbindir=/usr/bin \
--libexecdir=/usr/lib/ssh \
--sysconfdir=/etc/ssh \
--localstatedir=/var \
--with-libedit \
--with-kerberos5=/usr \
--with-security-key-builtin \
--without-hardening \
--disable-strip
make
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
export MSYSTEM=CYGWIN
make tests ||
grep $USER /etc/passwd | grep -q /bin/false
# connect.sh fails when run with stupid login shell
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -Dm644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE"
install -Dm755 contrib/findssl.sh "${pkgdir}"/usr/bin/findssl.sh
install -Dm755 contrib/ssh-copy-id "${pkgdir}"/usr/bin/ssh-copy-id
install -Dm644 contrib/ssh-copy-id.1 "${pkgdir}"/usr/share/man/man1/ssh-copy-id.1
}