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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20