mini-qmail-1.05-r1.ebuild 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils toolchain-funcs fixheadtails
  4. MINI_VER=0.52
  5. DESCRIPTION="a small null client that forwards mail via QMQP to a full qmail server"
  6. HOMEPAGE="http://www.qmail.org/ http://cr.yp.to/qmail/mini.html"
  7. SRC_URI="mirror://qmail/netqmail-${PV}.tar.gz
  8. http://www.din.or.jp/~ushijima/mini-qmail-kit/mini-qmail-kit-${MINI_VER}.tar.gz"
  9. LICENSE="public-domain"
  10. SLOT="0"
  11. KEYWORDS="amd64 arm hppa ~mips ppc x86"
  12. IUSE=""
  13. DEPEND="sys-apps/groff"
  14. RDEPEND="
  15. !mail-mta/courier
  16. !mail-mta/esmtp
  17. !mail-mta/exim
  18. !mail-mta/msmtp
  19. !mail-mta/netqmail
  20. !mail-mta/nullmailer
  21. !mail-mta/postfix
  22. !mail-mta/qmail-ldap
  23. !mail-mta/sendmail
  24. !mail-mta/ssmtp
  25. !mail-mta/opensmtpd
  26. "
  27. S=${WORKDIR}/mini-qmail-kit-${MINI_VER}
  28. src_unpack() {
  29. unpack netqmail-${PV}.tar.gz
  30. unpack mini-qmail-kit-${MINI_VER}.tar.gz
  31. cd "${S}"
  32. epatch "${FILESDIR}"/${PV}-config-mini-help.patch
  33. sed -i \
  34. -e "/^qmail=/s:=.*:=${WORKDIR}/netqmail-${PV}/netqmail-${PV}:" \
  35. Makefile.mini || die
  36. cd "${WORKDIR}"/netqmail-${PV}
  37. ./collate.sh || die "patching failed"
  38. cd netqmail-${PV}
  39. echo -n "$(tc-getCC) ${CFLAGS}" > "${S}"/conf-cc
  40. echo -n "$(tc-getCC) ${LDFLAGS}" > "${S}"/conf-ld
  41. ht_fix_file Makefile
  42. }
  43. src_compile() {
  44. emake -f Makefile.mini || die "mini prep failed"
  45. emake mini || die "make mini failed"
  46. }
  47. src_install() {
  48. einfo "Setting up directory hierarchy ..."
  49. keepdir /var/mini-qmail/control
  50. dodoc INSTALL README
  51. exeinto /var/mini-qmail/bin
  52. doexe qmail-qmqpc forward qmail-inject \
  53. sendmail predate datemail mailsubj \
  54. qmail-showctl maildirmake maildir2mbox \
  55. maildirwatch qail elq pinq \
  56. || die "doexe failed"
  57. dosym qmail-qmqpc /var/mini-qmail/bin/qmail-queue
  58. newexe config-mini.sh config-mini
  59. dosed "s:QMAIL:/var/mini-qmail/:g" /var/mini-qmail/bin/config-mini
  60. doman qmail-qmqpc.8 forward.1 qmail-inject.8 \
  61. mailsubj.1 qmail-showctl.8 maildirmake.1 \
  62. maildir2mbox.1 maildirwatch.1 qmail-queue.8 \
  63. qmail.7
  64. einfo "Adding env.d entry for qmail"
  65. doenvd "${FILESDIR}"/99qmail
  66. einfo "Creating sendmail replacement ..."
  67. diropts -m 755
  68. dodir /usr/sbin /usr/lib
  69. dosym /var/mini-qmail/bin/sendmail /usr/sbin/sendmail
  70. dosym /var/mini-qmail/bin/sendmail /usr/lib/sendmail
  71. }
  72. pkg_postinst() {
  73. elog "In order for mini-qmail to work, you need to setup"
  74. elog "the QMQP server information."
  75. elog
  76. elog "You can setup the values in /var/mini-qmail/control yourself,"
  77. elog "or use the utility /var/mini-qmail/bin/config-mini"
  78. elog "To find out what values to put in what files, see the install"
  79. elog "section of http://cr.yp.to/qmail/mini.html"
  80. }