summaryrefslogtreecommitdiff
blob: d1dafd1016f530ca17b6b5e51b8cbc5ff60019d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

MY_PN="${PN/_/-}"
MY_P="${MY_PN}-${PV}"

inherit cmake db-use pam

DESCRIPTION="PAM module for blacklisting hosts and users repeatedly failed authentication"
HOMEPAGE="http://pam-abl.sourceforge.net/"
SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"

DEPEND=">=sys-libs/pam-0.78-r2
	>=sys-libs/db-4.2.52_p2:="
RDEPEND="${DEPEND}"

S=${WORKDIR}

src_configure() {
	pammod_hide_symbols

	local mycmakeargs=(
		-DDB_INCLUDE_DIR=$(db_includedir)
		-DDB_LINK_DIR=/usr/$(get_libdir)
		-DDB_LIBRARY=$(db_libname)
	)
	cmake_src_configure
}

src_install() {
	cmake_src_install
	dodir $(getpam_mod_dir)
	mv "${D}"/usr/lib/security/*.so "${D}"/"$(getpam_mod_dir)" || die

	dodoc doc/*.txt README
}