DESCRIPTION="OpenSSH" 
HOMEPAGE="http://www.openssh.com/" 
SOURCE_URI="http://openbsd.mirrorcatalogs.com/pub/OpenBSD/OpenSSH/portable/openssh-6.1p1.tar.gz"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND="dev-libs/openssl >= 1.0.0
	dev-libs/libedit >= 20090923"
CHECKSUM_MD5="3345cbf4efe90ffb06a78670ab2d05d5"
BUILD()
{
	cd openssh-6.1p1
	autoconf
	mkdir -p m4
	aclocal --install -I m4
	echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.ac
	libtoolize --force --copy
	aclocal -I m4
	autoconf
	COMMON_DOCS=`finddir B_COMMON_DOCUMENTATION_DIRECTORY`
	COMMON_BIN=`finddir B_COMMON_BIN_DIRECTORY`
	COMMON_DIR=`finddir B_COMMON_DIRECTORY`
	./configure --prefix=$COMMON_DIR \
	--sbindir=$COMMON_BIN \
	--bindir=$COMMON_BIN \
	--libexecdir=$COMMON_BIN \
	--sysconfdir=`finddir B_USER_SETTINGS_DIRECTORY`/ssh \
	--libdir=`finddir B_COMMON_LIB_DIRECTORY` \
	--includedir=$COMMON_DIR/include \
	--datadir=`finddir B_COMMON_DATA_DIRECTORY` \
	--mandir=$COMMON_DOCS/man \
	--sysconfdir=`finddir B_COMMON_SETTINGS_DIRECTORY`/ssh \
	--with-default-path=${PATH} \
	--with-md5-passwords \
	--disable-utmpx \
	--with-libedit
	make
}

INSTALL()
{
	cd openssh-6.1p1
	make install DESTDIR="${DESTDIR}"
	mkdir -p ${DESTDIR}/boot/common/boot/post_install
	cp -f $(haikuporter -t)/net-misc/openssh/sshd_keymaker.sh ${DESTDIR}/boot/common/boot/post_install
}

TEST()
{
	cd openssh-6.1p1

	make tests
}

LICENSE="OpenSSH"
COPYRIGHT="2005-2012 Tatu Ylonen et al."
