APKBUILD 10.6 KB
Newer Older
Ariadne Conill's avatar
Ariadne Conill committed
1
# Contributor: William Pitcock <nenolod@dereferenced.org>
Natanael Copa's avatar
Natanael Copa committed
2
# Contributor: Roger Pau Monne <roger.pau@entel.upc.edu>
Ariadne Conill's avatar
Ariadne Conill committed
3 4
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xen
5
pkgver=4.3.0
William Pitcock's avatar
William Pitcock committed
6
pkgrel=3
Ariadne Conill's avatar
Ariadne Conill committed
7 8
pkgdesc="Xen hypervisor"
url="http://www.xen.org/"
9
arch="x86_64"
Ariadne Conill's avatar
Ariadne Conill committed
10
license="GPL"
Natanael Copa's avatar
Natanael Copa committed
11
depends="syslinux bash screen iproute2 logrotate perl"
Natanael Copa's avatar
Natanael Copa committed
12
depends_dev="openssl-dev python-dev e2fsprogs-dev gettext zlib-dev ncurses-dev
Natanael Copa's avatar
Natanael Copa committed
13
	libiconv-dev dev86 texinfo perl iasl pciutils-dev glib-dev yajl-dev
14
	spice-dev gnutls-dev curl-dev"
Natanael Copa's avatar
Natanael Copa committed
15 16
makedepends="$depends_dev"
install=""
Roger Pau Monne's avatar
Roger Pau Monne committed
17
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-hypervisor $pkgname-xend"
Roger Pau Monne's avatar
Roger Pau Monne committed
18
source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.gz
Natanael Copa's avatar
Natanael Copa committed
19
	librt.patch
Roger Pau Monne's avatar
Roger Pau Monne committed
20
	qemu-xen_paths.patch
21 22
	docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch

Roger Pau Monne's avatar
Roger Pau Monne committed
23
	xsa41.patch
24 25
	xsa41b.patch
	xsa41c.patch
26
	xsa48-4.2.patch
27

Ariadne Conill's avatar
Ariadne Conill committed
28
	fix-pod2man-choking.patch
29

30
	qemu-xen-websocket.patch
31
	qemu-xen-tls-websockets.patch
32
	qemu-coroutine-gthread.patch
33
	qemu-xen-websocket-plain-hack.patch
Ariadne Conill's avatar
Ariadne Conill committed
34

35 36 37 38
	xenstored.initd
	xenstored.confd
	xenconsoled.initd
	xenconsoled.confd
39
	xend.initd
40 41 42 43
	xend.confd
	xendomains.initd
	xendomains.confd
	xen-consoles.logrotate
Roger Pau Monne's avatar
Roger Pau Monne committed
44 45
	xenqemu.confd
	xenqemu.initd
46
	"
Ariadne Conill's avatar
Ariadne Conill committed
47

Carlo Landmeter's avatar
Carlo Landmeter committed
48 49
[ "$ALPINE_LIBC" = "eglibc" ] && arch=

Roger Pau Monne's avatar
Roger Pau Monne committed
50
_builddir="$srcdir"/$pkgname-$pkgver
Ariadne Conill's avatar
Ariadne Conill committed
51
prepare() {
Natanael Copa's avatar
Natanael Copa committed
52
	local i
Ariadne Conill's avatar
Ariadne Conill committed
53
	cd "$_builddir"
Roger Pau Monne's avatar
Roger Pau Monne committed
54

Ariadne Conill's avatar
Ariadne Conill committed
55 56
	for i in $source; do
		case $i in
Natanael Copa's avatar
Natanael Copa committed
57
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
Ariadne Conill's avatar
Ariadne Conill committed
58 59
		esac
	done
Ariadne Conill's avatar
Ariadne Conill committed
60

Natanael Copa's avatar
Natanael Copa committed
61
	# remove all -Werror
Ariadne Conill's avatar
Ariadne Conill committed
62 63
	msg "Eradicating -Werror..."
	find -name '*.mk' -o -name 'Make*' | xargs sed -i -e 's/-Werror//g'
Natanael Copa's avatar
Natanael Copa committed
64

Roger Pau Monne's avatar
Roger Pau Monne committed
65 66
	unset CFLAGS
	unset LDFLAGS	
Ariadne Conill's avatar
Ariadne Conill committed
67 68
}

