123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- set -e
- program=openssh
- version=8.8p1
- release=1
- pkgcategory=networking
- tarname=${program}-${version}.tar.gz
- fetch=https://ftp3.usa.openbsd.org/pub/OpenBSD/OpenSSH/portable/$tarname
- description="
- The OpenSSH suite.
- OpenSSH is the premier connectivity tool for remote login with the
- SSH protocol. It encrypts all traffic to eliminate eavesdropping,
- connection hijacking, and other attacks. In addition, OpenSSH provides
- a large suite of secure tunneling capabilities, several authentication
- methods, and sophisticated configuration options.
- "
- homepage=https://www.openssh.com
- license=Custom
- docs="CREDITS ChangeLog LICENCE OVERVIEW PROTOCOL* README* TODO"
- docsdir="${docdir}/${program}-${version}"
- build()
- {
- unpack "${tardir}/$tarname"
- cd "$srcdir"
-
- chmod -R u+w,go-w,a+rX-s .
-
- patch -p1 < "${worktree}/patches/openssh/openssh-include-stdio.h.patch"
- ./configure CPPFLAGS="$QICPPFLAGS" \
- CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" LIBS="-ledit" \
- $configure_args \
- --libdir=/usr/lib${libSuffix} \
- --sysconfdir=/etc/ssh \
- --mandir=$mandir \
- --docdir=$docsdir \
- --enable-strip \
- --with-default-path='/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin' \
- --with-privsep-path=/var/lib/sshd \
- --with-privsep-user=sshd \
- --with-pid-dir=/var/run/sshd \
- --with-md5-passwords \
- --with-pie \
- --without-zlib-version-check \
- --build="$(gcc -dumpmachine)"
- make -j${jobs} V=1
- make -j${jobs} DESTDIR="$destdir" install
-
- mkdir -p "${destdir}/var/run/sshd" "${destdir}/var/lib/sshd"
-
- cp -p contrib/ssh-copy-id "${destdir}/usr/bin"
- chmod 755 "${destdir}/usr/bin/ssh-copy-id"
- mkdir -p "${destdir}/${mandir}/man1"
- cp -p contrib/ssh-copy-id.1 "${destdir}/${mandir}/man1"
-
- mkdir -p "${destdir}/etc/perp/sshd"
- cp -p "${worktree}/archive/openssh/rc.log" \
- "${worktree}/archive/openssh/rc.main" \
- "${destdir}/etc/perp/sshd/"
- chmod 755 "${destdir}"/etc/perp/sshd/rc.*
-
- chmod -t "${destdir}/etc/perp/sshd"
-
- touch "${destdir}/etc/ssh/.graft-config" \
- "${destdir}/etc/perp/sshd/.graft-config"
-
- if test -d "${destdir}/$mandir"
- then
- (
- cd "${destdir}/$mandir"
- find . -type f -exec lzip -9 {} +
- find . -type l | while read -r file
- do
- ln -sf "$(readlink -- "$file").lz" "${file}.lz"
- rm -- "$file"
- done
- )
- fi
-
- mkdir -p "${destdir}/$docsdir"
- cp -p $docs "${destdir}/$docsdir"
- }
|