diff options
Diffstat (limited to 'libraries/libvirt/libvirt.SlackBuild')
-rw-r--r-- | libraries/libvirt/libvirt.SlackBuild | 60 |
1 files changed, 58 insertions, 2 deletions
diff --git a/libraries/libvirt/libvirt.SlackBuild b/libraries/libvirt/libvirt.SlackBuild index ce7342dabba33..965edb9f9540a 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 |