Merge commit 'origin/opendreambox-1.6' into vuplus-1.6
[vuplus_openembedded] / recipes / palantir / palantir_2.7.bb
1 DESCRIPTION = "Palantir - a multichannel interactive streaming solution"
2 LICENSE = "GPLv2"
3 DEPENDS = "jpeg libgsm"
4
5 SRC_URI = "http://www.fastpath.it/products/palantir/pub/palantir-${PV}.tgz"
6
7 S = "${WORKDIR}/palantir-${PV}/server"
8
9 TARGET_CC_ARCH += "${CFLAGS} ${LDFLAGS}"
10
11 export BASE_DIR="${prefix}"
12
13 do_install() {
14         sed -i -e s:chown:echo:g -e s:chmod:echo:g Makefile
15         mkdir -p ${D}/var/log/palantir
16         LOG_FILE="${D}/var/log/palantir" OWNER="${USER}" BASE_DIR="${D}${prefix}" oe_runmake install
17         rm ${D}/${datadir}/palantir/telmu_pipe
18 }
19
20 FILES_${PN} += "${datadir}/palantir/"
21
22 pkg_postinst_${PN} () {
23         # can't do this offline
24         if [ "x$D" != "x" ]; then
25                 exit 1
26         fi
27         grep "^palantir:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/palantir --no-create-home palantir --ingroup palantir -g palantir
28         mkfifo ${datadir}/palantir/telmu_pipe
29         chown palantir ${datadir}/palantir/*
30         chmod 600 ${datadir}/palantir/telmu_pipe
31 }
32
33
34 pkg_postrm_${PN} () {
35         deluser palantir || true
36 }
37