/[gentoo-x86]/mail-mta/nullmailer/nullmailer-1.11.ebuild
Gentoo

Contents of /mail-mta/nullmailer/nullmailer-1.11.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Nov 6 11:18:38 2012 UTC (23 months, 2 weeks ago) by eras
Branch: MAIN
Changes since 1.5: +1 -2 lines
mail-mta/nbsmtp is no longer in the tree - remove from DEPEND

(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/nullmailer-1.11.ebuild,v 1.5 2012/09/18 10:15:28 blueness Exp $
4
5 EAPI=4
6 WANT_AUTOMAKE="1.10.3"
7 inherit eutils flag-o-matic autotools user multilib
8
9 MY_P="${P/_rc/RC}"
10 S=${WORKDIR}/${MY_P}
11 DEBIAN_PV=1.11
12 DEBIAN_PR="1"
13 DEBIAN_P="${PN}-${DEBIAN_PV}"
14 DEBIAN_PF="${DEBIAN_P/-/_}-${DEBIAN_PR}"
15 DEBIAN_SRC="${DEBIAN_PF}.debian.tar.gz"
16 DESCRIPTION="Simple relay-only local mail transport agent"
17 SRC_URI="http://untroubled.org/${PN}/archive/${MY_P}.tar.gz
18 mirror://debian/pool/main/n/${PN}/${DEBIAN_SRC}"
19 HOMEPAGE="http://untroubled.org/nullmailer/"
20
21 SLOT="0"
22 LICENSE="GPL-2"
23 KEYWORDS="amd64 ppc x86"
24
25 IUSE="ssl"
26
27 DEPEND="sys-apps/groff
28 ssl? ( net-libs/gnutls )"
29 RDEPEND="virtual/shadow
30 virtual/logger
31 ssl? ( net-libs/gnutls )
32 !mail-mta/courier
33 !mail-mta/esmtp
34 !mail-mta/exim
35 !mail-mta/mini-qmail
36 !mail-mta/msmtp
37 !mail-mta/netqmail
38 !mail-mta/postfix
39 !mail-mta/qmail-ldap
40 !mail-mta/sendmail
41 !mail-mta/ssmtp"
42
43 src_prepare() {
44 sed -i -e 's/nullmailer-1.10/nullmailer-1.11/g' \
45 "${WORKDIR}"/debian/patches/*.diff || die
46 EPATCH_OPTS="-d ${S} -p1" \
47 epatch "${DISTDIR}"/${DEBIAN_SRC}
48 # why revert? Ask Robin when he is back!
49 EPATCH_OPTS="-d ${WORKDIR} -p0 -R" \
50 epatch "${WORKDIR}"/debian/patches/02_ipv6.diff
51 # this fixes the debian daemon/syslog to actually compile
52 sed -i.orig \
53 -e '/^nullmailer_send_LDADD/s, =, = ../lib/cli++/libcli++.a,' \
54 "${S}"/src/Makefile.am || die "Sed failed"
55 eautoreconf
56 }
57
58 pkg_setup() {
59 enewgroup nullmail 88
60 enewuser nullmail 88 -1 /var/nullmailer nullmail
61 }
62
63 src_configure() {
64 # Note that we pass a different directory below due to bugs in the makefile!
65 econf \
66 --localstatedir=/var \
67 $(use_enable ssl tls)
68 }
69
70 src_install () {
71 einstall localstatedir="${D}"/var/nullmailer
72 dodoc AUTHORS BUGS HOWTO INSTALL ChangeLog NEWS README TODO
73 # A small bit of sample config
74 insinto /etc/nullmailer
75 newins "${FILESDIR}"/remotes.sample-1.04 remotes
76 # daemontools stuff
77 dodir /var/nullmailer/service{,/log}
78 insinto /var/nullmailer/service
79 newins scripts/nullmailer.run run
80 fperms 700 /var/nullmailer/service/run
81 insinto /var/nullmailer/service/log
82 newins scripts/nullmailer-log.run run
83 fperms 700 /var/nullmailer/service/log/run
84 # usablity
85 dodir /usr/$(get_libdir)
86 dosym /usr/sbin/sendmail usr/$(get_libdir)/sendmail
87 # permissions stuff
88 keepdir /var/log/nullmailer /var/nullmailer/{tmp,queue}
89 fperms 770 /var/log/nullmailer /var/nullmailer/{tmp,queue}
90 fowners nullmail:nullmail /usr/sbin/nullmailer-queue /usr/bin/mailq
91 fperms 4711 /usr/sbin/nullmailer-queue /usr/bin/mailq
92 fowners nullmail:nullmail /var/log/nullmailer /var/nullmailer/{tmp,queue,trigger}
93 fperms 660 /var/nullmailer/trigger
94 newinitd "${FILESDIR}"/init.d-nullmailer-r1 nullmailer
95 }
96
97 pkg_postinst() {
98 [ ! -e "${ROOT}"/var/nullmailer/trigger ] && mkfifo "${ROOT}"/var/nullmailer/trigger
99 chown nullmail:nullmail "${ROOT}"/var/log/nullmailer "${ROOT}"/var/nullmailer/{tmp,queue,trigger}
100 chmod 770 "${ROOT}"/var/log/nullmailer "${ROOT}"/var/nullmailer/{tmp,queue}
101 chmod 660 "${ROOT}"/var/nullmailer/trigger
102
103 elog "To create an initial setup, please do:"
104 elog "emerge --config =${CATEGORY}/${PF}"
105 echo
106 elog "To start nullmailer at boot you may use either the nullmailer init.d"
107 elog "script, or emerge sys-process/supervise-scripts, enable the"
108 elog "svscan init.d script and create the following link:"
109 elog "ln -fs /var/nullmailer/service /service/nullmailer"
110 echo
111 }
112
113 pkg_config() {
114 if [ ! -s "${ROOT}"/etc/nullmailer/me ]; then
115 einfo "Setting /etc/nullmailer/me"
116 /bin/hostname --fqdn > "${ROOT}"/etc/nullmailer/me
117 fi
118 if [ ! -s "${ROOT}"/etc/nullmailer/defaultdomain ]; then
119 einfo "Setting /etc/nullmailer/defaultdomain"
120 /bin/hostname --domain > "${ROOT}"/etc/nullmailer/defaultdomain
121 fi
122 }

  ViewVC Help
Powered by ViewVC 1.1.20