summaryrefslogtreecommitdiff
blob: 13258e590ef80b63b42168208b479ce737f943fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/libssh/libssh-0.2.ebuild,v 1.1 2007/01/07 04:17:23 dragonheart Exp $

inherit eutils

DESCRIPTION="Access a working SSH implementation by means of a library"
HOMEPAGE="http://0xbadc0de.be/?part=libssh"
SRC_URI="http://www.0xbadc0de.be/libssh/${P}.tgz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="crypt examples"

DEPEND="sys-libs/zlib
	!crypt? ( dev-libs/openssl )
	crypt? ( dev-libs/libgcrypt )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/makefile_no-examples.diff"
}

src_compile() {
	econf \
		$(use_with crypt) \
		--disable-ssh1 \
		|| die "econf failed"

	emake || die "emake failed"
}

src_install() {
	chmod a-x ${D}/usr/include/libssh/*
	emake DESTDIR="${D}" install || die "install failed"
	rm "${D}"/usr/include/libssh/ssh1.h
	dodoc README CHANGELOG
	if use examples ; then
		insinto /usr/share/doc/${PF}
		doins sample.c samplesshd.c
	fi
}