summaryrefslogtreecommitdiff
blob: 1f705ea294b724fab2561a0e2bdaf927bb0a288b (plain)
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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit eutils user

MY_P="PTlink.OPM${PV}"

DESCRIPTION="PTlink Open Proxy Monitor"
HOMEPAGE="http://www.ptlink.net/"
SRC_URI="ftp://ftp.sunsite.dk/projects/ptlink/ptopm/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~ppc"
IUSE=""

RDEPEND=""
DEPEND=">=sys-apps/sed-4"

S=${WORKDIR}/${MY_P}

src_configure() {
	econf \
		--sysconfdir=/etc/ptlink-opm \
		--localstatedir=/var/lib/ptlink-opm
}

src_install() {
	newbin src/ptopm ptlink-opm

	insinto /etc/ptlink-opm
	newins samples/ptopm.dconf.sample ptopm.dconf
	doins samples/scan_rules.dconf

	keepdir /var/{lib,log}/ptlink-opm
	dosym /var/log/ptlink-opm /var/lib/ptlink-opm/log

	dodoc CHANGES README || die "dodoc failed"

	newinitd "${FILESDIR}"/ptlink-opm.init.d ptlink-opm
	newconfd "${FILESDIR}"/ptlink-opm.conf.d ptlink-opm
}

pkg_postinst() {
	enewuser ptlink-opm
	chown ptlink-opm "${ROOT}"/var/{log,lib}/ptlink-opm
}