email-3.0.5.ebuild 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit flag-o-matic
  4. DESCRIPTION="Advanced CLI tool for sending email"
  5. HOMEPAGE="http://www.cleancode.org/projects/email"
  6. SRC_URI="http://www.cleancode.org/downloads/${PN}/${P}.tar.bz2"
  7. LICENSE="GPL-2"
  8. SLOT="0"
  9. KEYWORDS="~alpha ~amd64 ~x86"
  10. IUSE=""
  11. DEPEND=""
  12. RDEPEND="${DEPEND}"
  13. pkg_setup() {
  14. append-ldflags $(no-as-needed)
  15. }
  16. src_compile() {
  17. local myconf=""
  18. if [ -f /etc/conf.d/clock ]; then
  19. . /etc/conf.d/clock
  20. if [ x$CLOCK = "xUTC" ]; then
  21. elog "Using UTC timestamps (from /etc/conf.d/clock)"
  22. myconf="${myconf} --with-utc"
  23. fi
  24. fi
  25. sed -i -e "s:/doc/email-\${version}:/share/doc:" configure
  26. sed -i -e "s:DIVIDER = '---':DIVIDER = '-- ':" email.conf
  27. econf ${myconf} || die "econf failed"
  28. emake || die "emake failed"
  29. }
  30. src_install() {
  31. doman email.1
  32. dodoc INSTALL quoted-printable.rfc RFC821 TODO
  33. make DESTDIR="${D}" install || die "install failed"
  34. }
  35. pkg_preinst() {
  36. rm "${D}"/usr/share/doc/"${P}"/email.1
  37. }
  38. pkg_postinst() {
  39. echo
  40. elog "Do not forget to edit /etc/email/email.conf file before using email."
  41. echo
  42. }