aboutsummaryrefslogtreecommitdiffstats
path: root/main/xen/APKBUILD
blob: cf005c05e7745ddf05b96ee5856dce46cbb68f59 (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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# 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.2
pkgrel=8
pkgdesc="Xen hypervisor"
url="http://www.xen.org/"
arch="x86 x86_64"
license="GPL"
depends="syslinux bash screen iproute2 logrotate perl"
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
	spice-dev gnutls-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
	qemu-xen_paths.patch
	docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch

	xsa41.patch
	xsa41b.patch
	xsa41c.patch
	xsa45-4.2.patch
	xsa48-4.2.patch
	xsa52-4.2-unstable.patch
	xsa53-4.2.patch
	xsa54.patch
	xsa55.patch
	xsa56.patch
	xsa57.patch
	xsa58-4.2.patch

	fix-pod2man-choking.patch
	qemu-xen-websocket.patch

	xenstored.initd
	xenstored.confd
	xenconsoled.initd
	xenconsoled.confd
	xend.initd
	xend.confd
	xendomains.initd
	xendomains.confd
	xen-consoles.logrotate
	xenqemu.confd
	xenqemu.initd
	"

[ "$ALPINE_LIBC" = "eglibc" ] && arch=

_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	
}

build() {
	cd "$_builddir"

	msg "Running configure..."
	./configure || return 1

	# 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
	unset LANG
	unset LC_ALL

	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="f7362b19401a47826f2d8fd603a1782a  xen-4.2.2.tar.gz
506e7ab6f9482dc95f230978d340bcd9  qemu_uclibc_configure.patch
2dc5ddf47c53ea168729975046c3c1f9  librt.patch
1ccde6b36a6f9542a16d998204dc9a22  qemu-xen_paths.patch
6dcff640268d514fa9164b4c812cc52d  docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch
8ad8942000b8a4be4917599cad9209cf  xsa41.patch
ed7d0399c6ca6aeee479da5d8f807fe0  xsa41b.patch
2f3dd7bdc59d104370066d6582725575  xsa41c.patch
9265540493f41f7d40c48d0886ec5823  xsa45-4.2.patch
b3e3a57d189a4f86c9766eaf3b5207f4  xsa48-4.2.patch
83a9cdd035bcd18bf035434a1ba08c38  xsa52-4.2-unstable.patch
03a1a4ebc470ee7e638e04db2701a4f7  xsa53-4.2.patch
a8393d1ec6b886ea72ffe624a04ee10a  xsa54.patch
42cd104f2a33d67938a63a6372cff573  xsa55.patch
e70b9128ffc2175cea314a533a7d8457  xsa56.patch
7475158130474ee062a4eb878259af61  xsa57.patch
7de2cd11c10d6a554f3c81e0688c38b7  xsa58-4.2.patch
c1d1a415415b0192e5dae9032962bf61  fix-pod2man-choking.patch
af5c5e21e68ae27847e2307815c82f98  qemu-xen-websocket.patch
95d8af17bf844d41a015ff32aae51ba1  xenstored.initd
b017ccdd5e1c27bbf1513e3569d4ff07  xenstored.confd
ed262f15fb880badb53575539468646c  xenconsoled.initd
ec2252c72050d7d5870a3a629b873ba6  xenconsoled.confd
1803ddf6877bdf254082365389a4efa9  xend.initd
9261ad0f285836c1b0ea07f306e4586e  xend.confd
fa8c72b42e0479d521a353386d8543ef  xendomains.initd
2c80e442cec6dd2a025b61852641834d  xendomains.confd
9df68ac65dc3f372f5d61183abdc83ff  xen-consoles.logrotate
6a2f777c16678d84039acf670d86fff6  xenqemu.confd
f9afbf39e2b5a7d9dde60ebbd249ea7d  xenqemu.initd"
sha256sums="c9bfe91a5e72f8545acebad9889d64368020359bfe18044c0e683133e55ae005  xen-4.2.2.tar.gz
4fb92fa1ce67eb3f78a15c6c971415d4d53599904969596acc7a52edc83a5fee  qemu_uclibc_configure.patch
12bf32f9937b09283f2df4955b50d6739768f66137a7d991f661f45cf77cb53b  librt.patch
9440ca31a6911201f02694e93faafb5ca9b17de18b7f15b53ceac39a03411b4a  qemu-xen_paths.patch
a0c225d716d343fe041b63e3940900c5b3573ed3bcfc5b7c2d52ea2861c3fc28  docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch
93452beba88a8da8e89b8bfa743074a358ba1d9052151c608e21c4d62f8c4867  xsa41.patch
896a07f57310c9bea9bc2a305166cf796282c381cb7839be49105b1726a860b5  xsa41b.patch
683dd96a0a8899f794070c8c09643dfeeb39f92da531955cba961b45f6075914  xsa41c.patch
f3c8c75cc6f55409139b1928017d1e432e5e64b6fac2083395f4723353e1c775  xsa45-4.2.patch
dc23077028584e71a08dd0dc9e81552c76744a5ce9d39df5958a95ae9cf3107b  xsa48-4.2.patch
5b8582185bf90386729e81db1f7780c69a891b074a87d9a619a90d6f639bea13  xsa52-4.2-unstable.patch
785f7612bd229f7501f4e98e4760f307d90c64305ee14707d262b77f05fa683d  xsa53-4.2.patch
5d94946b3c9cba52aae2bffd4b0ebb11d09181650b5322a3c85170674a05f6b7  xsa54.patch
ac3ebaf3ec37e28ba08e23d63626d7aaccf0a3f282dd0af9c24cc4df3fd8fae0  xsa55.patch
a691c5f5332a42c0d38ddb4dc037eb902f01ba31033b64c47d02909a8de0257d  xsa56.patch
b6a5106848541972519cc529859d9ff3083c79367276c7031560fa4ce6f9f770  xsa57.patch
194d6610fc38b767d643e5d58a1268f45921fb35e309b47aca6a388b861311c2  xsa58-4.2.patch
b4e7d43364a06b2cb04527db3e9567524bc489fef475709fd8493ebf1e62406d  fix-pod2man-choking.patch
cc4bf76be2c87ba089f9e330f3f18419a8399920319e04f6a97be463ce1bfa1e  qemu-xen-websocket.patch
81d335946c81311c86e2f2112b773a568a5a530c0db9802b2fe559e71bb8b381  xenstored.initd
ea9171e71ab3d33061979bcf3bb737156192aa4b0be4d1234438ced75b6fdef3  xenstored.confd
93bea2eb90ea1b4628854c8141dd351bbd1fbc5959b12795447ea933ad025f01  xenconsoled.initd
2a74be03eb74f6013242a4a5d721df6cb9b959b43c405de1e32813f52d749060  xenconsoled.confd
a50a4485e84bcc098ad021556cd2aa7947c228f0a546ab942e880787ced57be3  xend.initd
7f7a96349084474b76af98426387fec12a0684f505d1691091ac3d2556bde2de  xend.confd
794bed4882cdce8d9ac91d9afc0d5da0f0ac97f38d90c5e965363139a834602d  xendomains.initd
2360b1fa1f102ac1b1a6cd0d161a94d13139dfc21d9a2227d35d557b4f04a63e  xendomains.confd
0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19  xen-consoles.logrotate
4cfcddcade5d055422ab4543e8caa6e5c5eee7625c41880a9000b7a87c7c424e  xenqemu.confd
bf17808a79c57a9efc38b9f14cc87f556b2bb7ecfdec5763d9cf686255a47fce  xenqemu.initd"
sha512sums="4943b18016ed8c2b194a3b55e6655b3b734b39ffb8cb7ee0a0580f2f4460a1d0e92e1de8ac23f5186272914fad1650586af51fd7c3644d0310eb16f2e11c5e80  xen-4.2.2.tar.gz
81a5555c123daad6a9a1835186a82d604e68d833efe3a6576a88717268e5335f809a6621846645c2e1eb1d33a51951a6306e4c393a76c677959149bc28a886be  qemu_uclibc_configure.patch
74e3cfc51e367fc445cb3d8149f0c8830e94719a266daf04d2cd0889864591860c4c8842de2bc78070e4c5be7d14dfbb8b236c511d5faeddc2ad97177c1d3764  librt.patch
425149aea57a6deae9f488cea867f125983998dc6e8c63893fb3b9caf0ea34214251dd98ad74db823f5168631c44c49b988b6fe9c11b76bd493ddf51bc0baaa2  qemu-xen_paths.patch
477d3d08bd4fcdfbc54abea1a18acb6a41d298c366cd01c954f474515cb862d0dd59217c0dfca5460a725a8bc036de42132f522c3eefdffcc4fd511f016b783f  docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch
94672a4d37db4e370370157cac9507ee1a75832f4be779fba148c1faa0b18f26ed57126eee6256ccd5d218463325a730266b53139554f4865adedb7659154c16  xsa41.patch
bda9105793f2327e1317991762120d0668af0e964076b18c9fdbfd509984b2e88d85df95702c46b2e00d5350e8113f6aa7b34b19064d19abbeb4d43f0c431d38  xsa41b.patch
36b60478660ff7748328f5ab9adff13286eee1a1bad06e42fdf7e6aafe105103988525725aacd660cf5b2a184a9e2d6b3818655203c1fa07e07dcebdf23f35d9  xsa41c.patch
a57b4c8be76a938d51e51ffb39f0781389ebef320f359b0ae9af4a93af970d37dde50a304d4864a75b7fb32861a4745b9da5fa6acce0f2a688b11b13ab43fb4e  xsa45-4.2.patch
31dd8c62d41cc0a01a79d9b24a5b793f5e2058230808d9c5364c6ff3477ab02f3258f1bbd761d97dc1b97ee120b41524b999eaac77f33b606496fc324b5fa2e4  xsa48-4.2.patch
b64a965fab8534958e453c493211ed3a6555aafb90d18f6d56a45b41d3086a0029aee85b6b6eb93b0d861d5fdc0ef10fc32e9b4f83593b37c43922d838085dd8  xsa52-4.2-unstable.patch
9b08924e563e79d2b308c1521da520c0579b334b61ac99a5593eabdb96dbda2da898b542cc47bda6d663c68343216d9d29c04853b6d1b6ecdde964b0cbb3f7ab  xsa53-4.2.patch
c9010be637d4f96ef03c880e1ef28228f762c5980108380a105bd190b631a882c8dff81e9421246d88d597e72f69ad1a8c672be6ddd06936acfcacd4575a2650  xsa54.patch
b4f43095163146a29ae258575bb03bd45f5a315d3cca7434a0b88c18eb1b6e1cf17ef13b4ac428a08797271a3dbc756d3f705a990991c8d2fc96f0f272c3665a  xsa55.patch
26a1c2cc92ddd4c1ab6712b0e41a0135d0e76a7fe3a14b651fb0235e352e5a24077414371acccb93058b7ce4d882b667386811170ba74570c53165837bcd983d  xsa56.patch
5ccc1654d9f0270485495f9fc913e41663ddbda602ffe049e0a9c3247c6246690b7ec4165482f96921c5253a2a5205ca384048339996e611c07ab60a6a75cf6a  xsa57.patch
60813c01f6bb909da8748919df4d0ffa923baf4b7b55287e0bec3389fb83020158225182e112941c9e126b4df57e7b8724f2a69d0c1fa9ce3b37c0bdf1a49da4  xsa58-4.2.patch
ffb1113fcec0853b690c177655c7d1136388efdebf0d7f625b80481b98eadd3e9ef461442ced53e11acf0e347800a2b0a41e18b05065b5d04bffdd8a4e127cec  fix-pod2man-choking.patch
5da25a997c69d737b6a43f460d54e34dccf3c94751990969c93e674ab3aaa34ddd41c2b2a7988aaa68a22abf1508705336d9a9ae3637147b0cf9036b9909daf8  qemu-xen-websocket.patch
792b062e8a16a2efd3cb4662d379d1500527f2a7ca9228d7831c2bd34f3b9141df949153ea05463a7758c3e3dd9a4182492ad5505fa38e298ecf8c99db77b4ee  xenstored.initd
100cf4112f401f45c1e4e885a5074698c484b40521262f6268fad286498e95f4c51e746f0e94eb43a590bb8e813a397bb53801ccacebec9541020799d8d70514  xenstored.confd
12f981b2459c65d66e67ec0b32d0d19b95a029bc54c2a79138cfe488d3524a22e51860f755abfe25ddcdaf1b27f2ded59b6e350b9d5f8791193d00e2d3673137  xenconsoled.initd
30df69cc38d0bed26bc4d6e08a2b62cbdc654d5f663009a05cb3b83b3e3dc5e206362d3fd59abbb753ceb8d6d79eaa6e15d079bb8f4f35dc74667103faf4e85d  xenconsoled.confd
55766e22d9374b404b96fba9d30aee49bee6c95fabce9c3d2aed1faba04c1573ecd75fe49e27ce1527ecf9064f53ccc15e4c69a1aa4ea3daa44828f38d687d85  xend.initd
39b38156f0a8498dbbe9aa58d320b85473d0999d62d2e33bb6bf53627fc41f2c67ec318dfab70d2063799f4cd9eeadc015b66fbb211ee3ef765492421a718608  xend.confd
1bef9f2905a4e62f4f2d22c0b8ae9779d9b9ab7a7dbd37a13afa6f21102c7b38cae0b2b11ab5637faad20b026e6a69416fd5e9a39f82da6c4c117784f8acbb53  xendomains.initd
7c1e32d07aefbde1904ca2d98f9a415543cea7ab8e039b05e0b111e37e78c07c40b540e439b3656d5840dfd76e35e07cf1d6ddea431163d975b1ddf5ddac50d3  xendomains.confd
ab2105c75cfe01768aecd5bcbb56269d63666e8a44e42b6a83aee87df6c84ee2f9ab249171c21b2e09f8fec2cae8318f6e87d160989398a3e7dd68db8d52c426  xen-consoles.logrotate
bdbe15c924071cdc2d0f23e53ba8e3f837d4b5369bfb218abd3405f9bef25d105269aaf0784baeb69c073a5786b8c82ffdfd414e86874da34293cfdc2c497928  xenqemu.confd
2341a01a000e4badd9dbfd122e7eb3e594982921a80186c0e4174744daf31114c384b42458864d9904ed1b463746efb774efa707ad48280a25ce897ef5ac9e83  xenqemu.initd"