aboutsummaryrefslogtreecommitdiffstats
path: root/main/libvirt/APKBUILD
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2012-10-04 09:56:09 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2012-10-04 09:56:29 +0000
commit403b4dfb373e99f9fe5bae9ab5a32baa613cb306 (patch)
tree8e6963cdbb70f2376a1cd6478f913ec467c6323c /main/libvirt/APKBUILD
parentb667ca51aa608d3dabfe91c678f1415140d9870c (diff)
downloadaports-403b4dfb373e99f9fe5bae9ab5a32baa613cb306.tar.gz
aports-403b4dfb373e99f9fe5bae9ab5a32baa613cb306.tar.bz2
aports-403b4dfb373e99f9fe5bae9ab5a32baa613cb306.tar.xz
main/libvirt: backport some commits from current git. Split drivers in subpkg. Fixes #1398
Diffstat (limited to 'main/libvirt/APKBUILD')
-rw-r--r--main/libvirt/APKBUILD88
1 files changed, 83 insertions, 5 deletions
diff --git a/main/libvirt/APKBUILD b/main/libvirt/APKBUILD
index 29e644f7b1..b4d8f7a02b 100644
--- a/main/libvirt/APKBUILD
+++ b/main/libvirt/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=libvirt
pkgver=0.10.2
-pkgrel=0
+pkgrel=1
pkgdesc="A virtualization API for several hypervisor and container systems"
url="http://libvirt.org/"
arch="all"
@@ -13,16 +13,24 @@ makedepends="augeas-dev bridge-utils cyrus-sasl-dev device-mapper
lvm2-dev lxc-dev gnutls-dev libgcrypt-dev parted-dev perl pkgconfig
udev-dev xen-dev zlib-dev yajl-dev libpcap-dev curl-dev"
install=
-subpackages="$pkgname-dev $pkgname-doc"
+subpackages="$pkgname-client $pkgname-daemon $pkgname-dev $pkgname-doc $pkgname-lang
+ $pkgname-lxc $pkgname-qemu $pkgname-xen $pkgname-uml"
source="http://libvirt.org/sources/$pkgname-$pkgver.tar.gz
libvirt.confd
- libvirt.initd"
+ libvirt.initd
+ libvirt-0.10.2-legacy-xen-driver.patch
+ libvirt-0.10.2-support-xen-sysctl-v9.patch
+ "
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
- return 0
+ for patch in $(ls ../*.patch)
+ do
+ msg "Applying patch $patch"
+ patch -p1 < ../$patch || return 1
+ done
}
build() {
@@ -46,6 +54,76 @@ package() {
install -D -m755 $srcdir/$pkgname.confd $pkgdir/etc/conf.d/libvirtd
}
+daemon() {
+ cd "$_builddir"
+ pkgdesc="libvirt daemon package"
+ depends="libvirt logrotate"
+ daemon="libvirtd"
+ replaces="libvirt"
+ mkdir -p "$subpkgdir"/etc/$pkgname \
+ "$subpkgdir"/etc/logrotate.d \
+ "$subpkgdir"/usr/sbin
+ # mkdir -p "$subpkgdir"/usr/sbin
+ mv "$pkgdir"/etc/init.d "$subpkgdir"/etc
+ mv "$pkgdir"/etc/conf.d "$subpkgdir"/etc
+ mv "$pkgdir"/etc/$pkgname/$daemon.conf "$subpkgdir"/etc/libvirt/
+ mv "$pkgdir"/usr/sbin/$daemon "$subpkgdir"/usr/sbin/
+ mv "$pkgdir"/etc/logrotate.d/libvirtd "$subpkgdir"/etc/logrotate.d/
+}
+
+client() {
+ cd "$_builddir"
+ pkgdesc="libvirt client package"
+ depends="libvirt"
+ replaces="libvirt"
+ mkdir -p "$subpkgdir"/etc/$pkgname "$subpkgdir"/usr/bin
+ # mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/etc/$pkgname/$pkgname.conf "$subpkgdir"/etc/libvirt/
+ mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/
+}
+
+_mv_driver() {
+ mkdir -p "$subpkgdir"/usr/lib/libvirt/connection-driver \
+ "$subpkgdir"/etc/libvirt "$subpkgdir"/etc/logrotate.d
+ mv "$pkgdir"/usr/lib/libvirt/connection-driver/libvirt_driver_$1.so \
+ "$subpkgdir"/usr/lib/libvirt/connection-driver/
+ if [ "$1" != "xen" ]; then
+ mv "$pkgdir"/etc/logrotate.d/libvirtd.$1 \
+ "$subpkgdir"/etc/logrotate.d/
+ fi
+}
+
+qemu() {
+ pkgdesc="QEMU driver for libvirt"
+ depends="libvirt logrotate"
+ replaces="libvirt"
+ _mv_driver qemu
+ mv "$pkgdir"/etc/libvirt/qemu.conf "$subpkgdir"/etc/libvirt/
+}
+
+xen() {
+ pkgdesc="XEN driver for libvirt"
+ depends="libvirt"
+ replaces="libvirt"
+ _mv_driver xen
+}
+
+lxc() {
+ pkgdesc="lxc driver for libvirt"
+ depends="libvirt logrotate"
+ replaces="libvirt"
+ _mv_driver lxc
+}
+
+uml() {
+ pkgdesc="UML driver for libvirt"
+ depends="libvirt logrotate"
+ replaces="libvirt"
+ _mv_driver uml
+}
+
md5sums="a5e50860d9da238ba270b528411c4a0d libvirt-0.10.2.tar.gz
1c84a7baeafe0a7f4e9d7ae5180311b7 libvirt.confd
-7067215010da2d7282d878ba43070c5d libvirt.initd"
+7067215010da2d7282d878ba43070c5d libvirt.initd
+31c0c6ca4fe85bd1cfc00756ec47ea06 libvirt-0.10.2-legacy-xen-driver.patch
+e259b3e5b7257c9301a36186b748195b libvirt-0.10.2-support-xen-sysctl-v9.patch"