*/*: [QA] Use consistent function definition formatting
[gentoo.git] / net-mail / qmail-notify / qmail-notify-0.93-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Delayed delivery notification for qmail"
9 SRC_URI="http://untroubled.org/qmail-notify/archive/${P}.tar.gz"
10 HOMEPAGE="http://untroubled.org/qmail-notify/"
11
12 SLOT="0"
13 LICENSE="GPL-2"
14 KEYWORDS="amd64 ~hppa ~ppc sparc x86"
15 IUSE=""
16
17 DEPEND=""
18 RDEPEND="${DEPEND}
19         virtual/cron
20         virtual/qmail
21 "
22
23 src_prepare() {
24         eapply_user
25
26         echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die 'Patching conf-cc failed.'
27         echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die 'Patching conf-ld failed.'
28         sed -e "#'ar #'$(tc-getAR) #" -e "s#'ranlib #'$(tc-getRANLIB) #" -i Makefile || die 'Patching Makefile failed.'
29 }
30
31 src_install() {
32         exeinto /usr/sbin
33         doexe qmail-notify
34
35         exeinto /etc/cron.hourly
36         doexe "${FILESDIR}"/qmail-notify.cron
37
38         dodoc README ANNOUNCEMENT cron.hourly NEWS
39 }
40
41 pkg_postinst() {
42         elog
43         elog "Edit qmail-notify.cron in /etc/cron.hourly"
44         elog "to activate qmail-notify!"
45         elog
46 }