72 lines
1.7 KiB
Bash
72 lines
1.7 KiB
Bash
# Copyright 1999-2005 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: $
|
|
# Author Micha Glave <gentoo@migmedia.de>
|
|
|
|
inherit eutils
|
|
|
|
DESCRIPTION="spf policy server written in python for Postfix"
|
|
HOMEPAGE="http://www.tummy.com/Community/software/tumgreyspf/"
|
|
SRC_URI="ftp://ftp.tummy.com/pub/tummy/tumgreyspf/${P}.tar.gz"
|
|
|
|
LICENSE="GPL-2"
|
|
SLOT="0"
|
|
KEYWORDS="~x86 ~amd64"
|
|
IUSE=""
|
|
|
|
DEPEND="=dev-lang/python-2*"
|
|
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 \
|
|
-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
|
|
insinto /etc/${PN}
|
|
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
|
|
}
|