/[gentoo-x86]/net-misc/dropbear/dropbear-2014.66.ebuild
Gentoo

Contents of /net-misc/dropbear/dropbear-2014.66.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Thu Jul 16 03:01:23 2015 UTC (4 years, 4 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +2 -2 lines
Mark arm64/m68k/s390/sh stable.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/dropbear-2014.66.ebuild,v 1.10 2015/07/15 20:53:28 zlogene Exp $
4
5 EAPI="4"
6
7 inherit eutils savedconfig pam user
8
9 DESCRIPTION="small SSH 2 client/server designed for small memory environments"
10 HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
11 SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
12 http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
17 IUSE="bsdpty minimal multicall pam +shadow static syslog zlib"
18
19 LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )
20 dev-libs/libtommath[static-libs(+)]"
21 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
22 pam? ( virtual/pam )"
23 DEPEND="${RDEPEND}
24 static? ( ${LIB_DEPEND} )"
25 RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )"
26
27 REQUIRED_USE="pam? ( !static )"
28
29 set_options() {
30 progs=(
31 dropbear dbclient dropbearkey
32 $(usex minimal "" "dropbearconvert scp")
33 )
34 makeopts=(
35 MULTI=$(usex multicall 1 0)
36 STATIC=$(usex static 1 0)
37 )
38 }
39
40 src_prepare() {
41 epatch "${FILESDIR}"/${PN}-0.46-dbscp.patch
42 sed -i \
43 -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
44 options.h || die
45 sed -i \
46 -e '/pam_start/s:sshd:dropbear:' \
47 svr-authpam.c || die
48 restore_config options.h
49 }
50
51 src_configure() {
52 # XXX: Need to add libtomcrypt to the tree and re-enable this.
53 # --disable-bundled-libtom
54 econf \
55 $(use_enable zlib) \
56 $(use_enable pam) \
57 $(use_enable !bsdpty openpty) \
58 $(use_enable shadow) \
59 $(use_enable syslog)
60 }
61
62 src_compile() {
63 set_options
64 emake "${makeopts[@]}" PROGRAMS="${progs[*]}"
65 }
66
67 src_install() {
68 set_options
69 emake "${makeopts[@]}" PROGRAMS="${progs[*]}" DESTDIR="${D}" install
70 doman *.8
71 newinitd "${FILESDIR}"/dropbear.init.d dropbear
72 newconfd "${FILESDIR}"/dropbear.conf.d dropbear
73 dodoc CHANGES README TODO SMALL MULTI
74
75 # The multi install target does not install the links right.
76 if use multicall ; then
77 cd "${ED}"/usr/bin
78 local x
79 for x in "${progs[@]}" ; do
80 ln -sf dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
81 done
82 rm -f dropbear
83 dodir /usr/sbin
84 dosym ../bin/dropbearmulti /usr/sbin/dropbear
85 cd "${S}"
86 fi
87 save_config options.h
88
89 if ! use minimal ; then
90 mv "${ED}"/usr/bin/{,db}scp || die
91 fi
92
93 pamd_mimic system-remote-login dropbear auth account password session
94 }
95
96 pkg_preinst() {
97 enewgroup sshd 22
98 enewuser sshd 22 -1 /var/empty sshd
99 }

  ViewVC Help
Powered by ViewVC 1.1.20