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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sat Feb 19 22:57:51 2005 UTC (14 years, 7 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.0.51-r15)

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.9_p1.ebuild,v 1.10 2005/01/07 21:37:33 aliz Exp $
4
5 inherit eutils flag-o-matic ccc gnuconfig
6
7 # Make it more portable between straight releases
8 # and _p? releases.
9 PARCH=${P/_/}
10
11 SFTPLOG_PATCH_VER="1.2"
12 X509_PATCH="${PARCH}+x509h.diff.gz"
13 SELINUX_PATCH="openssh-3.9_p1-selinux.diff"
14
15 S=${WORKDIR}/${PARCH}
16 DESCRIPTION="Port of OpenBSD's free SSH release"
17 HOMEPAGE="http://www.openssh.com/"
18 SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
19 X509? ( http://roumenpetrov.info/openssh/x509h/${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 uclibc sftplogging"
25
26 RDEPEND="virtual/libc
27 pam? ( >=sys-libs/pam-0.73
28 >=sys-apps/shadow-4.0.2-r2 )
29 !mips? ( kerberos? ( virtual/krb5 ) )
30 selinux? ( sys-libs/libselinux )
31 !ppc64? ( skey? ( >=app-admin/skey-1.1.5-r1 ) )
32 >=dev-libs/openssl-0.9.6d
33 >=sys-libs/zlib-1.1.4
34 x86? ( smartcard? ( dev-libs/opensc ) )
35 !ppc64? ( tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) )"
36 DEPEND="${RDEPEND}
37 virtual/os-headers
38 dev-lang/perl
39 !uclibc? ( sys-apps/groff )
40 >=sys-apps/sed-4
41 sys-devel/autoconf"
42 PROVIDE="virtual/ssh"
43
44 src_unpack() {
45 unpack ${PARCH}.tar.gz ; cd ${S}
46
47 epatch ${FILESDIR}/${P}-largekey.patch.bz2
48 epatch ${FILESDIR}/${P}-fix_suid.patch.bz2
49
50 use sftplogging && epatch ${FILESDIR}/${P}-sftplogging-1.2-gentoo.patch.bz2
51 use alpha && epatch ${FILESDIR}/${PN}-3.5_p1-gentoo-sshd-gcc3.patch.bz2
52 use skey && epatch ${FILESDIR}/${P}-skey.patch.bz2
53 use chroot && epatch ${FILESDIR}/${P}-chroot.patch
54 use X509 && epatch ${DISTDIR}/${X509_PATCH}
55 use selinux && epatch ${FILESDIR}/${SELINUX_PATCH}.bz2
56 use smartcard && epatch ${FILESDIR}/${P}-opensc.patch.bz2
57
58 autoconf || die
59 }
60
61 src_compile() {
62 local myconf
63
64 addwrite /dev/ptmx
65 gnuconfig_update
66
67 # make sure .sbss is large enough
68 use skey && use alpha && append-ldflags -mlarge-data
69 use ldap && filter-flags -funroll-loops
70 use selinux && append-flags "-DWITH_SELINUX"
71
72 if use static; then
73 append-ldflags -static
74 export LDFLAGS
75 if use pam; then
76 ewarn "Disabling pam support becuse of static flag."
77 myconf="${myconf} --without-pam"
78 else
79 myconf="${myconf} --without-pam"
80 fi
81 else
82 myconf="${myconf} `use_with pam`"
83 fi
84
85 use ipv6 || myconf="${myconf} --with-ipv4-default"
86
87 econf \
88 --sysconfdir=/etc/ssh \
89 --libexecdir=/usr/lib/misc \
90 --datadir=/usr/share/openssh \
91 --disable-suid-ssh \
92 --with-privsep-path=/var/empty \
93 --with-privsep-user=sshd \
94 --with-md5-passwords \
95 `use_with kerberos kerberos5 /usr` \
96 `use_with tcpd tcp-wrappers` \
97 `use_with skey` \
98 `use_with smartcard opensc` \
99 ${myconf} \
100 || die "bad configure"
101
102 # use static && {
103 # # statically link to libcrypto -- good for the boot cd
104 # sed -i "s:-lcrypto:/usr/lib/libcrypto.a:g" Makefile
105 # }
106
107 emake || die "compile problem"
108 }
109
110 src_install() {
111 make install-files DESTDIR=${D} || die
112 chmod 600 ${D}/etc/ssh/sshd_config
113 dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
114 use pam && ( insinto /etc/pam.d ; newins ${FILESDIR}/sshd.pam sshd )
115 exeinto /etc/init.d ; newexe ${FILESDIR}/sshd.rc6 sshd
116 keepdir /var/empty
117 dosed "/^#Protocol /s:.*:Protocol 2:" /etc/ssh/sshd_config
118 use pam \
119 && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config \
120 && dosed "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" /etc/ssh/sshd_config
121 }
122
123 pkg_postinst() {
124 enewgroup sshd 22
125 enewuser sshd 22 /bin/false /var/empty sshd
126
127 ewarn "Remember to merge your config files in /etc/ssh/ and then"
128 ewarn "restart sshd: '/etc/init.d/sshd restart'."
129 ewarn
130 einfo "As of version 3.4 the default is to enable the UsePrivelegeSeparation"
131 einfo "functionality, but please ensure that you do not explicitly disable"
132 einfo "this in your configuration as disabling it opens security holes"
133 einfo
134 einfo "This revision has removed your sshd user id and replaced it with a"
135 einfo "new one with UID 22. If you have any scripts or programs that"
136 einfo "that referenced the old UID directly, you will need to update them."
137 einfo
138 use pam >/dev/null 2>&1 && {
139 einfo "Please be aware users need a valid shell in /etc/passwd"
140 einfo "in order to be allowed to login."
141 einfo
142 }
143 }

  ViewVC Help
Powered by ViewVC 1.1.20