summaryrefslogtreecommitdiff
path: root/sysutils/xenconsole/Makefile
blob: 3087188c4747bb7dc950c7931a3044b19f82c896 (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
# $NetBSD: Makefile,v 1.2 2005/12/29 06:22:19 jlam Exp $

DISTNAME=	xenConsole-r0.15b1-1
PKGNAME=	xenconsole-0.15b1.1
CATEGORIES=	sysutils
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=ucck/}

MAINTAINER=	martti@NetBSD.org
HOMEPAGE=	http://ucck.sourceforge.net/xenConsole/
COMMENT=	Console monitor for Xen

WRKSRC=		${WRKDIR}/xenConsole

DEPENDS+=	p5-Config-IniFiles>=2.38:../../devel/p5-Config-IniFiles
DEPENDS+=	p5-Curses-UI>=0.95:../../devel/p5-Curses-UI
DEPENDS+=	p5-Curses-UI-POE>=0.02801:../../devel/p5-Curses-UI-POE
DEPENDS+=	p5-Data-Table>=1.43:../../databases/p5-Data-Table
DEPENDS+=	p5-Net-SNMP>=5.0.1:../../net/p5-Net-SNMP
DEPENDS+=	p5-POE>=0.3101:../../devel/p5-POE
DEPENDS+=	p5-POE-Component-SNMP>=0.93:../../net/p5-POE-Component-SNMP
DEPENDS+=	p5-Sys-CpuLoad>=0.03:../../sysutils/p5-Sys-CpuLoad
DEPENDS+=	p5-Term-Size>=0.2:../../devel/p5-Term-Size
DEPENDS+=	p5-Time-HiRes>=0:../../time/p5-Time-HiRes

SUBST_CLASSES+=			xenconsole
SUBST_STAGE.xenconsole=		pre-configure
SUBST_MESSAGE.xenconsole=	"Fixing paths."
SUBST_FILES.xenconsole=		xcon.pl xen_list.pm
SUBST_SED.xenconsole=		-e "s,@PREFIX@,${PREFIX},g"
SUBST_SED.xenconsole+=		-e "s,@LOCALBASE@,${LOCALBASE},g"

REPLACE_PERL=		xcon.pl xsnmp.pm

EGDIR=			${PREFIX}/share/examples/xenconsole
CONF_FILES=		${EGDIR}/xcon.ini ${PKG_SYSCONFDIR}/xcon.ini

do-build:
	${SED} -e "s,@PREFIX@,${PREFIX},g" \
		< ${FILESDIR}/xcon.sh > ${WRKDIR}/xcon

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/xenconsole
	(cd ${WRKSRC} && ${PAX} -rw *.pm */*.pm ${PREFIX}/share/xenconsole)
	${INSTALL_SCRIPT} ${WRKSRC}/xcon.pl ${PREFIX}/share/xenconsole/xcon

	# Configuration file
	${INSTALL_DATA_DIR} ${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/sample-inifile ${EGDIR}/xcon.ini

	# Documentation
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/xenconsole
	(cd ${WRKSRC} && ${PAX} -rw *.txt ${PREFIX}/share/doc/xenconsole)

	# Launcher script
	${INSTALL_SCRIPT} ${WRKDIR}/xcon ${PREFIX}/bin/xcon

.include "../../mk/bsd.pkg.mk"