dnscrypt-proxy-1.6.1.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit systemd user
  5. DESCRIPTION="A tool for securing communications between a client and a DNS resolver"
  6. HOMEPAGE="http://dnscrypt.org/"
  7. SRC_URI="http://download.dnscrypt.org/${PN}/${P}.tar.gz"
  8. LICENSE="ISC"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="+plugins systemd"
  12. CDEPEND="
  13. dev-libs/libsodium
  14. net-libs/ldns
  15. systemd? ( sys-apps/systemd )"
  16. RDEPEND="${CDEPEND}"
  17. DEPEND="${CDEPEND}
  18. virtual/pkgconfig"
  19. DOCS="AUTHORS ChangeLog NEWS README* THANKS *txt"
  20. pkg_setup() {
  21. enewgroup dnscrypt
  22. enewuser dnscrypt -1 -1 /var/empty dnscrypt
  23. }
  24. src_configure() {
  25. econf \
  26. $(use_enable plugins) \
  27. $(use_with systemd)
  28. }
  29. src_install() {
  30. default
  31. newinitd "${FILESDIR}"/${PN}.initd-1.6.1 ${PN}
  32. newconfd "${FILESDIR}"/${PN}.confd-1.6.0-r1 ${PN}
  33. systemd_dounit "${FILESDIR}"/${PN}.service
  34. }
  35. pkg_postinst() {
  36. elog "After starting the service you will need to update your"
  37. elog "/etc/resolv.conf and replace your current set of resolvers"
  38. elog "with:"
  39. elog
  40. elog "nameserver <DNSCRYPT_LOCALIP>"
  41. elog
  42. elog "where <DNSCRYPT_LOCALIP> is what you supplied in"
  43. elog "/etc/conf.d/dnscrypt-proxy, default is \"127.0.0.1\"."
  44. elog
  45. elog "Also see https://github.com/jedisct1/dnscrypt-proxy#usage."
  46. }