summaryrefslogtreecommitdiff
path: root/libraries/libvirt/libvirt.SlackBuild
diff options
context:
space:
mode:
authorponce <matteo.bernardini@gmail.com>2012-07-30 13:21:07 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-08-21 08:55:34 -0500
commitbc9e450e41d394a8dfc88fd74cda3bee7f0b11b5 (patch)
tree7a96daf8a5b566715bf40fda9e8e8425a26a83a7 /libraries/libvirt/libvirt.SlackBuild
parenta951d7375f4587879607e5ec6c1beda13478a3d0 (diff)
downloadslackbuilds-bc9e450e41d394a8dfc88fd74cda3bee7f0b11b5.tar.gz
libraries/libvirt: Updated for version 0.9.13.
This commit also adds some configure options parameters (disabled debug too), some details in the README, and an rc.libvirt init script... Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'libraries/libvirt/libvirt.SlackBuild')
-rw-r--r--libraries/libvirt/libvirt.SlackBuild60
1 files changed, 58 insertions, 2 deletions
diff --git a/libraries/libvirt/libvirt.SlackBuild b/libraries/libvirt/libvirt.SlackBuild
index ce7342dabb..965edb9f95 100644
--- a/libraries/libvirt/libvirt.SlackBuild
+++ b/libraries/libvirt/libvirt.SlackBuild
@@ -4,7 +4,7 @@
# Written by Michal Bialozor <bialyy@o2.pl>
PRGNAM=libvirt
-VERSION=0.9.12
+VERSION=0.9.13
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -35,6 +35,40 @@ else
LIBDIRSUFFIX=""
fi
+PYTHONSITEPKG=$(python -c "import sys, os; print os.path.join('/usr/lib${LIBDIRSUFFIX}', 'python%s' % sys.version[:3], 'site-packages')")
+
+VIRTGROUP=${VIRTGROUP:-users}
+
+if [ "${OPENVZ:-no}" = "no" ]; then
+ enable_openvz="--without-openvz"
+else
+ enable_openvz="--with-openvz"
+fi
+
+if [ "${XEN:-no}" = "no" ]; then
+ enable_xen="--without-xen"
+else
+ enable_xen="--with-xen"
+fi
+
+if [ "${VMWARE:-no}" = "no" ]; then
+ enable_vmware="--without-vmware"
+else
+ enable_vmware="--with-vmware"
+fi
+
+if [ "${ESX:-no}" = "no" ]; then
+ enable_esx="--without-esx"
+else
+ enable_esx="--with-esx"
+fi
+
+if [ "${VBOX:-no}" = "no" ]; then
+ enable_vbox="--without-vbox"
+else
+ enable_vbox="--with-vbox"
+fi
+
set -e
rm -rf $PKG
@@ -58,7 +92,16 @@ CFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-static=no \
--enable-shared=yes \
- --without-xen \
+ --with-yajl \
+ --with-python=/usr \
+ --with-qemu-group=$VIRTGROUP \
+ $enable_xen \
+ $enable_openvz \
+ $enable_vmware \
+ $enable_esx \
+ $enable_vbox \
+ --with-init-script=none \
+ --without-hal \
--build=$ARCH-slackware-linux
make \
@@ -126,6 +169,19 @@ mv $PKG/etc/sasl2/libvirt.conf \
mv $PKG/etc/sysctl.d/libvirtd \
$PKG/etc/sysctl.d/libvirtd.new
+# add an rc.libvirt to start the daemon
+install -D -m 0755 $CWD/rc.libvirt $PKG/etc/rc.d/rc.libvirt.new
+
+# by default we got no certs
+sed -i -e 's|\#listen_tls\ =\ 0|listen_tls = 0|' $PKG/etc/libvirt/libvirtd.conf.new
+
+# we use $VIRTGROUP as our virtualization group
+sed -i -e "s|\#group\ =\ \"root\"|group = \"$VIRTGROUP\"|" $PKG/etc/libvirt/qemu.conf.new
+sed -i -e "s|\#unix_sock_group\ =\ \"libvirt\"|unix_sock_group = \"$VIRTGROUP\"|" \
+ $PKG/etc/libvirt/libvirtd.conf.new
+sed -i -e "s|\#unix_sock_rw_perms\ =\ \"0770\"|unix_sock_rw_perms = \"0770\"|" \
+ $PKG/etc/libvirt/libvirtd.conf.new
+
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done