# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/dropbear-0.43.ebuild,v 1.1 2004/08/15 17:43:10 vapier Exp $ inherit gnuconfig DESCRIPTION="small SSH 2 server designed for small memory environments" HOMEPAGE="http://matt.ucc.asn.au/dropbear/" if [ "${P/_pre/test}" != "${P}" ]; then SRC_URI="http://matt.ucc.asn.au/dropbear/testing/${P/_pre/test}.tar.bz2" else SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2" fi LICENSE="MIT" SLOT="0" KEYWORDS="~x86 ~ppc ~mips ~arm ~amd64" IUSE="minimal multicall static zlib norsa nodss" DEPEND="zlib? ( sys-libs/zlib )" S=${WORKDIR}/${P/_pre/test} src_unpack() { unpack ${A} cd ${S} gnuconfig_update (use norsa && use nodss) && die "USE='nodss norsa' both can not be set at the same time" epatch ${FILESDIR}/dropbear-0.44-test2.patch } src_compile() { PROGRAMS="dropbear dbclient" use minimal || PROGRAMS="${PROGRAMS} dropbearkey dropbearconvert" econf `use_enable zlib` || die # these are both enabled by default but to save space in # embedded environmnets we can disable what we don't # need/want/use. ( use norsa || use minimal ) && sed -i -e \ s/'#define DROPBEAR_RSA'/'#undef DROPBEAR_RSA'/g options.h use nodss && sed -i -e \ s/'#define DROPBEAR_DSS'/'#undef DROPBEAR_DSS'/g options.h if use multicall ; then sed -i \ -e '/define DROPBEAR_MULTI/s:/\* *::' \ -e '/define DROPBEAR_MULTI/s:\*/::' \ options.h if use static ; then emake dropbearmultistatic || die "multi static failed" else emake dropbearmulti || die "multi failed" fi else emake PROGRAMS="${PROGRAMS}" || die "make failed" fi } src_install() { if use multicall ; then local multibin="dropbearmulti" use static && multibin="static${multibin}" dodir /usr/bin /usr/sbin dobin ${multibin} || die "dropbearmulti" dosym ../bin/${multibin} /usr/sbin/dropbear || die #dosym ../bin/${multibin} /usr/sbin/dbclient || die if use minimal ; then :;#;:;#;:;#;:;#;:;#;:;#;:;#; else dosym ${multibin} /usr/bin/dropbearconvert || die dosym ${multibin} /usr/bin/dropbearkey || die fi else if use minimal ; then dodir /usr/sbin cp -a dropbear ${D}/usr/sbin/dropbear cp -a dbclient ${D}/usr/sbin/dbclient else make install DESTDIR=${D} || die fi fi exeinto /etc/init.d ; newexe ${FILESDIR}/dropbear.init.d dropbear insinto /etc/conf.d ; newins ${FILESDIR}/dropbear.conf.d dropbear dodoc CHANGES README TODO SMALL }