/[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.2 - (show annotations) (download)
Fri Mar 16 11:21:19 2012 UTC (2 years, 9 months ago) by phajdan.jr
Branch: MAIN
Changes since 1.1: +2 -2 lines
Switch to virtual/shadow.

(Portage version: 2.1.10.44/cvs/Linux i686)

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.1 2012/03/09 14:28:32 eras Exp $
4
5 inherit eutils flag-o-matic autotools
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/nbsmtp
34 !mail-mta/netqmail
35 !mail-mta/postfix
36 !mail-mta/qmail-ldap
37 !mail-mta/sendmail
38 !mail-mta/ssmtp"
39
40 src_unpack() {
41 unpack ${MY_P}.tar.gz
42 EPATCH_OPTS="-d ${S} -p1" \
43 epatch "${DISTDIR}"/${DEBIAN_SRC}
44 EPATCH_OPTS="-d ${S} -p1" \
45 epatch "${S}"/debian/patches/02_ipv6.diff || die "IPV6 patch failed"
46 EPATCH_OPTS="-d ${S} -p1" \
47 epatch "${S}"/debian/patches/03_syslog.diff || die "daemon/syslog patch failed"
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 cd "${S}"
54 eautoreconf
55 }
56
57 pkg_setup() {
58 enewgroup nullmail 88
59 enewuser nullmail 88 -1 /var/nullmailer nullmail
60 }
61
62 src_compile() {
63 # Note that we pass a different directory below due to bugs in the makefile!
64 econf --localstatedir=/var || die "econf failed"
65 emake || die "emake failed"
66 }
67
68 src_install () {
69 einstall localstatedir="${D}"/var/nullmailer || die "einstall failed"
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/lib
84 dosym /usr/sbin/sendmail usr/lib/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 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 ewarn "${PF} introduces a new configuration syntax for SMTP AUTH."
110 ewarn "Please adjust your configuration accordingly."
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