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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.28 - (show annotations) (download)
Tue Jan 31 00:11:37 2006 UTC (13 years, 8 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.27: +1 -1 lines
FILE REMOVED
cut old files and unpack some patches
(Portage version: 2.1_pre4-r1)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-3.8.1_p1-r1.ebuild,v 1.27 2005/10/19 03:32:26 vapier Exp $
4
5 inherit eutils flag-o-matic ccc
6
7 # Make it more portable between straight releases
8 # and _p? releases.
9 PARCH=${P/_/}
10
11 X509_PATCH="${PARCH}+x509-5.1.diff.gz"
12 SELINUX_PATCH="openssh-3.7.1_p1-selinux.diff"
13 LDAP_PATCH="${PARCH/-/-lpk-}-0.3.4.patch"
14
15 DESCRIPTION="Port of OpenBSD's free SSH release"
16 HOMEPAGE="http://www.openssh.com/"
17 SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
18 ldap? ( http://www.opendarwin.org/en/projects/openssh-lpk/files/${LDAP_PATCH} )
19 X509? ( http://roumenpetrov.info/openssh/x509-5.1/${X509_PATCH} )"
20
21 LICENSE="as-is"
22 SLOT="0"
23 KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86"
24 IUSE="ipv6 static pam tcpd kerberos skey selinux chroot X509 ldap smartcard"
25
26 # openssh recognizes when openssl has been slightly upgraded and refuses to run.
27 # This new rev will use the new openssl.
28 RDEPEND="pam? ( >=sys-libs/pam-0.73 )
29 kerberos? ( virtual/krb5 )
30 selinux? ( sys-libs/libselinux )
31 skey? ( >=app-admin/skey-1.1.5-r1 )
32 ldap? ( net-nds/openldap )
33 >=dev-libs/openssl-0.9.6d
34 >=sys-libs/zlib-1.2.3
35 smartcard? ( dev-libs/opensc )
36 tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
37 DEPEND="${RDEPEND}
38 virtual/os-headers
39 sys-devel/autoconf"
40 PROVIDE="virtual/ssh"
41
42 S=${WORKDIR}/${PARCH}
43
44 src_unpack() {
45 unpack ${PARCH}.tar.gz
46 cd "${S}"
47
48 sed -i \
49 -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
50 pathnames.h || die
51
52 epatch "${FILESDIR}"/${P}-resolv_functions.patch.bz2
53
54 use selinux && epatch "${FILESDIR}"/${SELINUX_PATCH}.bz2
55 use skey && epatch "${FILESDIR}"/${P}-skey.patch.bz2
56 use chroot && epatch "${FILESDIR}"/${P}-chroot.patch.bz2
57 use X509 && epatch "${DISTDIR}"/${X509_PATCH}
58 use smartcard && epatch "${FILESDIR}"/${P}-opensc.patch.bz2
59 if use ldap ; then
60 if use X509 ; then
61 ewarn "Sorry, x509 and ldap don't get along"
62 else
63 epatch "${DISTDIR}"/${LDAP_PATCH}
64 fi
65 fi
66
67 autoconf || die "autoconf failed"
68 }
69
70 src_compile() {
71 addwrite /dev/ptmx
72
73 # make sure .sbss is large enough
74 use skey && use alpha && append-ldflags -mlarge-data
75 if use ldap ; then
76 filter-flags -funroll-loops
77 append-ldflags -lldap
78 append-flags -DWITH_LDAP_PUBKEY
79 fi
80 use selinux && append-flags -DWITH_SELINUX
81 use static && append-ldflags -static
82
83 local myconf=""
84 use ipv6 || myconf="${myconf} --with-ipv4-default"
85 use kerberos && myconf="${myconf} --with-kerberos5=/usr" || \
86 myconf="${myconf} --without-kerberos5"
87
88 econf \
89 --with-ldflags="${LDFLAGS}" \
90 --disable-strip \
91 --sysconfdir=/etc/ssh \
92 --libexecdir=/usr/lib/misc \
93 --datadir=/usr/share/openssh \
94 --disable-suid-ssh \
95 --with-privsep-path=/var/empty \
96 --with-privsep-user=sshd \
97 --with-md5-passwords \
98 $(use_with tcpd tcp-wrappers) \
99 $(use_with pam) \
100 $(use_with skey) \
101 $(use_with smartcard opensc) \
102 ${myconf} \
103 || die "bad configure"
104
105 # use static && {
106 # # statically link to libcrypto -- good for the boot cd
107 # sed -i "s:-lcrypto:/usr/lib/libcrypto.a:g" Makefile
108 # }
109
110 emake || die "compile problem"
111 }
112
113 src_install() {
114 make install-files DESTDIR="${D}" || die
115 chmod 600 "${D}"/etc/ssh/sshd_config
116 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
117 use pam && ( insinto /etc/pam.d ; newins "${FILESDIR}"/sshd.pam sshd )
118 newinitd "${FILESDIR}"/sshd.rc6 sshd
119 keepdir /var/empty
120 dosed "/^#Protocol /s:.*:Protocol 2:" /etc/ssh/sshd_config
121 use pam && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config
122 }
123
124 pkg_postinst() {
125 enewgroup sshd 22
126 enewuser sshd 22 -1 /var/empty sshd
127
128 ewarn "Remember to merge your config files in /etc/ssh/ and then"
129 ewarn "restart sshd: '/etc/init.d/sshd restart'."
130 ewarn
131 einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
132 einfo "functionality, but please ensure that you do not explicitly disable"
133 einfo "this in your configuration as disabling it opens security holes"
134 einfo
135 einfo "This revision has removed your sshd user id and replaced it with a"
136 einfo "new one with UID 22. If you have any scripts or programs that"
137 einfo "that referenced the old UID directly, you will need to update them."
138 einfo
139 use pam && {
140 einfo "Please be aware users need a valid shell in /etc/passwd"
141 einfo "in order to be allowed to login."
142 einfo
143 }
144 }

  ViewVC Help
Powered by ViewVC 1.1.20