/[gentoo-x86]/net-misc/openssh/openssh-3.4_p1-r1.ebuild
Gentoo

Contents of /net-misc/openssh/openssh-3.4_p1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri Jul 5 06:07:37 2002 UTC (17 years, 3 months ago) by lostlogic
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
minor fix for bug 4545

1 lostlogic 1.1 # Copyright 1999-2002 Gentoo Technologies, Inc.
2     # Distributed under the terms of the GNU General Public License, v2 or later
3 lostlogic 1.2 # $Header: /home/cvsroot/gentoo-x86/net-misc/openssh/openssh-3.4_p1-r1.ebuild,v 1.1 2002/07/03 00:14:51 lostlogic Exp $
4 lostlogic 1.1
5     DESCRIPTION="Port of OpenBSD's free SSH release"
6     HOMEPAGE="http://www.openssh.com/"
7    
8     # openssh recognizes when openssl has been slightly upgraded and refuses to run.
9     # This new rev will use the new openssl.
10     RDEPEND="virtual/glibc
11     pam? ( >=sys-libs/pam-0.73 >=sys-apps/shadow-4.0.2-r2 )
12     >=dev-libs/openssl-0.9.6d
13     sys-libs/zlib"
14    
15     DEPEND="${RDEPEND}
16     sys-devel/perl
17     sys-apps/groff
18     tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
19    
20     # Make it more portable between straight releases
21     # and _p? releases.
22     PARCH=${P/_/}
23    
24     SRC_URI="ftp://ftp.openbsd.org/pub/unix/OpenBSD/OpenSSH/portable/${PARCH}.tar.gz"
25     S=${WORKDIR}/${PARCH}
26    
27     LICENSE="as-is"
28     SLOT="0"
29    
30     src_compile() {
31     local myconf
32     use tcpd || myconf="${myconf} --without-tcp-wrappers"
33     use tcpd && myconf="${myconf} --with-tcp-wrappers"
34     use pam || myconf="${myconf} --without-pam"
35     use pam && myconf="${myconf} --with-pam"
36     use ipv6 || myconf="${myconf} --with-ipv4-default"
37    
38     ./configure \
39     --prefix=/usr \
40     --sysconfdir=/etc/ssh \
41     --mandir=/usr/share/man \
42     --libexecdir=/usr/lib/misc \
43     --datadir=/usr/share/openssh \
44     --disable-suid-ssh \
45     --with-privsep-path=/var/empty \
46     --with-privsep-user=sshd \
47     --host=${CHOST} ${myconf} || die "bad configure"
48    
49     if [ "`use static`" ]
50     then
51     # statically link to libcrypto -- good for the boot cd
52     perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile
53     fi
54    
55     make || die " compile problem"
56     }
57    
58     src_install() {
59     make install-files DESTDIR=${D} || die
60     dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
61     insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd
62     exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd
63     }
64    
65     pkg_preinst() {
66    
67     userdel sshd 2> /dev/null
68     if ! groupmod sshd; then
69     groupadd -g 90 sshd 2> /dev/null || \
70     die "Failed to create sshd group"
71     fi
72     useradd -u 22 -g sshd -s /dev/null -d /var/empty -c "sshd" sshd || \
73     did "Failed to create sshd user"
74    
75     }
76    
77     pkg_postinst() {
78    
79     # empty dir for the new priv separation auth chroot..
80     install -d -m0755 -o root -g root ${ROOT}/var/empty
81    
82     einfo
83     einfo "Remember to merge your config files in /etc/ssh!"
84     einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
85     einfo "functionality, but please ensure that you do not explicitly disable"
86     einfo "this in your configuration as disabling it opens security holes"
87     einfo
88     einfo "This revision has removed your sshd user id and replaced it with a"
89     einfo "new one with UID 22. If you have any scripts or programs that"
90     einfo "that referenced the old UID directly, you will need to update them."
91     einfo
92     }

  ViewVC Help
Powered by ViewVC 1.1.20