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

Contents of /net-misc/openssh/openssh-4.4_p1-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Wed Oct 25 02:57:45 2006 UTC (13 years, 3 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
old

1 vapier 1.1 # Copyright 1999-2006 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.4 # $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.4_p1-r4.ebuild,v 1.3 2006/10/17 14:37:18 uberlord Exp $
4 vapier 1.1
5     WANT_AUTOCONF="latest"
6     WANT_AUTOMAKE="latest"
7     # Please leave pam at end, so that dopamd and newpamd from eutils eclass are not used
8     inherit eutils flag-o-matic ccc multilib autotools pam
9    
10     # Make it more portable between straight releases
11     # and _p? releases.
12     PARCH=${P/_/}
13    
14     X509_PATCH="${PARCH}+x509-5.5.1.diff.gz"
15     SECURID_PATCH="" #${PARCH}+SecurID_v1.3.2.patch"
16     LDAP_PATCH="${PARCH/-4.4p1/-lpk-4.4p1}-0.3.7.patch"
17 vapier 1.2 HPN_PATCH="${PARCH}-hpn12v11-gentoo.patch.bz2"
18 vapier 1.1
19     DESCRIPTION="Port of OpenBSD's free SSH release"
20     HOMEPAGE="http://www.openssh.com/"
21     SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
22     X509? ( http://roumenpetrov.info/openssh/x509-5.5.1/${X509_PATCH} )
23     ldap? ( http://dev.inversepath.com/openssh-lpk/${LDAP_PATCH} )
24 vapier 1.2 hpn? ( mirror://gentoo/${HPN_PATCH} http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )"
25 vapier 1.1 # smartcard? ( http://www.omniti.com/~jesus/projects/${SECURID_PATCH} )
26    
27     LICENSE="as-is"
28     SLOT="0"
29 uberlord 1.3 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
30 vapier 1.1 IUSE="static pam tcpd kerberos skey selinux chroot X509 ldap smartcard hpn libedit X"
31    
32     RDEPEND="pam? ( virtual/pam )
33     kerberos? ( virtual/krb5 )
34     selinux? ( >=sys-libs/libselinux-1.28 )
35     skey? ( >=app-admin/skey-1.1.5-r1 )
36     ldap? ( net-nds/openldap )
37     libedit? ( || ( dev-libs/libedit sys-freebsd/freebsd-lib ) )
38     >=dev-libs/openssl-0.9.6d
39     >=sys-libs/zlib-1.2.3
40     smartcard? ( dev-libs/opensc )
41     tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
42     X? ( x11-apps/xauth )
43     userland_GNU? ( sys-apps/shadow )"
44     DEPEND="${RDEPEND}
45     dev-util/pkgconfig
46     virtual/os-headers
47     sys-devel/autoconf"
48     PROVIDE="virtual/ssh"
49    
50     S=${WORKDIR}/${PARCH}
51    
52     pkg_setup() {
53     # this sucks, but i'd rather have people unable to `emerge -u openssh`
54     # than not be able to log in to their server any more
55     local fail=""
56     [[ -z ${X509_PATCH} ]] && use X509 && fail="${fail} X509"
57     [[ -z ${SECURID_PATCH} ]] && use smartcard && fail="${fail} smartcard"
58     if [[ -n ${fail} ]] ; then
59     eerror "Sorry, but this version does not yet support features"
60     eerror "that you requested: ${fail}"
61     eerror "Please mask ${PF} for now and check back later:"
62     eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
63     die "booooo"
64     fi
65     }
66    
67     src_unpack() {
68     unpack ${PARCH}.tar.gz
69     cd "${S}"
70    
71     sed -i \
72     -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
73     pathnames.h || die
74    
75     # fix autoconf lib checking for SELinux
76     epatch "${FILESDIR}/openssh-4.4p1-selinux-ac.diff"
77    
78     use X509 && epatch "${DISTDIR}"/${X509_PATCH}
79     use chroot && epatch "${FILESDIR}"/openssh-4.3_p1-chroot.patch
80     use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch
81     if ! use X509 ; then
82     if [[ -n ${SECURID_PATCH} ]] && use smartcard ; then
83     epatch \
84     "${DISTDIR}"/${SECURID_PATCH} \
85     "${FILESDIR}"/${P}-securid-updates.patch \
86     "${FILESDIR}"/${P}-securid-hpn-glue.patch
87     use ldap && epatch "${FILESDIR}"/openssh-4.0_p1-smartcard-ldap-happy.patch
88     fi
89     if use ldap ; then
90     epatch "${DISTDIR}"/${LDAP_PATCH}
91     fi
92     elif [[ -n ${SECURID_PATCH} ]] && use smartcard || use ldap ; then
93     ewarn "Sorry, X509 and smartcard/ldap don't get along, disabling smartcard/ldap"
94     fi
95     [[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH}
96    
97     sed -i '/LD.*ssh-keysign/s:$: '$(bindnow-flags)':' Makefile.in || die "setuid"
98    
99     sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die
100    
101     eautoreconf
102     }
103    
104     src_compile() {
105     addwrite /dev/ptmx
106     addpredict /etc/skey/skeykeys #skey configure code triggers this
107    
108     local myconf=""
109     if use static ; then
110     append-ldflags -static
111     use pam && ewarn "Disabling pam support becuse of static flag"
112     myconf="${myconf} --without-pam"
113     else
114     myconf="${myconf} $(use_with pam)"
115     fi
116    
117     econf \
118     --with-ldflags="${LDFLAGS}" \
119     --disable-strip \
120     --sysconfdir=/etc/ssh \
121     --libexecdir=/usr/$(get_libdir)/misc \
122     --datadir=/usr/share/openssh \
123     --disable-suid-ssh \
124     --with-privsep-path=/var/empty \
125     --with-privsep-user=sshd \
126     --with-md5-passwords \
127     $(use_with ldap) \
128     $(use_with libedit) \
129     $(use_with kerberos kerberos5 /usr) \
130     $(use_with tcpd tcp-wrappers) \
131     $(use_with selinux) \
132     $(use_with skey) \
133     $(use_with smartcard opensc) \
134     ${myconf} \
135     || die "bad configure"
136     emake || die "compile problem"
137     }
138    
139     src_install() {
140     emake install-nokeys DESTDIR="${D}" || die
141     fperms 600 /etc/ssh/sshd_config
142     dobin contrib/ssh-copy-id
143     newinitd "${FILESDIR}"/sshd.rc6 sshd
144     newconfd "${FILESDIR}"/sshd.confd sshd
145     keepdir /var/empty
146    
147     newpamd "${FILESDIR}"/sshd.pam_include sshd
148     dosed "/^#Protocol /s:.*:Protocol 2:" /etc/ssh/sshd_config
149     use pam \
150     && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config \
151     && dosed "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" /etc/ssh/sshd_config
152    
153     doman contrib/ssh-copy-id.1
154     dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
155     }
156    
157     pkg_postinst() {
158     enewgroup sshd 22
159     enewuser sshd 22 -1 /var/empty sshd
160    
161     ewarn "Remember to merge your config files in /etc/ssh/ and then"
162     ewarn "restart sshd: '/etc/init.d/sshd restart'."
163     if use pam ; then
164     echo
165     ewarn "Please be aware users need a valid shell in /etc/passwd"
166     ewarn "in order to be allowed to login."
167     fi
168     }

  ViewVC Help
Powered by ViewVC 1.1.20