69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
# Unset CFLAGS and LDFLAGS because the xen build system
# doesn't support them. Instead use .config in xen root
# folder if necessary.
munge_cflags() {
	msg "Munging CFLAGS..."

	unset CFLAGS
	unset LDFLAGS
	unset LANG
	unset LC_ALL
}

# These tasks are added as separate tasks to enable a packager
# to invoke specific tasks like building the hypervisor.  i.e.
#    $ abuild configure build_tools
configure() {
Ariadne Conill's avatar
Ariadne Conill committed
85 86
	cd "$_builddir"

Ariadne Conill's avatar
Ariadne Conill committed
87
	msg "Running configure..."
88
	./configure --prefix=/usr \
89 90 91
		--build=$CBUILD \
		--host=$CHOST \
		|| return 1
92
}
Ariadne Conill's avatar
Ariadne Conill committed
93

94 95
build_hypervisor() {
	munge_cflags
Ariadne Conill's avatar
Ariadne Conill committed
96

Ariadne Conill's avatar
Ariadne Conill committed
97
	msg "Building hypervisor..."
Natanael Copa's avatar
Natanael Copa committed
98
	make xen || return 1
99 100 101 102
}

build_tools() {
	munge_cflags
Ariadne Conill's avatar
Ariadne Conill committed
103 104

	msg "Building tools..."
Natanael Copa's avatar
Natanael Copa committed
105
	make tools || return 1
106 107 108 109
}

build_docs() {
	munge_cflags
Ariadne Conill's avatar
Ariadne Conill committed
110

Roger Pau Monne's avatar
Roger Pau Monne committed
111 112
	msg "Building documentation..."
	make docs || return 1
113 114 115 116
}

build_stubdom() {
	munge_cflags
Roger Pau Monne's avatar
Roger Pau Monne committed
117

Ariadne Conill's avatar
Ariadne Conill committed
118
	msg "Building stub domains..."
Roger Pau Monne's avatar
Roger Pau Monne committed
119
	make stubdom || return 1
Ariadne Conill's avatar
Ariadne Conill committed
120 121
}

122 123 124
build() {
	cd "$_builddir"

125 126 127 128 129
	configure || return 1
	build_hypervisor || return 1
	build_tools || return 1
	build_docs || return 1
	build_stubdom || return 1
130 131
}

Ariadne Conill's avatar
Ariadne Conill committed
132 133 134 135 136 137
package() {
	cd "$_builddir"

	unset CFLAGS
	unset LDFLAGS

Roger Pau Monne's avatar
Roger Pau Monne committed
138 139
	make -j1 DESTDIR="$pkgdir" install-xen install-tools install-docs \
		install-stubdom || return 1
140

141 142 143
	# remove default xencommons
	rm -rf "$pkgdir"/etc/init.d/xencommons

144 145 146 147 148 149 150 151 152 153
	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
Ariadne Conill's avatar
Ariadne Conill committed
154 155
}

156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
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"/
}

Roger Pau Monne's avatar
Roger Pau Monne committed
172 173 174 175 176 177 178 179 180 181 182
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 \;
}

