forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sid-milter-1.0.0-r7.ebuild
67 lines (54 loc) · 1.77 KB
/
sid-milter-1.0.0-r7.ebuild
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
58
59
60
61
62
63
64
65
66
67
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils toolchain-funcs user
DESCRIPTION="A milter-based application to provide Sender-ID verification service"
HOMEPAGE="http://sourceforge.net/projects/sid-milter/"
SRC_URI="mirror://sourceforge/sid-milter/${P}.tar.gz"
LICENSE="Sendmail-Open-Source"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ipv6 libressl"
DEPEND="
!libressl? ( dev-libs/openssl:0 )
libressl? ( dev-libs/libressl )
>=sys-libs/db-3.2:*
|| ( mail-filter/libmilter mail-mta/sendmail )"
RDEPEND="${DEPEND}
sys-apps/openrc"
pkg_setup() {
enewgroup milter
# mail-milter/spamass-milter creates milter user with this home directory
# For consistency reasons, milter user must be created here with this home directory
# even though this package doesn't need a home directory for this user (#280571)
enewuser milter -1 -1 /var/lib/milter milter
}
src_prepare() {
epatch "${FILESDIR}"/${P}-nopra_on_spf1.patch
epatch "${FILESDIR}"/${P}-as-needed.patch
local CC="$(tc-getCC)"
local ENVDEF=""
use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
sed -e "s:@@CC@@:${CC}:" \
-e "s:@@CFLAGS@@:${CFLAGS}:" \
-e "s:@@LDFLAGS@@:${LDFLAGS}:" \
-e "s:@@ENVDEF@@:${ENVDEF}:" \
"${FILESDIR}/gentoo-config.m4" > "${S}/devtools/Site/site.config.m4" \
|| die "failed to generate site.config.m4"
}
src_compile() {
emake -j1
}
src_install() {
dodir /usr/bin
emake -j1 DESTDIR="${D}" SUBDIRS=sid-filter \
SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
install
newinitd "${FILESDIR}/sid-filter.init-r1" sid-filter
newconfd "${FILESDIR}/sid-filter.conf" sid-filter
# man build is broken; do man page installation by hand
doman */*.8
# some people like docs
dodoc RELEASE_NOTES *.txt sid-filter/README
}