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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20