[main]
filesize=1126034
sha512=4fe1f7e0d5e572575b11253916354b333a7eca558720885d5dceb7c89dc5da81cd57feaa4be756dfa4f3e9ef508e5f460e5fda221765191b1c02ae37431a444e

[mirrors]
http://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/openssh-6.0p1.tar.gz
http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-6.0p1.tar.gz

[deps]
openssl
sabotage-utils

[build]
# fix implicit declarations
patch -p1 < "$K/openssh-configure.patch"

cp $K/openssh-hacks.h .
CC="gcc -include openssh-hacks.h -D_BSD_SOURCE -DMISSING_HOWMANY -DMISSING_FD_MASK -DMISSING_NFDBITS" ./configure -C --prefix=/ \
  --sbindir=/bin --libexecdir=/lib/ssh --sysconfdir=/etc/ssh \
  --with-privsep-user=nobody \
  --with-md5-passwords --with-mantype=man --mandir=/share/man \
  --disable-strip --disable-lastlog --disable-utmpx --disable-btmp || exit 1

mkdir netinet
touch netinet/in_systm.h

sed -i '/USE_BTMP/d' config.h

make -j$MAKE_THREADS || exit 1

chown root:root /var/empty
chmod 0755 /var/empty

#key generation is disabled for packaging
#use pkg/sshd-keys to make the keys "manually"
make DESTDIR="$butch_install_dir" install-nokeys || exit 1
