pglinux-2.3.1.ebuild 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils gnome2-utils linux-info systemd
  5. MY_P="pgl-${PV}"
  6. DESCRIPTION="Privacy oriented firewall application"
  7. HOMEPAGE="https://sourceforge.net/projects/peerguardian/"
  8. SRC_URI="mirror://sourceforge/peerguardian/${MY_P}.tar.gz"
  9. LICENSE="GPL-3"
  10. KEYWORDS="amd64 x86"
  11. SLOT="0"
  12. IUSE="cron dbus logrotate networkmanager qt4 zlib"
  13. REQUIRED_USE="qt4? ( dbus )"
  14. COMMON_DEPEND="
  15. net-libs/libnetfilter_queue
  16. net-libs/libnfnetlink
  17. dbus? ( sys-apps/dbus )
  18. zlib? ( sys-libs/zlib )
  19. qt4? ( sys-auth/polkit-qt[qt4(+)]
  20. dev-qt/qtcore:4
  21. dev-qt/qtdbus:4
  22. dev-qt/qtgui:4
  23. || ( kde-apps/kdesu x11-misc/ktsuss )
  24. )
  25. "
  26. DEPEND="${COMMON_DEPEND}
  27. virtual/pkgconfig
  28. sys-devel/libtool:2
  29. "
  30. RDEPEND="${COMMON_DEPEND}
  31. net-firewall/iptables
  32. sys-apps/sysvinit
  33. cron? ( virtual/cron )
  34. logrotate? ( app-admin/logrotate )
  35. networkmanager? ( net-misc/networkmanager:= )
  36. "
  37. CONFIG_CHECK="~NETFILTER_NETLINK
  38. ~NETFILTER_NETLINK_QUEUE
  39. ~NETFILTER_XTABLES
  40. ~NETFILTER_XT_TARGET_NFQUEUE
  41. ~NETFILTER_XT_MATCH_IPRANGE
  42. ~NETFILTER_XT_MARK
  43. ~NETFILTER_XT_MATCH_MULTIPORT
  44. ~NETFILTER_XT_MATCH_STATE
  45. ~NF_CONNTRACK
  46. ~NF_CONNTRACK_IPV4
  47. ~NF_DEFRAG_IPV4
  48. ~IP_NF_FILTER
  49. ~IP_NF_IPTABLES
  50. ~IP_NF_TARGET_REJECT"
  51. S="${WORKDIR}/${MY_P}"
  52. src_prepare() {
  53. default
  54. sed -i -e 's:/sbin/runscript:/sbin/openrc-run:' pglcmd/init/pgl.gentoo.in || die
  55. }
  56. src_configure() {
  57. econf \
  58. --localstatedir=/var \
  59. $(use_enable logrotate) \
  60. $(use_enable cron) \
  61. $(use_enable networkmanager) \
  62. $(use_enable zlib) \
  63. $(use_enable dbus) \
  64. --disable-lowmem \
  65. --with-iconsdir=/usr/share/icons/hicolor/128x128/apps \
  66. --with-gentoo-init \
  67. $(use_with qt4) \
  68. --with-systemd="$(systemd_get_systemunitdir)"
  69. }
  70. src_install() {
  71. default
  72. keepdir /var/{lib,log,spool}/pgl
  73. rm -rf "${ED%/}"/tmp || die
  74. prune_libtool_files --modules
  75. }
  76. pkg_preinst() {
  77. gnome2_icon_savelist
  78. }
  79. pkg_postinst() {
  80. elog "optional dependencies:"
  81. elog " app-arch/p7zip (needed for blocklists packed as .7z)"
  82. elog " app-arch/unzip (needed for blocklists packed as .zip)"
  83. elog " virtual/mta (needed to send informational (blocklist updates) and"
  84. elog " warning mails (if pglcmd.wd detects a problem.))"
  85. gnome2_icon_cache_update
  86. }
  87. pkg_postrm() {
  88. gnome2_icon_cache_update
  89. }