apparmor-utils-2.11.0.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python3_4 )
  5. inherit perl-module python-r1 versionator
  6. MY_PV="$(get_version_component_range 1-2)"
  7. DESCRIPTION="Additional userspace utils to assist with AppArmor profile management"
  8. HOMEPAGE="http://apparmor.net/"
  9. SRC_URI="https://launchpad.net/apparmor/${MY_PV}/${MY_PV}/+download/apparmor-${PV}.tar.gz"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="~amd64"
  13. IUSE=""
  14. DEPEND="dev-lang/perl
  15. ${PYTHON_DEPS}"
  16. RDEPEND="${DEPEND}
  17. ~sys-libs/libapparmor-${PV}[perl,python]
  18. ~sys-apps/apparmor-${PV}
  19. dev-perl/Locale-gettext
  20. dev-perl/RPC-XML
  21. dev-perl/TermReadKey
  22. virtual/perl-Data-Dumper
  23. virtual/perl-Getopt-Long"
  24. S=${WORKDIR}/apparmor-${PV}/utils
  25. PATCHES=(
  26. "${FILESDIR}/${PN}-2.10-shebang.patch"
  27. )
  28. src_compile() {
  29. python_setup
  30. # launches non-make subprocesses causing "make jobserver unavailable"
  31. # error messages to appear in generated code
  32. emake -j1
  33. }
  34. src_install() {
  35. perl_set_version
  36. emake DESTDIR="${D}" PERLDIR="${D}/${VENDOR_LIB}/Immunix" \
  37. VIM_INSTALL_PATH="${D}/usr/share/vim/vimfiles/syntax" install
  38. install_python() {
  39. "${PYTHON}" "${S}"/python-tools-setup.py install --prefix=/usr \
  40. --root="${D}" --version="${PV}"
  41. }
  42. python_foreach_impl install_python
  43. python_replicate_script "${D}"/usr/bin/aa-easyprof "${D}"/usr/sbin/apparmor_status \
  44. "${D}"/usr/sbin/aa-{audit,autodep,cleanprof,complain,disable,enforce,genprof,logprof,mergeprof,status,unconfined}
  45. }