183
md5sums="7b18cfb58f1ac2ce39cf35a1867f0c0a  xen-4.3.0.tar.gz
Roger Pau Monne's avatar
Roger Pau Monne committed
184
2dc5ddf47c53ea168729975046c3c1f9  librt.patch
Roger Pau Monne's avatar
Roger Pau Monne committed
185
1ccde6b36a6f9542a16d998204dc9a22  qemu-xen_paths.patch
186
6dcff640268d514fa9164b4c812cc52d  docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch
Roger Pau Monne's avatar
Roger Pau Monne committed
187
8ad8942000b8a4be4917599cad9209cf  xsa41.patch
188 189
ed7d0399c6ca6aeee479da5d8f807fe0  xsa41b.patch
2f3dd7bdc59d104370066d6582725575  xsa41c.patch
190
b3e3a57d189a4f86c9766eaf3b5207f4  xsa48-4.2.patch
Ariadne Conill's avatar
Ariadne Conill committed
191
4c5455d1adc09752a835e241097fbc39  fix-pod2man-choking.patch
192
a4097e06a7e000ed00f4607db014d277  qemu-xen-websocket.patch
193
35bdea1d4e3ae2565edc7e40906efdd5  qemu-xen-tls-websockets.patch
194
9cf9b155dfa6cd473554aa0f25181c1c  qemu-coroutine-gthread.patch
195
f8ea5786b0a6157b9cb3e67e323b592c  qemu-xen-websocket-plain-hack.patch
Natanael Copa's avatar
Natanael Copa committed
196
a90c36642f0701a8aaa4ebe4dde430f5  xenstored.initd
197 198 199
b017ccdd5e1c27bbf1513e3569d4ff07  xenstored.confd
ed262f15fb880badb53575539468646c  xenconsoled.initd
ec2252c72050d7d5870a3a629b873ba6  xenconsoled.confd
Leonardo Arena's avatar
Leonardo Arena committed
200
1803ddf6877bdf254082365389a4efa9  xend.initd
201
9261ad0f285836c1b0ea07f306e4586e  xend.confd
202
fa8c72b42e0479d521a353386d8543ef  xendomains.initd
203
2c80e442cec6dd2a025b61852641834d  xendomains.confd
Roger Pau Monne's avatar
Roger Pau Monne committed
204 205
9df68ac65dc3f372f5d61183abdc83ff  xen-consoles.logrotate
6a2f777c16678d84039acf670d86fff6  xenqemu.confd
206
f9afbf39e2b5a7d9dde60ebbd249ea7d  xenqemu.initd"
207
sha256sums="e1e9faabe4886e2227aacdbde74410653b233d66642ca1972a860cbec6439961  xen-4.3.0.tar.gz
208 209 210 211 212 213 214
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
dc23077028584e71a08dd0dc9e81552c76744a5ce9d39df5958a95ae9cf3107b  xsa48-4.2.patch
Ariadne Conill's avatar
Ariadne Conill committed
215
fcb5b9ff0bc4b4d39fed9b88891491b91628aa449914cfea321abe5da24c1da2  fix-pod2man-choking.patch
216
e9f6c482fc449e0b540657a8988ad31f2e680b8933e50e6486687a52f6a9ed04  qemu-xen-websocket.patch
217
435dd428d83acdfde58888532a1cece1e9075b2a2460fe3f6cd33c7d400f2715  qemu-xen-tls-websockets.patch
218
7477c5acfc756f6498858e4a3eb250b3db84ee491a9d4ae38dddbc27275a370c  qemu-coroutine-gthread.patch
219
6c4c184462d47e7fd00e8d8f6bf12b33f6cf486f00415c1934ecf6c2b62f69c1  qemu-xen-websocket-plain-hack.patch
Natanael Copa's avatar
Natanael Copa committed
220
868c77d689ae54b7041da169bfaa01868503337d4105a071eb771f4ec5a0543d  xenstored.initd
221 222 223 224 225
ea9171e71ab3d33061979bcf3bb737156192aa4b0be4d1234438ced75b6fdef3  xenstored.confd
93bea2eb90ea1b4628854c8141dd351bbd1fbc5959b12795447ea933ad025f01  xenconsoled.initd
2a74be03eb74f6013242a4a5d721df6cb9b959b43c405de1e32813f52d749060  xenconsoled.confd
a50a4485e84bcc098ad021556cd2aa7947c228f0a546ab942e880787ced57be3  xend.initd
7f7a96349084474b76af98426387fec12a0684f505d1691091ac3d2556bde2de  xend.confd
226
794bed4882cdce8d9ac91d9afc0d5da0f0ac97f38d90c5e965363139a834602d  xendomains.initd
227
2360b1fa1f102ac1b1a6cd0d161a94d13139dfc21d9a2227d35d557b4f04a63e  xendomains.confd
228 229 230
0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19  xen-consoles.logrotate
4cfcddcade5d055422ab4543e8caa6e5c5eee7625c41880a9000b7a87c7c424e  xenqemu.confd
bf17808a79c57a9efc38b9f14cc87f556b2bb7ecfdec5763d9cf686255a47fce  xenqemu.initd"
231
sha512sums="e6b8f64e15e48704ea5cee5585cd6151fe6a5a62bc4670caf0b762c1aa71c9598db236c637ac34c42c92c6e8a5001acdd3d9d4b9305401a26273279358f481d6  xen-4.3.0.tar.gz
232 233 234 235 236 237 238
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
31dd8c62d41cc0a01a79d9b24a5b793f5e2058230808d9c5364c6ff3477ab02f3258f1bbd761d97dc1b97ee120b41524b999eaac77f33b606496fc324b5fa2e4  xsa48-4.2.patch
Ariadne Conill's avatar
Ariadne Conill committed
239
2e95ad43bb66f928fe1e8caf474a3211571f75f79ea32aaa3eddb3aed9963444bd131006b67e682395af0d79118b2634bf808404693b813a94662d2a9d665ac2  fix-pod2man-choking.patch
240
45f1da45f3ff937d0a626e37c130d76f5b97f49a57ddeb11ef2a8e850c04c32c819a3dfcef501eb3784db5fe7b39c88230063e56aa6e5197fd9c7b7d424fff77  qemu-xen-websocket.patch
241
11eaccc346440ff285552f204d491e3b31bda1665c3219ecae3061b5d55db9dec885af0c031fa19c67e87bbe238002b1911bbd5bfea2f2ba0d61e6b3d0c952c9  qemu-xen-tls-websockets.patch
242
8b8df4f57ab725f54cfe44fb6b8d271ee22e94873f168e452293dd53955854b171b8311209133e5d825f9ce985219818803182b3451708a3452bc699b7b1dda1  qemu-coroutine-gthread.patch
243
692e29205fa3d0a6e4d1be69a242d55c44a1fee26c594e6e46d8809339f93dcdc31c0735723a46f63ae0a727741bdc8a899bb1ce9103a2cd701b236f63a17fa2  qemu-xen-websocket-plain-hack.patch
Natanael Copa's avatar
Natanael Copa committed
244
880584e0866b1efcf3b7a934f07072ec84c13c782e3e7a15848d38ba8af50259d46db037dca1e037b15274989f2c22acd1134954dd60c59f4ee693b417d03e0d  xenstored.initd
245 246 247 248 249
100cf4112f401f45c1e4e885a5074698c484b40521262f6268fad286498e95f4c51e746f0e94eb43a590bb8e813a397bb53801ccacebec9541020799d8d70514  xenstored.confd
12f981b2459c65d66e67ec0b32d0d19b95a029bc54c2a79138cfe488d3524a22e51860f755abfe25ddcdaf1b27f2ded59b6e350b9d5f8791193d00e2d3673137  xenconsoled.initd
30df69cc38d0bed26bc4d6e08a2b62cbdc654d5f663009a05cb3b83b3e3dc5e206362d3fd59abbb753ceb8d6d79eaa6e15d079bb8f4f35dc74667103faf4e85d  xenconsoled.confd
55766e22d9374b404b96fba9d30aee49bee6c95fabce9c3d2aed1faba04c1573ecd75fe49e27ce1527ecf9064f53ccc15e4c69a1aa4ea3daa44828f38d687d85  xend.initd
39b38156f0a8498dbbe9aa58d320b85473d0999d62d2e33bb6bf53627fc41f2c67ec318dfab70d2063799f4cd9eeadc015b66fbb211ee3ef765492421a718608  xend.confd
250
1bef9f2905a4e62f4f2d22c0b8ae9779d9b9ab7a7dbd37a13afa6f21102c7b38cae0b2b11ab5637faad20b026e6a69416fd5e9a39f82da6c4c117784f8acbb53  xendomains.initd
251
7c1e32d07aefbde1904ca2d98f9a415543cea7ab8e039b05e0b111e37e78c07c40b540e439b3656d5840dfd76e35e07cf1d6ddea431163d975b1ddf5ddac50d3  xendomains.confd
252 253 254
ab2105c75cfe01768aecd5bcbb56269d63666e8a44e42b6a83aee87df6c84ee2f9ab249171c21b2e09f8fec2cae8318f6e87d160989398a3e7dd68db8d52c426  xen-consoles.logrotate
bdbe15c924071cdc2d0f23e53ba8e3f837d4b5369bfb218abd3405f9bef25d105269aaf0784baeb69c073a5786b8c82ffdfd414e86874da34293cfdc2c497928  xenqemu.confd
2341a01a000e4badd9dbfd122e7eb3e594982921a80186c0e4174744daf31114c384b42458864d9904ed1b463746efb774efa707ad48280a25ce897ef5ac9e83  xenqemu.initd"