fetchmail-6.3.26-r2.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. PYTHON_REQ_USE="tk"
  6. inherit python-single-r1 user systemd toolchain-funcs autotools eutils
  7. DESCRIPTION="the legendary remote-mail retrieval and forwarding utility"
  8. HOMEPAGE="http://www.fetchmail.info/"
  9. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
  10. LICENSE="GPL-2 public-domain"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
  13. IUSE="ssl nls kerberos hesiod tk socks"
  14. REQUIRED_USE="tk? ( ${PYTHON_REQUIRED_USE} )"
  15. RDEPEND="hesiod? ( net-dns/hesiod )
  16. ssl? ( >=dev-libs/openssl-0.9.6 )
  17. kerberos? ( virtual/krb5 >=dev-libs/openssl-0.9.6 )
  18. nls? ( virtual/libintl )
  19. !elibc_glibc? ( sys-libs/e2fsprogs-libs )
  20. socks? ( net-proxy/dante )
  21. tk? ( ${PYTHON_DEPS} )"
  22. DEPEND="${RDEPEND}
  23. app-arch/xz-utils
  24. sys-devel/flex
  25. nls? ( sys-devel/gettext )"
  26. DOCS="FAQ FEATURES NEWS NOTES README README.NTLM README.SSL* TODO"
  27. pkg_setup() {
  28. enewgroup ${PN}
  29. enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
  30. use tk && python-single-r1_pkg_setup
  31. }
  32. src_prepare() {
  33. # don't compile during src_install
  34. use tk && : > "${S}"/py-compile
  35. epatch "${FILESDIR}"/${P}-python-optional.patch
  36. epatch "${FILESDIR}"/${P}-tests.patch
  37. eautoreconf
  38. }
  39. src_configure() {
  40. use tk || export PYTHON=:
  41. econf \
  42. --enable-RPA \
  43. --enable-NTLM \
  44. --enable-SDPS \
  45. $(use_enable nls) \
  46. $(use_with ssl ssl "${EPREFIX}/usr") \
  47. $(use kerberos && echo "--with-ssl=${EPREFIX}/usr") \
  48. $(use_with kerberos gssapi) \
  49. $(use_with kerberos kerberos5) \
  50. $(use_with hesiod) \
  51. $(use_with socks)
  52. }
  53. src_compile() {
  54. emake AR="$(tc-getAR)"
  55. }
  56. src_install() {
  57. # fetchmail's homedir (holds fetchmail's .fetchids)
  58. keepdir /var/lib/${PN}
  59. fowners ${PN}:${PN} /var/lib/${PN}
  60. fperms 700 /var/lib/${PN}
  61. default
  62. dohtml *.html
  63. newinitd "${FILESDIR}"/fetchmail.initd fetchmail
  64. newconfd "${FILESDIR}"/fetchmail.confd fetchmail
  65. systemd_dounit "${FILESDIR}"/${PN}.service
  66. systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
  67. docinto contrib
  68. local f
  69. for f in contrib/* ; do
  70. [ -f "${f}" ] && dodoc "${f}"
  71. done
  72. use tk && python_optimize
  73. }
  74. pkg_postinst() {
  75. if [[ -z ${REPLACING_VERSIONS} ]]; then
  76. elog "Please see /etc/conf.d/fetchmail if you want to adjust"
  77. elog "the polling delay used by the fetchmail init script."
  78. fi
  79. }