2009-06-24 13:57:54 +02:00
|
|
|
# Copyright 1999-2005 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
# Author Micha Glave <gentoo@migmedia.de>
|
2016-07-12 08:25:32 +02:00
|
|
|
EAPI=5
|
|
|
|
PYTHON_COMPAT=( python2_7 )
|
|
|
|
inherit eutils python-r1 user
|
2009-06-24 13:57:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION="spf policy server written in python for Postfix"
|
|
|
|
HOMEPAGE="http://www.tummy.com/Community/software/tumgreyspf/"
|
2016-07-11 08:25:16 +02:00
|
|
|
SRC_URI="https://github.com/linsomniac/tumgreyspf/releases/download/release-${PV}/${P}.tar.gz"
|
2009-06-24 13:57:54 +02:00
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~x86 ~amd64"
|
|
|
|
IUSE=""
|
|
|
|
|
2011-11-03 13:27:39 +01:00
|
|
|
DEPEND="=dev-lang/python-2*"
|
2009-06-24 13:57:54 +02:00
|
|
|
RDEPEND="${DEPEND}
|
|
|
|
dev-python/pyspf
|
|
|
|
>=mail-mta/postfix-2.1"
|
|
|
|
|
|
|
|
# TODO
|
|
|
|
# example for master.cf
|
|
|
|
# make sure it works(!)
|
|
|
|
|
|
|
|
src_unpack() {
|
|
|
|
unpack ${A}
|
|
|
|
cd ${S}
|
|
|
|
# fix invalid path in sources
|
|
|
|
sed -i \
|
2016-07-12 08:25:32 +02:00
|
|
|
-e "s!/usr/bin/env python!/usr/bin/env python2!g" \
|
2009-06-24 13:57:54 +02:00
|
|
|
-e "s!/usr/local/lib/tumgreyspf/spfquery!/usr/bin/spfquery.py!g" \
|
|
|
|
-e "s!/usr/lib/tumgreyspf/tumgreyspf!/usr/bin/tumgreyspf!g" \
|
|
|
|
-e "s!/usr/local/lib/tumgreyspf!/usr/bin!g" \
|
|
|
|
-e "s!/var/local/lib/tumgreyspf/config/!/etc/tumgreyspf/!g" \
|
|
|
|
-e "s!/var/local/lib/!/var/lib/!g" \
|
|
|
|
-e "s!tumgreyspf_user = 'nobody'!tumgreyspf_user = '${PN}'!" \
|
|
|
|
* || die "fixing pathnames failed"
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
local MY_FILES
|
|
|
|
local MY_FILE
|
|
|
|
MY_FILES="TODO LICENSE README WHATSNEW
|
|
|
|
README.performance README.QuickStart"
|
|
|
|
for MY_FILE in $MY_FILES; do
|
|
|
|
dodoc $MY_FILE
|
|
|
|
done
|
|
|
|
|
|
|
|
doman tumgreyspf.8
|
|
|
|
|
|
|
|
insinto /etc/${PN}
|
|
|
|
doins tumgreyspf.conf
|
|
|
|
newins __default__.dist __default__
|
|
|
|
|
|
|
|
MY_FILES="tumgreyspf tumgreyspf-clean tumgreyspf-configtest
|
|
|
|
tumgreyspf-install tumgreyspf-stat tumgreyspfsupp.py"
|
|
|
|
for MY_FILE in $MY_FILES; do
|
|
|
|
dobin $MY_FILE
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_preinst() {
|
|
|
|
enewgroup ${PN}
|
|
|
|
enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
|
|
|
|
|
|
|
|
dodir /var/lib/${PN}/data
|
|
|
|
dodir /var/lib/${PN}/data/blackhole
|
|
|
|
fowners ${PN}:${PN} /var/lib/${PN}/data
|
|
|
|
fperms 700 /var/lib/${PN}/data
|
|
|
|
}
|