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

Contents of /net-misc/openssh/openssh-3.5_p1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.16 - (show annotations) (download)
Thu May 15 22:10:48 2003 UTC (16 years, 7 months ago) by mholzer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +1 -1 lines
FILE REMOVED
cleanup

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

  ViewVC Help
Powered by ViewVC 1.1.20