firejail-0.9.44.8.ebuild 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils
  5. DESCRIPTION="Security sandbox for any type of processes"
  6. HOMEPAGE="https://firejail.wordpress.com/"
  7. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64"
  11. IUSE="apparmor +bind +chroot +file-transfer +network
  12. network-restricted +seccomp +userns x11"
  13. DEPEND="!sys-apps/firejail-lts
  14. apparmor? ( sys-libs/libapparmor )"
  15. RDEPEND="${DEPEND}
  16. x11? ( x11-wm/xpra[client,server] )"
  17. src_prepare() {
  18. default
  19. find -name Makefile.in -exec sed -i -r \
  20. -e '/^\tinstall .*COPYING /d' \
  21. -e '/CFLAGS/s: (-O2|-ggdb) : :g' \
  22. -e '1iCC=@CC@' {} + || die
  23. }
  24. src_configure() {
  25. local myeconfargs=(
  26. $(use_enable apparmor)
  27. $(use_enable bind)
  28. $(use_enable chroot)
  29. $(use_enable file-transfer)
  30. $(use_enable network)
  31. $(use_enable seccomp)
  32. $(use_enable userns)
  33. $(use_enable x11)
  34. )
  35. use network-restricted && myeconfargs+=( --enable-network=restricted )
  36. econf "${myeconfargs[@]}"
  37. }