privoxy-3.0.24-r2.ebuild 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils toolchain-funcs autotools systemd user
  5. [ "${PV##*_}" = "beta" ] &&
  6. PRIVOXY_STATUS="beta" ||
  7. PRIVOXY_STATUS="stable"
  8. HOMEPAGE="http://www.privoxy.org https://sourceforge.net/projects/ijbswa/"
  9. DESCRIPTION="A web proxy with advanced filtering capabilities for enhancing privacy"
  10. SRC_URI="mirror://sourceforge/ijbswa/${P%_*}-${PRIVOXY_STATUS}-src.tar.gz"
  11. IUSE="+acl editor external-filters +fast-redirects +force graceful-termination
  12. +image-blocking ipv6 lfs png-images selinux +stats +threads toggle
  13. whitelists +zlib"
  14. SLOT="0"
  15. KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~x86-fbsd"
  16. LICENSE="GPL-2"
  17. DEPEND="dev-libs/libpcre
  18. zlib? ( sys-libs/zlib )"
  19. RDEPEND="${DEPEND}
  20. selinux? ( sec-policy/selinux-privoxy )"
  21. REQUIRED_USE="toggle? ( editor )"
  22. S="${WORKDIR}/${P%_*}-${PRIVOXY_STATUS}"
  23. pkg_pretend() {
  24. if ! use threads; then
  25. ewarn
  26. ewarn "Privoxy may be very slow without threads support, consider to enable them."
  27. ewarn "See also http://www.privoxy.org/faq/trouble.html#GENTOO-RICERS"
  28. ewarn
  29. fi
  30. }
  31. pkg_setup() {
  32. enewgroup privoxy
  33. enewuser privoxy -1 -1 /etc/privoxy privoxy
  34. }
  35. src_prepare() {
  36. epatch "${FILESDIR}"/${PN}-3.0.19-gentoo.patch
  37. # autoreconf needs to be called even if we don't modify any autotools source files
  38. # See main makefile
  39. eautoreconf
  40. }
  41. src_configure() {
  42. econf \
  43. $(use_enable acl acl-support) \
  44. $(use_enable editor) \
  45. $(use_enable fast-redirects) \
  46. $(use_enable force) \
  47. $(use_enable graceful-termination) \
  48. $(use_enable image-blocking) \
  49. $(use_enable ipv6 ipv6-support) \
  50. $(use_enable lfs large-file-support) \
  51. $(use_enable png-images no-gifs) \
  52. $(use_enable stats) \
  53. $(use_enable threads pthread) \
  54. $(use_enable toggle) \
  55. $(use_enable whitelists trust-files) \
  56. $(use_enable zlib) \
  57. $(usex zlib --enable-compression "") \
  58. --enable-dynamic-pcre \
  59. --with-user=privoxy \
  60. --with-group=privoxy \
  61. --sysconfdir=/etc/privoxy \
  62. --docdir=/usr/share/doc/${PF}
  63. }
  64. src_install () {
  65. default
  66. newinitd "${FILESDIR}/privoxy.initd-3" privoxy
  67. systemd_dounit "${FILESDIR}"/${PN}.service
  68. insinto /etc/logrotate.d
  69. newins "${FILESDIR}/privoxy.logrotate" privoxy
  70. diropts -m 0750 -g privoxy -o privoxy
  71. keepdir /var/log/privoxy
  72. }