summaryrefslogtreecommitdiff
blob: 84cfab073410f05c62ae84ef0a204493e169f7ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

DESCRIPTION="A qmail queue manipulation program"
HOMEPAGE="http://jeremy.kister.net/code/qmqtool/"
SRC_URI="http://jeremy.kister.net/code/qmqtool/files/${P}.tgz"

LICENSE="Artistic"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="virtual/qmail
	dev-lang/perl"

src_prepare() {
	# make the configure script less capricious and ${ROOT}-friendly
	# i.e. replace real directory/file checks with non-empty var checks
	# and disallow calling perl
	sed -i \
		-e 's:\[ -[dx]:[ -n:g' \
		-e 's:\[ ! -[dx]:[ ! -n:g' \
		-e '/^$perl/d' \
		configure || die
}

src_configure() {
	# econf-incompatible
	./configure \
		--prefix="${D}"/usr \
		--scriptdir="${D}"/usr/bin \
		--perl=/usr/bin/perl \
		--qmaildir=/var/qmail \
		|| die
}

src_install() {
	emake install || die
	dodoc README FAQ ChangeLog || die "dodoc failed"

	docinto contrib/argus
	dodoc contrib/argus/* || die "dodoc failed"

	docinto contrib/cricket
	dodoc contrib/cricket/* || die "dodoc failed"
}