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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
# $NetBSD: Makefile,v 1.6 2011/05/07 18:39:05 tnn Exp $
#
VERSION= 4.1.0
DISTNAME= xen-${VERSION}
PKGNAME= xentools41-${VERSION}
PKGREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
DISTFILES= ${DISTNAME}.tar.gz
DISTFILES+= ipxe-git-v1.0.0.tar.gz
SITES.ipxe-git-v1.0.0.tar.gz += http://xenbits.xensource.com/xen-extfiles/
MAINTAINER= cegger@NetBSD.org
HOMEPAGE= http://xen.org/
COMMENT= Userland Tools for Xen 4.1.x
LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
#DEPENDS+= ${PYPKGPREFIX}-readline-[0-9]*:../../devel/py-readline
# XXX add version check: Xen requires dev86 >= 0.16.14
BUILD_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware
BUILD_DEPENDS+= ocaml-findlib-[0-9]*:../../devel/ocaml-findlib
PKG_SYSCONFSUBDIR= xen
ONLY_FOR_PLATFORM= Linux-2.6*-i386 Linux-2.6*-x86_64
ONLY_FOR_PLATFORM+= NetBSD-[5-9].*-x86_64 NetBSD-[5-9].*-i386
CONFLICTS+= libxen-[0-9]*
CONFLICTS+= xentools20-[0-9]*
CONFLICTS+= xentools3*
WRKSRC= ${WRKDIR}/xen-${VERSION}/tools
CHECK_PORTABILITY_SKIP= examples/*
EGDIR= ${PREFIX}/share/examples/xen
MESSAGE_SUBST= EGDIR=${EGDIR}
USE_TOOLS+= perl #for pod2man
USE_TOOLS+= gmake
MAKE_ENV+= PREFIX=${prefix:Q} WRKSRC=${WRKSRC}
MAKE_ENV+= EGDIR=${EGDIR:Q}
MAKE_ENV+= BASH_COMPLETION_DIR=${EGDIR:Q}
MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
MAKE_ENV+= VARBASE=${VARBASE}
#MAKE_ENV+= INSTALL_DIR=${BSD_INSTALL_DATA_DIR}
#MAKE_ENV+= INSTALL_DATA=${BSD_INSTALL_DATA}
#MAKE_ENV+= INSTALL_PROG=${BSD_INSTALL_PROGRAM}
PY_PATCHPLIST= yes
#PYTHON_PATCH_SCRIPTS+= misc/xm
#PYTHON_PATCH_SCRIPTS+= misc/netfix
#PYTHON_PATCH_SCRIPTS+= misc/xen-bugtool
#PYTHON_PATCH_SCRIPTS+= misc/xencons
#PYTHON_PATCH_SCRIPTS+= misc/xend
#PYTHON_PATCH_SCRIPTS+= misc/xensymoops
#PYTHON_PATCH_SCRIPTS+= misc/xen-python-path
#PYTHON_PATCH_SCRIPTS+= pygrub/src/pygrub
#PYTHON_PATCH_SCRIPTS+= python/xen/util/*.py
#PYTHON_PATCH_SCRIPTS+= python/xen/xend/*.py
#PYTHON_PATCH_SCRIPTS+= python/xen/xm/*.py
#PYTHON_PATCH_SCRIPTS+= python/xen/util/*.py
#PYTHON_PATCH_SCRIPTS+= python/*.py
#PYTHON_PATCH_SCRIPTS+= security/python/xensec_gen/cgi-bin/policy.cgi
#PYTHON_PATCH_SCRIPTS+= security/python/xensec_gen/*.py
#PYTHON_PATCH_SCRIPTS+= security/python/*.py
#PYTHON_PATCH_SCRIPTS+= security/*.py
#PYTHON_PATCH_SCRIPTS+= xenmon/*.py
#PYTHON_PATCH_SCRIPTS+= xentrace/xentrace_format
SUBST_CLASSES+= pathsvar
SUBST_STAGE.pathsvar= pre-configure
SUBST_FILES.pathsvar= Makefile \
examples/xend-config.sxp \
hotplug/Linux/init.d/sysconfig.xendomains \
python/xen/xend/XendOptions.py \
python/xen/xend/server/relocate.py \
python/xen/xend/tests/xend-config.sxp \
security/Makefile \
security/python/xensec_gen/main.py \
xenstore/xs_lib.c
SUBST_SED.pathsvar= -e "s|/var/lib|${VARBASE}/run|g"
SUBST_CLASSES+= conf
SUBST_STAGE.conf= pre-configure
SUBST_FILES.conf+= python/xen/xm/create.py
SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
.include "../../mk/bsd.prefs.mk"
XEND_SCRIPTS= block vif-bridge vif-ip qemu-ifup hotplugpath.sh
.if ${OPSYS} == "NetBSD"
SUBST_CLASSES+= proc
SUBST_STAGE.proc= pre-configure
SUBST_FILES.proc= python/xen/xend/XendVnet.py
SUBST_SED.proc= -e "s|/proc|/kern|g"
PROCPATH= /kern
.else
PROCPATH= /proc
.endif
RCD_SCRIPTS= xen-watchdog xencommons xend xendomains
FILES_SUBST+= RCD_INTERPRETER=${PYTHONBIN:Q}
FILES_SUBST+= PROCPATH=${PROCPATH:Q}
FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
FILES_SUBST+= PREFIX=${PREFIX:Q}
BLKTAP_FILES= blk_netbsd.c blktapctrl_netbsd.c
CONF_FILES+= ${EGDIR}/xend-config.sxp ${PKG_SYSCONFDIR}/xend-config.sxp
CONF_FILES+= ${EGDIR}/formats ${PKG_SYSCONFDIR}/formats
CONF_FILES+= ${EGDIR}/xm-config.xml ${PKG_SYSCONFDIR}/xm-config.xml
OWN_DIRS= ${PKG_SYSCONFDIR}/scripts ${VARBASE}/log/xen ${VARBASE}/lib
.for s in ${XEND_SCRIPTS}
CONF_FILES_PERMS+= ${EGDIR}/scripts/${s} ${PKG_SYSCONFDIR}/scripts/${s} \
${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
.endfor
pre-build:
rm -f ${WRKSRC}/check/check_x11_devel
.for s in ${BLKTAP_FILES}
${CP} ${FILESDIR}/${s} ${WRKSRC}/blktap/drivers/
.endfor
pod2man ${WRKSRC}/../docs/man/xend-config.sxp.pod.5 |\
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
>${WRKDIR}/xend-config.sxp.5
pod2man ${WRKSRC}/../docs/man/xmdomain.cfg.pod.5 |\
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
>${WRKDIR}/xmdomain.cfg.5
pod2man ${WRKSRC}/../docs/man/xm.pod.1 |\
${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
>${WRKDIR}/xm.1
INSTALLATION_DIRS= ${EGDIR} ${PKGMANDIR}/man5
post-install:
for f in xend-config.sxp xmexample1 xmexample2 xmexample3; do \
${INSTALL_DATA} ${WRKSRC}/examples/$$f ${DESTDIR}${EGDIR}/$$f; \
done
${INSTALL_DATA} ${WRKDIR}/xend-config.sxp.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
${INSTALL_DATA} ${WRKDIR}/xmdomain.cfg.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
${INSTALL_DATA} ${WRKDIR}/xm.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.if ${OPSYS} == "NetBSD"
CPPFLAGS+= -Dshm_open=open -Dshm_unlink=unlink
.endif
.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
.include "../../textproc/py-xml/buildlink3.mk"
.include "../../devel/py-curses/buildlink3.mk"
.include "../../devel/ncurses/buildlink3.mk"
#.include "../../devel/SDL/buildlink3.mk"
.include "../../lang/ocaml/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|