summaryrefslogtreecommitdiff
blob: 4142b8918c1c7ab1caa5d76f137e2ac38988f880 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="Palantir is a Linux-based streaming system designed to transmit live video, audio and data over a TCP/IP network, as well as to control remote devices."
HOMEPAGE="http://www.fastpath.it/products/palantir/index.php"
SRC_URI="http://www.fastpath.it/products/${PN}/pub/${P}.tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND="media-libs/jpeg"
RDEPEND="${DEPEND}"

S="${S}/server"

PALANTIR_USER="palantir"
PALANTIR_PIPE_PATH="/var/run/palantir/telmu_pipe"

src_unpack() {
	unpack ${A}
	epatch "${FILESDIR}/${PV}-makefile.patch"
	sed -i -e "s#/usr/local/share/palantir/telmu_pipe#${PALANTIR_PIPE_PATH}#" "${S}/tools/set_sensor"
}

pkg_setup() {
	enewuser ${PALANTIR_USER}
}

src_compile() {
	export NAMED_PIPE="${PALANTIR_PIPE_PATH}"
	emake || die "emake failed"
}

src_install() {
	dobin palantir
	newbin tools/sysfeed palantir_sysfeed
	newbin tools/set_sensor palantir_set_sensor

	insinto /usr/share/${PN}
	doins -r pict

	insinto /etc/palantir
	doins "${FILESDIR}/palantir.conf.sample"

	dodir /var/log
	touch "${D}/var/log/palantir.log"

	dodir /var/run/palantir
	mkfifo "${D}${NAMED_PIPE}"
	fperms 0600 "${NAMED_PIPE}"
	fowners ${PALANTIR_USER} "${NAMED_PIPE}" /var/log/palantir.log

	newinitd "${FILESDIR}/palantir.init" palantir

	dodoc doc/* README TODO
	doman man/palantir.1 man/palantir.conf.5
	dohtml man/html/*
}