/[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.1 - (show annotations) (download)
Tue Jun 5 13:48:56 2012 UTC (2 years, 2 months ago) by eras
Branch: MAIN
Version bump. Change --chuid to --user in init script.  Bugs #415417 #405529

(Portage version: 2.1.10.65/cvs/Linux x86_64)

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 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/nbsmtp
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 EPATCH_OPTS="-d ${S} -p1" \
45 epatch "${DISTDIR}"/${DEBIAN_SRC}
46 # why revert? Ask Robin when he is back!
47 EPATCH_OPTS="-d ${WORKDIR} -p0 -R" \
48 epatch "${WORKDIR}"/debian/patches/02_ipv6.diff
49 # this fixes the debian daemon/syslog to actually compile
50 sed -i.orig \
51 -e '/^nullmailer_send_LDADD/s, =, = ../lib/cli++/libcli++.a,' \
52 "${S}"/src/Makefile.am || die "Sed failed"
53
54 eautoreconf
55 }
56
57 pkg_setup() {
58 enewgroup nullmail 88
59 enewuser nullmail 88 -1 /var/nullmailer nullmail
60 }
61
62 src_configure() {
63 # Note that we pass a different directory below due to bugs in the makefile!
64 econf \
65 --localstatedir=/var \
66 $(use_enable ssl tls)
67 }
68
69 src_install () {
70 einstall localstatedir="${D}"/var/nullmailer
71 dodoc AUTHORS BUGS HOWTO INSTALL ChangeLog NEWS README TODO
72 # A small bit of sample config
73 insinto /etc/nullmailer
74 newins "${FILESDIR}"/remotes.sample-1.04 remotes
75 # daemontools stuff
76 dodir /var/nullmailer/service{,/log}
77 insinto /var/nullmailer/service
78 newins scripts/nullmailer.run run
79 fperms 700 /var/nullmailer/service/run
80 insinto /var/nullmailer/service/log
81 newins scripts/nullmailer-log.run run
82 fperms 700 /var/nullmailer/service/log/run
83 # usablity
84 dodir /usr/$(get_libdir)
85 dosym /usr/sbin/sendmail usr/$(get_libdir)/sendmail
86 # permissions stuff
87 keepdir /var/log/nullmailer /var/nullmailer/{tmp,queue}
88 fperms 770 /var/log/nullmailer /var/nullmailer/{tmp,queue}
89 fowners nullmail:nullmail /usr/sbin/nullmailer-queue /usr/bin/mailq
90 fperms 4711 /usr/sbin/nullmailer-queue /usr/bin/mailq
91 fowners nullmail:nullmail /var/log/nullmailer /var/nullmailer/{tmp,queue,trigger}
92 fperms 660 /var/nullmailer/trigger
93 newinitd "${FILESDIR}"/init.d-nullmailer-r1 nullmailer
94 }
95
96 pkg_postinst() {
97 [ ! -e "${ROOT}"/var/nullmailer/trigger ] && mkfifo "${ROOT}"/var/nullmailer/trigger
98 chown nullmail:nullmail "${ROOT}"/var/log/nullmailer "${ROOT}"/var/nullmailer/{tmp,queue,trigger}
99 chmod 770 "${ROOT}"/var/log/nullmailer "${ROOT}"/var/nullmailer/{tmp,queue}
100 chmod 660 "${ROOT}"/var/nullmailer/trigger
101
102 elog "To create an initial setup, please do:"
103 elog "emerge --config =${CATEGORY}/${PF}"
104 echo
105 elog "To start nullmailer at boot you may use either the nullmailer init.d"
106 elog "script, or emerge sys-process/supervise-scripts, enable the"
107 elog "svscan init.d script and create the following link:"
108 elog "ln -fs /var/nullmailer/service /service/nullmailer"
109 echo
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