# Contributor: William Pitcock # Contributor: Roger Pau Monne # Maintainer: William Pitcock pkgname=xen pkgver=4.3.3 pkgrel=0 pkgdesc="Xen hypervisor" url="http://www.xen.org/" arch="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 curl-dev libaio-dev lzo-dev xz-dev util-linux-dev e2fsprogs-dev" makedepends="$depends_dev autoconf automake libtool" 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 librt.patch qemu-xen_paths.patch docs-Fix-generating-qemu-doc.html-with-texinfo-5.patch xsa41.patch xsa41b.patch xsa41c.patch xsa97-hap-4_3.patch xsa108.patch fix-pod2man-choking.patch qemu-xen-websocket.patch qemu-xen-tls-websockets.patch qemu-coroutine-gthread.patch qemu-xen-websocket-plain-hack.patch qemu-xen-vnc-robustness.patch hotplug-vif-vtrill.patch 0001-ipxe-dont-clobber-ebp.patch init-xenstore-domain.patch musl-support.patch musl-hvmloader-fix-stdint.patch stdint_local.h elf_local.h 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 # install our stdint_local.h and elf_local.h install "$srcdir"/stdint_local.h "$srcdir"/elf_local.h \ "$_builddir"/tools/firmware/ || return 1 # remove all -Werror msg "Eradicating -Werror..." find . -name '*.mk' -o -name 'Make*' | xargs sed -i -e 's/-Werror//g' \ || return 1 msg "Updating config.sub..." update_config_sub || return 1 msg "Autoreconf..." autoreconf || return 1 unset CFLAGS unset LDFLAGS } # 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() { cd "$_builddir" msg "Running configure..." ./configure --prefix=/usr \ --build=$CBUILD \ --host=$CHOST \ || return 1 } build_hypervisor() { munge_cflags msg "Building hypervisor..." make xen || return 1 } build_tools() { munge_cflags msg "Building tools..." make tools || return 1 } build_docs() { munge_cflags msg "Building documentation..." make docs || return 1 } build_stubdom() { munge_cflags msg "Building stub domains..." make stubdom || return 1 } build() { cd "$_builddir" configure || return 1 build_hypervisor || return 1 build_tools || return 1 build_docs || return 1 build_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" install="xen-xend.post-install xen-xend.post-upgrade" 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="1b4438a50d8875700ac2c7e1ffbcd91b xen-4.3.3.tar.gz 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 8b0feffc89e3f34d835d60ad62688b30 xsa97-hap-4_3.patch 1f66f6c52941309c825f60e1bf144987 xsa108.patch 4c5455d1adc09752a835e241097fbc39 fix-pod2man-choking.patch a4097e06a7e000ed00f4607db014d277 qemu-xen-websocket.patch 35bdea1d4e3ae2565edc7e40906efdd5 qemu-xen-tls-websockets.patch 9cf9b155dfa6cd473554aa0f25181c1c qemu-coroutine-gthread.patch f8ea5786b0a6157b9cb3e67e323b592c qemu-xen-websocket-plain-hack.patch 066acc4af962c57e2f6cc0286bfdc270 qemu-xen-vnc-robustness.patch e449bb3359b490804ffc7b0ae08d62a0 hotplug-vif-vtrill.patch 229539a822e14a6a62babffd71ecfbf3 0001-ipxe-dont-clobber-ebp.patch 08a30d56902b660f5102a5c208e545c9 init-xenstore-domain.patch f7aa282a27f270a923f229f2040cd7b5 musl-support.patch 2b1afbf120b69c5d14c846178378116b musl-hvmloader-fix-stdint.patch c9313a790faa727205627a1657b9bf06 stdint_local.h c13f954d041a6fa78d0d241ad1780c0b elf_local.h bd6d294c47d4285e770aefa6e63eeea2 xenstored.initd d86504e12f05deca6b3eeeb90157160e xenstored.confd ed262f15fb880badb53575539468646c xenconsoled.initd ec2252c72050d7d5870a3a629b873ba6 xenconsoled.confd 1803ddf6877bdf254082365389a4efa9 xend.initd 9261ad0f285836c1b0ea07f306e4586e xend.confd 10f3ab45a6d0a241b9c7e9757ad59ad8 xendomains.initd 2c80e442cec6dd2a025b61852641834d xendomains.confd 9df68ac65dc3f372f5d61183abdc83ff xen-consoles.logrotate 6a2f777c16678d84039acf670d86fff6 xenqemu.confd f9afbf39e2b5a7d9dde60ebbd249ea7d xenqemu.initd" sha256sums="59eb0e1c4a1f66965fe56dcf27cdb5872bf7e0585b7f2e60bd7967ec7f744ebf xen-4.3.3.tar.gz 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 cfab6521221a5058a0dfbb6d59c3c4cd0e7f4239bb6cbee2723de22c33caafda xsa97-hap-4_3.patch cf7ecf4b4680c09e8b1f03980d8350a0e1e7eb03060031788f972e0d4d47203e xsa108.patch fcb5b9ff0bc4b4d39fed9b88891491b91628aa449914cfea321abe5da24c1da2 fix-pod2man-choking.patch e9f6c482fc449e0b540657a8988ad31f2e680b8933e50e6486687a52f6a9ed04 qemu-xen-websocket.patch 435dd428d83acdfde58888532a1cece1e9075b2a2460fe3f6cd33c7d400f2715 qemu-xen-tls-websockets.patch 7477c5acfc756f6498858e4a3eb250b3db84ee491a9d4ae38dddbc27275a370c qemu-coroutine-gthread.patch 6c4c184462d47e7fd00e8d8f6bf12b33f6cf486f00415c1934ecf6c2b62f69c1 qemu-xen-websocket-plain-hack.patch f34590761b627d69d2033c1350f2403e9d572b2172e852e3b30e7630bc009a9f qemu-xen-vnc-robustness.patch dd1e784bc455eb62cb85b3fa24bfc34f575ceaab9597ef6a2f1ee7ff7b3cae0a hotplug-vif-vtrill.patch 751ef06569de66578b8713dc170976832b0671ac2696f32eb9ad69d60332d594 0001-ipxe-dont-clobber-ebp.patch 0204d69804e83864cd6b2122f51b9c1940588158a35c159a7ef0c3b8fb0af4cb init-xenstore-domain.patch 2513ab530c80b32bd7fe4d35a5b1ecbda14c8e093e556e040a68226796e63791 musl-support.patch 09b9feb9ea6f9c1bda5cc1672f42e8fc5186dc9dd5561f28c6f1904d80aca7fa musl-hvmloader-fix-stdint.patch 6b4ad2a9fdb3e23b06c8c1961a46b06c15a46471fe6fb13cdc269da37466f334 stdint_local.h 7f1ed2db24d8eba87a08eea0601a9ab339209906fdfa74c8c03564a1a6e6471e elf_local.h 2f3fa767e57c18433d196bb2aecfb575224183193f4acece85971683a9a5411b xenstored.initd 991bb7c9da02941556e29714bd96b26e39e57e0a5b514eadd78d9bfa3fa5a9dc xenstored.confd 93bea2eb90ea1b4628854c8141dd351bbd1fbc5959b12795447ea933ad025f01 xenconsoled.initd 2a74be03eb74f6013242a4a5d721df6cb9b959b43c405de1e32813f52d749060 xenconsoled.confd a50a4485e84bcc098ad021556cd2aa7947c228f0a546ab942e880787ced57be3 xend.initd 7f7a96349084474b76af98426387fec12a0684f505d1691091ac3d2556bde2de xend.confd c304a6353ba1daebd0547bb57e9ffffc2c90465d6abe7469cfdacf61c5108eab xendomains.initd 2360b1fa1f102ac1b1a6cd0d161a94d13139dfc21d9a2227d35d557b4f04a63e xendomains.confd 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19 xen-consoles.logrotate 4cfcddcade5d055422ab4543e8caa6e5c5eee7625c41880a9000b7a87c7c424e xenqemu.confd bf17808a79c57a9efc38b9f14cc87f556b2bb7ecfdec5763d9cf686255a47fce xenqemu.initd" sha512sums="cd9b7199d2859a856c719b75ee50a059c480f7493bbc493bcc3701d20321bd6d83c6fe1dd58e7b37695639bccf15e6420fb52f7e699586e7750ea665e99f82fc xen-4.3.3.tar.gz 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 acfd1058632d42bef061a9586565d184c0010d74870a25bc9b0a0bf40dda8abfd882056b8340dec45355efd9326d05f92a933f5d5c1c58e97597a8e88c61c639 xsa97-hap-4_3.patch f511a13ee4223ea2fa9d109fea1802b462f178d3be7de630aeba6eb40ef5d17c7db9d3b99ea414c5794d92d181a60c0bd2061f51987c6deb3a9071f5626fd049 xsa108.patch 2e95ad43bb66f928fe1e8caf474a3211571f75f79ea32aaa3eddb3aed9963444bd131006b67e682395af0d79118b2634bf808404693b813a94662d2a9d665ac2 fix-pod2man-choking.patch 45f1da45f3ff937d0a626e37c130d76f5b97f49a57ddeb11ef2a8e850c04c32c819a3dfcef501eb3784db5fe7b39c88230063e56aa6e5197fd9c7b7d424fff77 qemu-xen-websocket.patch 11eaccc346440ff285552f204d491e3b31bda1665c3219ecae3061b5d55db9dec885af0c031fa19c67e87bbe238002b1911bbd5bfea2f2ba0d61e6b3d0c952c9 qemu-xen-tls-websockets.patch 8b8df4f57ab725f54cfe44fb6b8d271ee22e94873f168e452293dd53955854b171b8311209133e5d825f9ce985219818803182b3451708a3452bc699b7b1dda1 qemu-coroutine-gthread.patch 692e29205fa3d0a6e4d1be69a242d55c44a1fee26c594e6e46d8809339f93dcdc31c0735723a46f63ae0a727741bdc8a899bb1ce9103a2cd701b236f63a17fa2 qemu-xen-websocket-plain-hack.patch a52aa303dd3d9abae3ddb3af788b1f1f7a6bd9eb0c13f67f0995190238f7638f7909ea7d7bf7d778c64edbb6bdae87a5d5654e12440abded083e4818ff204b47 qemu-xen-vnc-robustness.patch f095ea373f36381491ad36f0662fb4f53665031973721256b23166e596318581da7cbb0146d0beb2446729adfdb321e01468e377793f6563a67d68b8b0f7ffe3 hotplug-vif-vtrill.patch c3a1b270347a99c8ce21118010ad8d817b4462a31cc5c75352faa7086969ef0646f3f4d0922d85c2e504cff091ce7e9fe79c92f983c2ba4af2fae85c52c3835a 0001-ipxe-dont-clobber-ebp.patch 475eb800660dc928914b8c15562f18f24d6e7a76f4cc7bed9249ce52d444c29aec1aef843eb37ade0c7c9616195bbbc1606a3195e25b2bd4b6a1d1af5f69256e init-xenstore-domain.patch 3d6b180d631c6d7baeff9976503cf6b16f24b0e99c25b2b2a5153db85f41600159d10d4f47eda0e33e1f41197dc9d6d935cf33f31ffbcf429d35002e0affdb2d musl-support.patch 4acf7e360ae94f7c0f7541fcd106389402f215c28bd18ed1fd4be9d4b9d12550e17152f7e19b19793e16d4ee0e131ec3e3ce6011b42bc7683fcebdb4051c6109 musl-hvmloader-fix-stdint.patch 9dcb481c5b83c7df23e87be717d8a9234014f26a0f80893e125fe8110e2923562d95162d18ff64c08b5782cd7c085f90378a9e0802b3995c077c8ba32bbb669f stdint_local.h 853467a2d055c5bfbdc7bdca175a334241be44a7c5ac3c0a84a4bc5463b5c070b66d37e2a557429ef860727a6b7350683af758cc2494d85b6be4d883143a2c0d elf_local.h 7a21f7cc05d5593a96ca5254ffed55919de97d7a1fe0d5b360876a5c0811416c9f985682c5b70325d99166ebabd149d0d061ea58da4283b2b0d2aab0d75e5368 xenstored.initd 093f7fbd43faf0a16a226486a0776bade5dc1681d281c5946a3191c32d74f9699c6bf5d0ab8de9d1195a2461165d1660788e92a3156c9b3c7054d7b2d52d7ff0 xenstored.confd 12f981b2459c65d66e67ec0b32d0d19b95a029bc54c2a79138cfe488d3524a22e51860f755abfe25ddcdaf1b27f2ded59b6e350b9d5f8791193d00e2d3673137 xenconsoled.initd 30df69cc38d0bed26bc4d6e08a2b62cbdc654d5f663009a05cb3b83b3e3dc5e206362d3fd59abbb753ceb8d6d79eaa6e15d079bb8f4f35dc74667103faf4e85d xenconsoled.confd 55766e22d9374b404b96fba9d30aee49bee6c95fabce9c3d2aed1faba04c1573ecd75fe49e27ce1527ecf9064f53ccc15e4c69a1aa4ea3daa44828f38d687d85 xend.initd 39b38156f0a8498dbbe9aa58d320b85473d0999d62d2e33bb6bf53627fc41f2c67ec318dfab70d2063799f4cd9eeadc015b66fbb211ee3ef765492421a718608 xend.confd d1008996e486bc8243abd0c3f50755da0f414009ba81eebe943514e29c7e2440af3e4aa0bc46258f05a502a7876783e834756b02dc72161be1ab3808e6abe67b xendomains.initd 7c1e32d07aefbde1904ca2d98f9a415543cea7ab8e039b05e0b111e37e78c07c40b540e439b3656d5840dfd76e35e07cf1d6ddea431163d975b1ddf5ddac50d3 xendomains.confd ab2105c75cfe01768aecd5bcbb56269d63666e8a44e42b6a83aee87df6c84ee2f9ab249171c21b2e09f8fec2cae8318f6e87d160989398a3e7dd68db8d52c426 xen-consoles.logrotate bdbe15c924071cdc2d0f23e53ba8e3f837d4b5369bfb218abd3405f9bef25d105269aaf0784baeb69c073a5786b8c82ffdfd414e86874da34293cfdc2c497928 xenqemu.confd 2341a01a000e4badd9dbfd122e7eb3e594982921a80186c0e4174744daf31114c384b42458864d9904ed1b463746efb774efa707ad48280a25ce897ef5ac9e83 xenqemu.initd"