checkpolicy-2.6.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. inherit toolchain-funcs
  5. MY_P="${P//_/-}"
  6. MY_RELEASEDATE="20161014"
  7. SEPOL_VER="${PV}"
  8. SEMNG_VER="${PV}"
  9. DESCRIPTION="SELinux policy compiler"
  10. HOMEPAGE="http://userspace.selinuxproject.org"
  11. if [[ ${PV} == 9999 ]] ; then
  12. inherit git-r3
  13. EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
  14. S="${WORKDIR}/${MY_P}/${PN}"
  15. else
  16. SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
  17. KEYWORDS="amd64 ~arm ~arm64 ~mips x86"
  18. S="${WORKDIR}/${MY_P}"
  19. fi
  20. LICENSE="GPL-2"
  21. SLOT="0"
  22. IUSE="debug"
  23. DEPEND=">=sys-libs/libsepol-${SEPOL_VER}
  24. >=sys-libs/libsemanage-${SEMNG_VER}
  25. sys-devel/flex
  26. sys-devel/bison"
  27. RDEPEND=">=sys-libs/libsemanage-${SEMNG_VER}"
  28. src_compile() {
  29. emake CC="$(tc-getCC)" YACC="bison -y" LIBDIR="\$(PREFIX)/$(get_libdir)"
  30. }
  31. src_install() {
  32. emake DESTDIR="${D}" install
  33. if use debug; then
  34. dobin "${S}/test/dismod"
  35. dobin "${S}/test/dispol"
  36. fi
  37. }
  38. pkg_postinst() {
  39. einfo "This checkpolicy can compile version `checkpolicy -V |cut -f 1 -d ' '` policy."
  40. }