sys-apps/lsvpd: bump to 1.7.11
[gentoo.git] / sys-apps / gradm / gradm-3.1.201607172312.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit flag-o-matic toolchain-funcs udev versionator
6
7 MY_PV="$(replace_version_separator 2 -)"
8
9 DESCRIPTION="Administrative interface for the grsecurity Role Based Access Control system"
10 HOMEPAGE="https://www.grsecurity.net/"
11 SRC_URI="https://dev.gentoo.org/~blueness/hardened-sources/gradm/${PN}-${MY_PV}.tar.gz"
12 LICENSE="GPL-2"
13
14 SLOT="0"
15 KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86"
16 IUSE="pam"
17
18 RDEPEND=""
19 DEPEND="
20         sys-devel/bison
21         sys-devel/flex
22         pam? ( sys-libs/pam )"
23
24 S=${WORKDIR}/${PN}
25
26 PATCHES=(
27         "${FILESDIR}"/respect-gentoo-env-r3.patch
28 )
29
30 src_prepare() {
31         default
32         sed -i -e "s:/lib/udev:$(get_udevdir):" Makefile || die
33 }
34
35 src_compile() {
36         local target
37         use pam || target="nopam"
38
39         emake ${target} CC="$(tc-getCC)" OPT_FLAGS="${CFLAGS}"
40 }
41
42 src_install() {
43         emake DESTDIR="${D}" install
44         fperms 711 /sbin/gradm
45 }
46
47 pkg_postinst() {
48         ewarn
49         ewarn "Be sure to set a password with 'gradm -P' before enabling learning mode."
50         ewarn
51 }