96 lines
3.0 KiB
Bash
96 lines
3.0 KiB
Bash
# Template file for 'libvirt'
|
|
pkgname=libvirt
|
|
version=6.2.0
|
|
revision=1
|
|
build_wrksrc="build"
|
|
build_style=gnu-configure
|
|
configure_script="../configure"
|
|
configure_args="--without-hal --with-storage-lvm --with-qemu
|
|
--with-qemu-user=libvirt --with-qemu-group=libvirt --without-netcf
|
|
--with-interface --disable-static --with-apparmor --with-secdriver-apparmor
|
|
--with-apparmor-profiles"
|
|
short_desc="Virtualization API for controlling virtualization engines"
|
|
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
|
|
license="LGPL-2.1-or-later"
|
|
homepage="https://libvirt.org"
|
|
changelog="https://libvirt.org/news.html"
|
|
distfiles="https://libvirt.org/sources/${pkgname}-${version}.tar.xz"
|
|
checksum=aec8881f236917c4f8064918df546ed3aacd0bb8a2f312f4d37485721cce0fb1
|
|
|
|
# FIX https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701649
|
|
system_accounts="libvirt"
|
|
libvirt_groups="disk,kvm"
|
|
|
|
hostmakedepends="automake libtool perl pkg-config lvm2 parted gettext-devel
|
|
iptables libxslt docbook-xsl dnsmasq python3 libapparmor-devel python3-docutils
|
|
gettext"
|
|
makedepends="readline-devel libcap-ng-devel libnl3-devel attr-devel
|
|
gnutls-devel libsasl-devel libcurl-devel libpcap-devel libxml2-devel
|
|
libparted-devel device-mapper-devel dbus-devel eudev-libudev-devel libblkid-devel
|
|
libpciaccess-devel avahi-libs-devel polkit-devel yajl-devel jansson-devel
|
|
python3-devel libssh2-devel fuse-devel libtirpc-devel
|
|
libapparmor-devel"
|
|
depends="iptables dnsmasq"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) configure_args+=" --without-xen"; makedepends+=" libnuma-devel";;
|
|
x86_64*) configure_args+=" --with-xen"; makedepends+=" libnuma-devel xen-devel";;
|
|
*) configure_args+=" --without-xen";;
|
|
esac
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/tirpc"
|
|
hostmakedepends+=" rpcsvc-proto"
|
|
;;
|
|
esac
|
|
|
|
conf_files="/etc/libvirt/nwfilter/*.xml /etc/libvirt/qemu/networks/*.xml /etc/libvirt/*.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_extract() {
|
|
mkdir -p build
|
|
}
|
|
|
|
pre_configure() {
|
|
autoreconf -fi ../
|
|
}
|
|
|
|
post_install() {
|
|
# runit services
|
|
vsv libvirtd
|
|
vsv virtlockd
|
|
vsv virtlogd
|
|
|
|
rm -rf ${DESTDIR}/etc/sysconfig
|
|
# Remove unused stuff.
|
|
rm -rf ${DESTDIR}/var/log
|
|
|
|
# workaround for musl not providing an utmpx implementation
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ];
|
|
then
|
|
echo "remember_owner = 0" >> ${DESTDIR}/etc/libvirt/qemu.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/doc
|
|
}
|
|
}
|