blob: e9503e8ab1ea9f6f00568919bffd1de729fb5b49 (
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
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
166
167
168
|
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Contributor: Roger Pau Monne <roger.pau@entel.upc.edu>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xen
pkgver=4.2.0
pkgrel=7
pkgdesc="Xen hypervisor"
url="http://www.xen.org/"
arch="x86 x86_64"
license="GPL"
depends="syslinux bash screen"
depends_dev="openssl-dev python-dev e2fsprogs-dev gettext zlib-dev ncurses-dev
libiconv-dev dev86 texinfo perl iasl pciutils-dev glib-dev yajl-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-hypervisor $pkgname-xend"
source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
qemu_uclibc_configure.patch
librt.patch
make_stubdoms.patch
qemu-xen_paths.patch
xsa20.patch
xsa22-4.2-unstable.patch
xsa23-4.2-unstable.patch
xsa24.patch
xsa25-4.2.patch
xsa26-4.2.patch
xsa27-4.2.patch
xsa29-4.2-unstable.patch
xsa30-4.2.patch
xsa31-4.2-unstable.patch
xsa32-4.2.patch
xenstored.initd
xenstored.confd
xenconsoled.initd
xenconsoled.confd
xend.initd
xend.confd
xendomains.initd
xendomains.confd
xen-consoles.logrotate
xenqemu.confd
xenqemu.initd
"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
# remove all -Werror
msg "Eradicating -Werror..."
find -name '*.mk' -o -name 'Make*' | xargs sed -i -e 's/-Werror//g'
unset CFLAGS
unset LDFLAGS
msg "Running configure..."
./configure || return 1
}
build() {
cd "$_builddir"
# Unset CFLAGS and LDFLAGS because the xen build system
# doesn't support them. Instead use .config in xen root
# folder if necessary.
unset CFLAGS
unset LDFLAGS
msg "Building hypervisor..."
make xen || return 1
msg "Building tools..."
make tools || return 1
msg "Building documentation..."
make docs || return 1
msg "Building stub domains..."
make stubdom || return 1
}
package() {
cd "$_builddir"
unset CFLAGS
unset LDFLAGS
make -j1 DESTDIR="$pkgdir" install-xen install-tools install-docs \
install-stubdom || return 1
# remove default xencommons
rm -rf "$pkgdir"/etc/init.d/xencommons
for i in $source; do
case $i in
*.initd) install -Dm755 "$srcdir"/$i \
"$pkgdir"/etc/init.d/${i%.*};;
*.confd) install -Dm644 "$srcdir"/$i \
"$pkgdir"/etc/conf.d/${i%.*};;
esac
done
install -Dm644 "$srcdir"/xen-consoles.logrotate \
"$pkgdir"/etc/xen/xen-consoles.logrotate
}
libs() {
pkgdesc="Libraries for Xen tools"
replaces="xen"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.so.* \
"$pkgdir"/usr/lib/fs \
"$subpkgdir"/usr/lib/
}
hypervisor() {
pkgdesc="Xen hypervisor"
replaces="xen"
mkdir -p "$subpkgdir"
mv "$pkgdir"/boot "$subpkgdir"/
}
xend() {
pkgdesc="Xend toolstack"
replaces="xen"
depends="udev xen python"
mkdir -p "$subpkgdir"
sitepackages=`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
mkdir -p "$subpkgdir"/"$sitepackages"/xen
find "$pkgdir"/"$sitepackages"/xen -maxdepth 1 -mindepth 1 -type d -not -name lowlevel \
-exec mv '{}' "$subpkgdir"/"$sitepackages"/xen \;
}
md5sums="f4f217969afc38f09251039966d91a87 xen-4.2.0.tar.gz
506e7ab6f9482dc95f230978d340bcd9 qemu_uclibc_configure.patch
2dc5ddf47c53ea168729975046c3c1f9 librt.patch
41ad48fdc269749776fa6aa04f6778c2 make_stubdoms.patch
1ccde6b36a6f9542a16d998204dc9a22 qemu-xen_paths.patch
fb7e76f00c2a4e63b408cb67df7d1a7b xsa20.patch
5a67dfac5e6f5a0836aeaefa1804c09f xsa22-4.2-unstable.patch
9151e7c648b12f518826ad0f0a67da42 xsa23-4.2-unstable.patch
9bd8b30094f8eb2408846c1b6ed0cad6 xsa24.patch
9fc7097ed2e5e756c4ae91145c143433 xsa25-4.2.patch
281ad5fefa8856a5b431a7830be6c370 xsa26-4.2.patch
d8cb820b85f86caa58ce1cc215aac069 xsa27-4.2.patch
405531d7e434be9bc663c601d4dc67a4 xsa29-4.2-unstable.patch
23f5ca5789f5358b8d2f8ce998db5ed6 xsa30-4.2.patch
78fa8ac0ac907dd3ae7ef02bea623bb5 xsa31-4.2-unstable.patch
2bd8f676273e644910e6a907372dfa31 xsa32-4.2.patch
95d8af17bf844d41a015ff32aae51ba1 xenstored.initd
b017ccdd5e1c27bbf1513e3569d4ff07 xenstored.confd
ed262f15fb880badb53575539468646c xenconsoled.initd
ec2252c72050d7d5870a3a629b873ba6 xenconsoled.confd
1803ddf6877bdf254082365389a4efa9 xend.initd
9261ad0f285836c1b0ea07f306e4586e xend.confd
c99e24fe50ac40436040e3b012f23cdc xendomains.initd
9b20e056d475b50586cf9e1fc94e13c4 xendomains.confd
9df68ac65dc3f372f5d61183abdc83ff xen-consoles.logrotate
6a2f777c16678d84039acf670d86fff6 xenqemu.confd
f9afbf39e2b5a7d9dde60ebbd249ea7d xenqemu.initd"
|