void-packages/srcpkgs/libvirt/template

102 lines
3.4 KiB
Plaintext

# Template file for 'libvirt'
pkgname=libvirt
version=1.2.9
revision=1
build_style=gnu-configure
build_options="systemd"
configure_args="--without-hal --with-storage-lvm --with-qemu-user=nobody
--disable-static $(vopt_if systemd '--with-init-script=systemd')
--with-qemu-group=nogroup --without-netcf --with-interface --sbindir=/usr/sbin
ac_cv_path_MOUNT=/bin/mount ac_cv_path_UMOUNT=/bin/umount
ac_cv_path_MKFS=/sbin/mkfs ac_cv_path_SHOWMOUNT=/sbin/showmount"
short_desc="The virtualization API for controlling virtualization engines"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://libvirt.org"
license="LGPL-2.1"
distfiles="http://libvirt.org/sources/$pkgname-$version.tar.gz"
checksum=95931a5a52f451b9ab73d6a5ae11a5740e1ba69a66520c2a0cffc6068a7e8fc4
hostmakedepends="perl pkg-config lvm2 parted"
makedepends="readline-devel>=6.3 libcap-ng-devel libnl3-devel attr-devel
gnutls-devel>=3.1.5 libsasl-devel libcurl-devel libpcap-devel libxml2-devel
libparted-devel device-mapper-devel dbus-devel libudev-devel libblkid-devel
libpciaccess-devel avahi-libs-devel polkit-devel yajl-devel
python-devel libssh2-devel libcap-ng-devel fuse-devel"
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
configure_args+=" --with-xen"
makedepends+=" libnuma-devel xen-devel"
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
configure_args+=" --without-xen"
makedepends+=" libnuma-devel"
else
configure_args+=" --without-xen"
fi
conf_files="
/etc/libvirt/libvirt.conf
/etc/libvirt/libvirtd.conf
/etc/libvirt/lxc.conf
/etc/libvirt/nwfilter
/etc/libvirt/nwfilter/allow-arp.xml
/etc/libvirt/nwfilter/allow-dhcp-server.xml
/etc/libvirt/nwfilter/allow-dhcp.xml
/etc/libvirt/nwfilter/allow-incoming-ipv4.xml
/etc/libvirt/nwfilter/allow-ipv4.xml
/etc/libvirt/nwfilter/clean-traffic.xml
/etc/libvirt/nwfilter/no-arp-ip-spoofing.xml
/etc/libvirt/nwfilter/no-arp-mac-spoofing.xml
/etc/libvirt/nwfilter/no-arp-spoofing.xml
/etc/libvirt/nwfilter/no-ip-multicast.xml
/etc/libvirt/nwfilter/no-ip-spoofing.xml
/etc/libvirt/nwfilter/no-mac-broadcast.xml
/etc/libvirt/nwfilter/no-mac-spoofing.xml
/etc/libvirt/nwfilter/no-other-l2-traffic.xml
/etc/libvirt/nwfilter/no-other-rarp-traffic.xml
/etc/libvirt/nwfilter/qemu-announce-self-rarp.xml
/etc/libvirt/nwfilter/qemu-announce-self.xml
/etc/libvirt/qemu-lockd.conf
/etc/libvirt/qemu.conf
/etc/libvirt/qemu/networks/autostart/default.xml
/etc/libvirt/qemu/networks/default.xml
/etc/libvirt/virt-login-shell.conf
/etc/libvirt/virtlockd.conf"
make_dirs="
/var/lib/libvirt/uml 0755 root root
/var/lib/libvirt/qemu/nvram 0755 root root
/var/lib/libvirt/qemu/channel/target 0755 root root
/var/lib/libvirt/network 0755 root root
/var/lib/libvirt/lxc 0755 root root
/var/lib/libvirt/lockd/files 0755 root root
/var/lib/libvirt/libxl 0755 root root
/var/lib/libvirt/images 0755 root root
/var/lib/libvirt/filesystems 0755 root root
/var/lib/libvirt/dnsmasq 0755 root root
/var/libvirt/boot 0755 root root
/var/cache/libvirt/qemu 0755 root root"
post_install() {
# runit services
vsv libvirtd
vsv virtlockd
rm -rf ${DESTDIR}/etc/sysconfig
# Remove unused stuff.
rm -rf ${DESTDIR}/var/log
# systemd stuff.
if [ "$build_options_systemd" ]; then
vinstall ${FILESDIR}/libvirt.tmpfiles.d 644 usr/lib/tmpfiles.d libvirt.conf
fi
}
libvirt-devel_package() {
depends="libvirt>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove usr/share/gtk-doc
}
}