gradm-3.1.201608131257.ebuild 1.1 KB

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