]> Pileus Git - ~andy/sunrise/blob - sys-auth/pam_abl/pam_abl-0.2.3.ebuild
sys-auth/pam_abl - fix typo: ${P} -> ${PF}
[~andy/sunrise] / sys-auth / pam_abl / pam_abl-0.2.3.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit pam toolchain-funcs
6
7 DESCRIPTION="Provides auto blacklisting of hosts and users responsible for repeated failed authentication attempts"
8 HOMEPAGE="http://www.hexten.net/pam_abl/"
9 SRC_URI="mirror://sourceforge/${PN/_/-}/${P}.tar.gz"
10 RESTRICT="mirror"
11
12 LICENSE="|| ( BSD GPL-2 )"
13 SLOT="0"
14 KEYWORDS="~x86 ~amd64"
15 IUSE=""
16
17 DEPEND=">=sys-libs/pam-0.78-r2
18         >=sys-libs/db-4.2.52_p2"
19
20 S="${WORKDIR}/${PN}"
21
22 src_unpack() {
23         unpack ${A}
24         cd "${S}"
25
26         # fix hardcoded values in Makefile
27         sed -i -e "s:-Wall -fPIC:${CFLAGS} -Wall -fPIC:" \
28             -e "s:/lib/security:$(getpam_mod_dir):" \
29             -e "s:cc:$(tc-getCC):" \
30             -e "s:ld -:$(tc-getLD) -:" Makefile || die "sed failed in Makefile"
31         sed -i -e "s:-Wall:${CFLAGS} -Wall:" \
32             -e "s:cc:$(tc-getCC):" tools/Makefile || die "sed failed in tools/Makefile"
33
34         # comment out default configuration
35         sed -i -e "s:host:#host:" \
36             -e "s:user:#user:" conf/pam_abl.conf || die "sed failed in conf/pam_abl.conf"
37 }
38
39 src_install() {
40         dopammod pam_abl.so
41         dopamd "${FILESDIR}/system-auth"
42         insinto /etc/security
43         doins conf/pam_abl.conf
44         dobin tools/pam_abl
45         dodir /var/lib/abl
46         dohtml doc/*.html doc/*.css
47 }
48
49 pkg_postinst() {
50         einfo "See /usr/share/doc/${PF}/html/index.html for configuration info"
51         einfo "and set up /etc/security/pam_abl.conf as needed."
52 }