Skip to content

Commit

Permalink
mail-filter/sid-milter: add libressl support
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.2.20.1
  • Loading branch information
blueness committed Oct 11, 2015
1 parent 11f3de0 commit 6e003ab
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions mail-filter/sid-milter/sid-milter-1.0.0-r7.ebuild
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
}

0 comments on commit 6e003ab

Please sign in to comment.