sci-mathematics/rstudio: Thanks to tomboy-64 for fixing bug Bug 534152 - sci-mathemat...
[gentoo.git] / sys-auth / pam_ssh / pam_ssh-2.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 inherit pam eutils flag-o-matic readme.gentoo
8
9 DESCRIPTION="Uses ssh-agent to provide single sign-on"
10 HOMEPAGE="http://pam-ssh.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/pam-ssh/${P}.tar.xz"
12
13 LICENSE="BSD-2 BSD ISC"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
16 IUSE=""
17
18 # Only supports OpenSSH via `ssh-agent` #282993
19 DEPEND="virtual/pam
20         dev-libs/openssl:0="
21 RDEPEND="${DEPEND}
22         net-misc/openssh"
23
24 DOC_CONTENTS="
25         You can enable pam_ssh for system authentication by enabling
26         the pam_ssh USE flag on sys-auth/pambase.
27 "
28
29 src_prepare() {
30         epatch "${FILESDIR}"/${P}-dot-ssh-check.patch #503424#c5
31 }
32
33 src_configure() {
34         # hide all the otherwise-exported symbols that may clash with
35         # other software loading the PAM modules (see bug #274924 as an
36         # example).
37         append-ldflags -Wl,--version-script="${FILESDIR}"/pam_symbols.ver
38
39         # Set the cache var so the configure script doesn't go probing hardcoded
40         # file system paths and picking up the wrong thing.
41         export ac_cv_openssldir=''
42
43         # Avoid cross-compiling funkiness and requiring openssh at build time.
44         export PATH_SSH_AGENT="${EPREFIX}/usr/bin/ssh-agent"
45
46         econf \
47                 "--with-pam-dir=$(getpam_mod_dir)"
48 }
49
50 src_install() {
51         default
52         prune_libtool_files --modules
53         readme.gentoo_create_doc
54 }
55
56 pkg_preinst() {
57         if has_version "<${CATEGORY}/${PN}-2.0" ; then #554150
58                 ewarn "Upstream pam_ssh has changed where ssh keys live.  Only keys in your"
59                 ewarn "~/.ssh/login-keys.d/ will be accepted for authentication."
60         fi
61 }