summaryrefslogtreecommitdiffstats
path: root/sci-electronics/adas/adas-3.2.7.ebuild
blob: 4aecd347851c0e0d5fd42b57471de5b06cdb8ff3 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 

inherit eutils

DESCRIPTION="Unified Aragats Data Acquisition System"
SRC_URI="http://dside.dyndns.org/files/adas/${P}.tar.bz2"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 amd64"

DEPEND="dev-libs/libxml2
	dev-libs/libds
	www-servers/apache"
RDEPEND="${DEPEND}
	app-misc/lcdproc
	net-misc/ntp"
	
src_compile() {
    make -C adas || die
    make -C clients || die
    make -C namt/emu || die
    make -C tools
}

src_install() {
    into /usr
    dobin adas/adas-srv || die
    dobin misc/adas.pl || die
    dobin misc/adas_error || die
    dobin misc/adas_xml2ascii || die
    cp -P -f misc/adas_xml2csv ${D}/usr/bin || die
    dobin misc/adas_ascii2xml || die
    dobin clients/adas-simple || die
    dobin tools/nettest || die
    cp -P -f tools/nettest-* ${D}/usr/bin/
    dobin namt/emu/namt-emu || die
    newinitd misc/adas.gentoo adas
    newinitd misc/adas-eden.gentoo adas-eden

    dodir /etc
    dodir /etc/cron.hourly
    dodir /etc/cron.daily
    install -m 644 adas/adas.cfg ${D}/etc/adas.cfg.example
    install -m 755 misc/adas-eden.cron ${D}/etc/cron.hourly/adas
    install -m 755 misc/adas-clean.cron ${D}/etc/cron.hourly/adas-clean
    install -m 755 misc/adas-ntp.pl ${D}/etc/cron.hourly/adas-ntp.pl

    install -m 755 misc/adas-clean.cfg ${D}/etc/adas-clean.cfg
    chown apache:apache ${D}/etc/adas-clean.cfg

    install -m 755 emu/ascii.pl ${D}/usr/bin/adas-emu-ascii.pl

    dodir /var/www/localhost/
    cp -R web ${D}/var/www/localhost/
    mv ${D}/var/www/localhost/web ${D}/var/www/localhost/htdocs
    
    keepdir /var/www/localhost/htdocs/data
}