libsepol-9999.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 multilib toolchain-funcs multilib-minimal
  5. MY_P="${P//_/-}"
  6. MY_RELEASEDATE="20161014"
  7. DESCRIPTION="SELinux binary policy representation library"
  8. HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
  9. if [[ ${PV} == 9999 ]]; then
  10. inherit git-r3
  11. EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
  12. S="${WORKDIR}/${MY_P}/${PN}"
  13. else
  14. SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${MY_RELEASEDATE}/${MY_P}.tar.gz"
  15. KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
  16. S="${WORKDIR}/${MY_P}"
  17. fi
  18. LICENSE="GPL-2"
  19. SLOT="0"
  20. IUSE=""
  21. DEPEND=""
  22. RDEPEND=""
  23. # tests are not meant to be run outside of the full SELinux userland repo
  24. RESTRICT="test"
  25. src_prepare() {
  26. eapply_user
  27. multilib_copy_sources
  28. }
  29. multilib_src_compile() {
  30. tc-export RANLIB;
  31. LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
  32. emake AR="$(tc-getAR)" CC="$(tc-getCC)"
  33. }
  34. multilib_src_install() {
  35. LIBDIR="\$(PREFIX)/$(get_libdir)" SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \
  36. emake DESTDIR="${D}" install
  37. }