proj/gentoo: Initial commit
[gentoo.git] / app-shells / rssh / rssh-2.3.4_p3.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit autotools-utils multilib
7
8 DESCRIPTION="Restricted shell for SSHd"
9 HOMEPAGE="http://rssh.sourceforge.net/"
10 MY_P="${P/%_p*}"
11 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
12         mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p/-}.debian.tar.xz"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm ~ppc ~x86"
17 IUSE="static subversion"
18
19 RDEPEND="virtual/ssh"
20
21 S="${WORKDIR}/${MY_P}"
22 DOCS=( AUTHORS ChangeLog CHROOT INSTALL README TODO )
23
24 src_prepare() {
25         epatch "${WORKDIR}"/debian/patches/fixes/*.diff "${FILESDIR}/${P}"-autotools.patch
26         use subversion && epatch "${WORKDIR}"/debian/patches/features/subversion.diff
27         AUTOTOOLS_AUTORECONF=1 autotools-utils_src_prepare #due to debian patches
28 }
29
30 src_configure() {
31         local myeconfargs=(
32                 --libexecdir="/usr/$(get_libdir)/misc"
33                 --with-scp=/usr/bin/scp
34                 --with-sftp-server="/usr/$(get_libdir)/misc/sftp-server"
35                 $(use_enable static)
36         )
37         autotools-utils_src_configure
38 }
39
40 src_install() {
41         autotools-utils_src_install
42         if use subversion && [[ -f "${EROOT}"/etc/rssh.conf ]]; then
43                 awk -f conf_convert "${EROOT}"/etc/rssh.conf > "${T}/rssh.conf" || die
44                 insinto /etc
45                 doins "${T}/rssh.conf"
46         fi
47 }