fdm-1.8.ebuild 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib toolchain-funcs user
  5. DESCRIPTION="fetch, filter and deliver mail"
  6. HOMEPAGE="https://github.com/nicm/fdm"
  7. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="courierauth examples pcre"
  12. DEPEND="dev-libs/openssl:0
  13. sys-libs/tdb
  14. courierauth? ( net-libs/courier-authlib )
  15. pcre? ( dev-libs/libpcre )"
  16. RDEPEND="${DEPEND}"
  17. pkg_setup() {
  18. enewuser _fdm
  19. }
  20. src_prepare() {
  21. rm Makefile || die
  22. sed -e '/^FDEBUG=/s:=.*:=:' \
  23. -e "/ifdef COURIER/aLIBS+=-L${EROOT}usr/$(get_libdir)/courier-authlib" \
  24. -e '/CPPFLAGS/s: -I/usr/local/include : :' \
  25. -i GNUmakefile || die
  26. }
  27. src_compile() {
  28. emake CC="$(tc-getCC)" \
  29. COURIER=$(use courierauth && echo 1) \
  30. PCRE=$(use pcre && echo 1)
  31. }
  32. src_install() {
  33. emake DESTDIR="${D}" PREFIX=/usr MANDIR=/usr/share/man install
  34. dodoc CHANGES README TODO MANUAL
  35. if use examples ; then
  36. docinto examples
  37. dodoc examples/*
  38. fi
  39. }