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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (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.12: +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-0.52.ebuild,v 1.12 2012/08/12 03:56:20 vapier Exp $
4
5 inherit eutils savedconfig pam user
6
7 DESCRIPTION="small SSH 2 client/server designed for small memory environments"
8 HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
9 SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
10 http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
11
12 LICENSE="MIT"
13 SLOT="0"
14 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
15 IUSE="bsdpty minimal multicall pam static syslog zlib"
16
17 DEPEND="zlib? ( sys-libs/zlib )
18 pam? ( virtual/pam )"
19 RDEPEND="${DEPEND}
20 pam? ( >=sys-auth/pambase-20080219.1 )"
21
22 set_options() {
23 use minimal \
24 && progs="dropbear dbclient dropbearkey" \
25 || progs="dropbear dbclient dropbearkey dropbearconvert scp"
26 use multicall && makeopts="${makeopts} MULTI=1"
27 use static && makeopts="${makeopts} STATIC=1"
28 }
29
30 pkg_setup() {
31 if use pam && use static ; then
32 die "USE='pam static' makes no sense ... pick one"
33 fi
34
35 enewgroup sshd 22
36 enewuser sshd 22 -1 /var/empty sshd
37 }
38
39 src_unpack() {
40 unpack ${A}
41 cd "${S}"
42 epatch "${FILESDIR}"/dropbear-0.46-dbscp.patch
43 sed -i \
44 -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
45 -e '/XAUTH_COMMAND/s:/X11R6/:/:' \
46 options.h
47 sed -i \
48 -e '/pam_start/s:sshd:dropbear:' \
49 svr-authpam.c || die
50 restore_config options.h
51 }
52
53 src_compile() {
54 if use static && use pam ; then
55 ewarn "You cannot have USE='static pam'. Assuming static is more important."
56 fi
57 econf \
58 $(use_enable zlib) \
59 $(use_enable pam) \
60 $(use_enable !bsdpty openpty) \
61 $(use_enable syslog) \
62 || die
63 set_options
64 emake ${makeopts} PROGRAMS="${progs}" || die "make ${makeopts} failed"
65 }
66
67 src_install() {
68 set_options
69 emake install DESTDIR="${D}" ${makeopts} PROGRAMS="${progs}" || die "make install failed"
70 doman *.8
71 newinitd "${FILESDIR}"/dropbear.init.d dropbear || die
72 newconfd "${FILESDIR}"/dropbear.conf.d dropbear || die
73 dodoc CHANGES README TODO SMALL MULTI
74
75 # The multi install target does not install the links
76 if use multicall ; then
77 cd "${D}"/usr/bin
78 local x
79 for x in ${progs} ; do
80 ln -s 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 "${D}"/usr/bin/{,db}scp || die
91 fi
92
93 pamd_mimic system-remote-login dropbear auth account password session \
94 || die "unable to mimic system-remote-login pamd file."
95 }

  ViewVC Help
Powered by ViewVC 1.1.20