1#!/bin/sh -ue
2NAME=openssh
3VERSION=9.9p2
4RELEASE=1
5SOURCE="https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/${NAME}-${VERSION}.tar.gz"
6
7build(){
8 export DESTDIR="$PKG"
9 LDFLAGS='-L . -static' PREFIX="$PREFIX" DESTDIR="$PKG" CPPFLAGS='-L .' CFLAGS='-L . -static -Oz' ./configure \
10 --prefix="$PREFIX" \
11 --bindir=/bin \
12 --sbindir=/bin \
13 --libdir=/lib \
14 --includedir=/include \
15 --sysconfdir=/etc \
16 --disable-lto \
17 --disable-largefile \
18 --without-gnu-ld \
19 --enable-dependency-tracking \
20 --enable-static \
21 --disable-nls \
22 --with-ldflags='-L .' \
23 --with-cflags='-static -Oz' \
24 --without-pam \
25 --without-selinux \
26 --without-xauth \
27 --without-kerberos5 \
28 --without-bsd-auth || die "configure failed"
29 sed -i "s#DESTDIR=#DESTDIR=$PKG#" Makefile
30
31 LDFLAGS='-L . -static' DESTDIR="$PKG" PREFIX="$PREFIX" CPPFLAGS='-L .' CFLAGS='-L . -static -Oz' gmake || die "gmake failed"
32 LDFLAGS='-L . -static' CPPFLAGS='-L .' CFLAGS='-L . -static -Oz' DESTDIR="$PKG" gmake install || die "gmake install failed"
33}
34
35postbuild(){
36 adduser sshd
37}
38
39. ${0%/*}/../../libsh/libdmake.sh