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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Sep 25 18:14:40 2013 UTC (6 years, 2 months ago) by blueness
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove older vulnerable versions, bug #328409

(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/dropbear-2011.54.ebuild,v 1.3 2012/08/12 03:56:20 vapier 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 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
17 IUSE="bsdpty minimal multicall pam static syslog zlib"
18
19 DEPEND="static? ( zlib? ( sys-libs/zlib[static-libs] ) )
20 pam? ( virtual/pam )"
21 RDEPEND="${DEPEND}
22 !static? ( zlib? ( sys-libs/zlib ) )
23 pam? ( >=sys-auth/pambase-20080219.1 )"
24
25 REQUIRED_USE="pam? ( !static )"
26
27 set_options() {
28 progs="dropbear dbclient dropbearkey"
29 progs+=" $(usex minimal "" "dropbearconvert scp")"
30 use multicall && makeopts+=" MULTI=1"
31 use static && makeopts+=" STATIC=1"
32 }
33
34 src_prepare() {
35 epatch "${FILESDIR}"/dropbear-0.46-dbscp.patch
36 sed -i \
37 -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
38 -e '/XAUTH_COMMAND/s:/X11R6/:/:' \
39 options.h
40 sed -i \
41 -e '/pam_start/s:sshd:dropbear:' \
42 svr-authpam.c || die
43 restore_config options.h
44 }
45
46 src_configure() {
47 econf \
48 $(use_enable zlib) \
49 $(use_enable pam) \
50 $(use_enable !bsdpty openpty) \
51 $(use_enable syslog)
52 }
53
54 src_compile() {
55 set_options
56 emake ${makeopts} PROGRAMS="${progs}"
57 }
58
59 src_install() {
60 set_options
61 emake install DESTDIR="${D}" ${makeopts} PROGRAMS="${progs}"
62 doman *.8
63 newinitd "${FILESDIR}"/dropbear.init.d dropbear
64 newconfd "${FILESDIR}"/dropbear.conf.d dropbear
65 dodoc CHANGES README TODO SMALL MULTI
66
67 # The multi install target does not install the links
68 if use multicall ; then
69 cd "${D}"/usr/bin
70 local x
71 for x in ${progs} ; do
72 ln -s dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
73 done
74 rm -f dropbear
75 dodir /usr/sbin
76 dosym ../bin/dropbearmulti /usr/sbin/dropbear
77 cd "${S}"
78 fi
79 save_config options.h
80
81 if ! use minimal ; then
82 mv "${D}"/usr/bin/{,db}scp || die
83 fi
84
85 pamd_mimic system-remote-login dropbear auth account password session
86 }
87
88 pkg_preinst() {
89 enewgroup sshd 22
90 enewuser sshd 22 -1 /var/empty sshd
91 }

  ViewVC Help
Powered by ViewVC 1.1.20