bastille-3.0.9-r1.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PERL_EXPORT_PHASE_FUNCTIONS=no
  5. inherit eutils perl-module
  6. PATCHVER=0.2
  7. MY_PN=${PN/b/B}
  8. MY_P=${MY_PN}-${PV}
  9. S=${WORKDIR}/${MY_PN}
  10. DESCRIPTION="Bastille-Linux is a security hardening tool"
  11. HOMEPAGE="http://bastille-linux.org/"
  12. SRC_URI="mirror://sourceforge/${PN}-linux/${MY_P}.tar.bz2
  13. mirror://gentoo/${P}-gentoo-${PATCHVER}.patch.bz2"
  14. LICENSE="GPL-2"
  15. SLOT="0"
  16. KEYWORDS="~x86 ~ppc ~sparc ~alpha ~amd64"
  17. IUSE="X"
  18. RDEPEND="
  19. net-firewall/iptables
  20. app-admin/logrotate
  21. dev-perl/Curses
  22. net-firewall/psad
  23. X? ( dev-perl/Tk )
  24. virtual/logger
  25. "
  26. src_prepare() {
  27. epatch "${WORKDIR}"/${P}-gentoo-${PATCHVER}.patch
  28. # make sure the Perl modules go into vendor dir
  29. epatch "${FILESDIR}/${P}-perl.patch"
  30. perl_set_version
  31. cd "${S}"
  32. chmod a+x Install.sh bastille-ipchains bastille-netfilter
  33. }
  34. src_install() {
  35. perl_set_version
  36. export VENDOR_LIB
  37. cd "${S}"
  38. DESTDIR="${D}" ./Install.sh
  39. # Example configs
  40. cd "${S}"
  41. insinto /usr/share/Bastille
  42. doins *.config
  43. newinitd ${PN}-firewall.gentoo-init ${PN}-firewall
  44. # Documentation
  45. cd "${S}"
  46. dodoc *.txt BUGS Change* README*
  47. cd "${S}"/docs
  48. doman *.1m
  49. }
  50. pkg_postinst() {
  51. elog "Please be aware that when using the Server Lax, Server Moderate, or"
  52. elog "Server Paranoia configurations, you may need to use InteractiveBastille"
  53. elog "to set any advanced network information, such as masquerading and"
  54. elog "internal interfaces, if you plan to use them."
  55. }