forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mail-filter/sid-milter: add libressl support
Package-Manager: portage-2.2.20.1
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
} |