]> Pileus Git - ~andy/sunrise/blob - sys-auth/pam_abl/pam_abl-0.2.3.ebuild
sys-auth/pam_abl - set RDEPEND explicitely
[~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="~amd64 ~x86"
15 IUSE=""
16
17 DEPEND=">=sys-libs/pam-0.78-r2
18         >=sys-libs/db-4.2.52_p2"
19 RDEPEND="${DEPEND}"
20
21 S="${WORKDIR}/${PN}"
22
23 src_unpack() {
24         unpack ${A}
25         cd "${S}"
26
27         # fix hardcoded values in Makefile
28         sed -i -e "s:-Wall -fPIC:${CFLAGS} -Wall -fPIC:" \
29             -e "s:/lib/security:$(getpam_mod_dir):" \
30             -e "s:cc:$(tc-getCC):" \
31             -e "s:ld -:$(tc-getLD) -:" Makefile || die "sed failed in Makefile"
32         sed -i -e "s:-Wall:${CFLAGS} -Wall:" \
33             -e "s:cc:$(tc-getCC):" tools/Makefile || die "sed failed in tools/Makefile"
34
35         # comment out default configuration
36         sed -i -e "s:host:#host:" \
37             -e "s:user:#user:" conf/pam_abl.conf || die "sed failed in conf/pam_abl.conf"
38 }
39
40 src_install() {
41         dopammod pam_abl.so
42         dopamd "${FILESDIR}/system-auth"
43         insinto /etc/security
44         doins conf/pam_abl.conf
45         dobin tools/pam_abl
46         dodir /var/lib/abl
47         dohtml doc/*.html doc/*.css
48 }
49
50 pkg_postinst() {
51         einfo "See /usr/share/doc/${PF}/html/index.html for configuration info"
52         einfo "and set up /etc/security/pam_abl.conf as needed."
53 }