summaryrefslogtreecommitdiff
blob: ad62cc4de1a5095a0a503e86c0db336e834388e2 (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
50
51
52
53
54
55
56
57
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit tmpfiles

PATCH_VER="1.0"

DESCRIPTION="Weighted Policy daemon for Postfix"
HOMEPAGE="http://www.policyd-weight.org/"
SRC_URI="
	http://www.policyd-weight.org/releases/${P}.tar.gz
	mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz
	https://dev.gentoo.org/~whissi/dist/${PN}/${P}-patches-${PATCH_VER}.tar.xz
"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 x86"

RDEPEND="
	acct-group/polw
	acct-user/polw
	dev-perl/Net-DNS
	dev-perl/Net-IP
	mail-mta/postfix
	virtual/perl-File-Spec
	virtual/perl-Sys-Syslog
"

src_prepare() {
	default
	eapply "${WORKDIR}"/patches/*.patch
}

src_compile() { :; }

src_install() {
	exeinto /usr/libexec/postfix
	doexe policyd-weight
	fowners root:wheel /usr/libexec/postfix/policyd-weight

	doman man/man5/*.5 man/man8/*.8
	dodoc *.txt

	insinto /etc
	newins policyd-weight.conf.sample policyd-weight.conf

	newinitd "${FILESDIR}"/policyd-weight.init.d-r2 policyd-weight

	newtmpfiles "${FILESDIR}"/policyd-weight.tmpfile policyd-weight.conf
}

pkg_postinst() {
	tmpfiles_process policyd-weight.conf
}