--- dropbear-0.43.ebuild 2004-08-15 13:43:10.000000000 -0400 +++ dropbear-0.44_pre2.ebuild 2004-08-20 02:05:58.000000000 -0400 @@ -6,24 +6,42 @@ DESCRIPTION="small SSH 2 server designed for small memory environments" HOMEPAGE="http://matt.ucc.asn.au/dropbear/" -SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2" - +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="zlib multicall static" +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:/\* *::' \ @@ -35,7 +53,7 @@ emake dropbearmulti || die "multi failed" fi else - emake || die "make failed" + emake PROGRAMS="${PROGRAMS}" || die "make failed" fi } @@ -43,13 +61,26 @@ if use multicall ; then local multibin="dropbearmulti" use static && multibin="static${multibin}" + dodir /usr/bin /usr/sbin dobin ${multibin} || die "dropbearmulti" - dosym ${multibin} /usr/bin/dropbearkey || die - dosym ${multibin} /usr/bin/dropbearconvert || die 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 - make install DESTDIR=${D} || die + 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