2013-07-21 22:53:33 +08:00
|
|
|
# maintainer inkane@chara-project.org
|
|
|
|
# contributor abveritas@chakra-project.org
|
2012-05-25 07:18:52 +08:00
|
|
|
|
|
|
|
pkgname=libvirt
|
2014-06-30 05:48:41 +08:00
|
|
|
pkgver=1.2.5
|
2013-07-21 22:53:33 +08:00
|
|
|
pkgrel=1
|
2012-05-25 07:18:52 +08:00
|
|
|
pkgdesc="API for controlling virtualization engines (openvz,kvm,qemu,virtualbox,xen,etc)"
|
2012-12-18 09:41:06 +08:00
|
|
|
arch=('x86_64')
|
2012-05-25 07:18:52 +08:00
|
|
|
url="http://libvirt.org/"
|
|
|
|
license=('LGPL')
|
|
|
|
depends=('e2fsprogs' 'gnutls' 'iptables' 'libxml2' 'parted' 'polkit' 'python2'
|
2013-03-27 00:21:30 +08:00
|
|
|
'avahi' 'yajl' 'libpciaccess' 'systemd' 'dbus-core' 'libxau' 'libxdmcp' 'libpcap'
|
2012-05-25 07:18:52 +08:00
|
|
|
'curl' 'libsasl' 'libgcrypt' 'libgpg-error' 'openssl' 'libxcb' 'gcc-libs'
|
|
|
|
'iproute2' 'netcf' 'libnl')
|
2013-07-21 22:53:33 +08:00
|
|
|
makedepends=('pkgconfig' 'lvm2' 'linux-api-headers' 'audit' )
|
2012-05-25 07:18:52 +08:00
|
|
|
optdepends=('bridge-utils: for briged networking (default)'
|
|
|
|
'openbsd-netcat: for remote management over ssh'
|
|
|
|
'qemu-kvm'
|
|
|
|
'dmidecode')
|
2014-06-30 05:48:41 +08:00
|
|
|
options=('emptydirs')
|
2012-05-25 07:18:52 +08:00
|
|
|
backup=('etc/conf.d/libvirtd'
|
|
|
|
'etc/conf.d/libvirtd-guests'
|
|
|
|
'etc/libvirt/libvirtd.conf'
|
|
|
|
'etc/libvirt/libvirt.conf'
|
2014-06-30 05:48:41 +08:00
|
|
|
'etc/libvirt/lxc.conf'
|
2012-05-25 07:18:52 +08:00
|
|
|
'etc/libvirt/qemu.conf'
|
2014-06-30 05:48:41 +08:00
|
|
|
'etc/logrotate.d/libvirtd'
|
|
|
|
'etc/logrotate.d/libvirtd.lxc'
|
|
|
|
'etc/logrotate.d/libvirtd.qemu'
|
|
|
|
'etc/logrotate.d/libvirtd.uml'
|
2012-05-25 07:18:52 +08:00
|
|
|
'etc/sasl2/libvirt.conf')
|
|
|
|
install="libvirt.install"
|
|
|
|
source=("http://libvirt.org/sources/$pkgname-$pkgver.tar.gz"
|
2012-12-18 09:41:06 +08:00
|
|
|
'libvirtd.conf.d'
|
|
|
|
'libvirtd-guests.conf.d'
|
2014-06-30 05:48:41 +08:00
|
|
|
'libvirt.tmpfiles.d')
|
|
|
|
md5sums=('787960669a40181fd381a87a318c0660'
|
2012-05-25 07:18:52 +08:00
|
|
|
'3ed0e24f5b5e25bf553f5427d64915e6'
|
|
|
|
'bc2971dacdbac967fc3474e50affc345'
|
2013-12-04 18:10:44 +08:00
|
|
|
'8d98e62915785686b0b6c8c070628392')
|
2012-05-25 07:18:52 +08:00
|
|
|
|
2014-06-30 05:48:41 +08:00
|
|
|
prepare() {
|
|
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
|
|
|
|
for file in $(find . -name '*.py' -print); do
|
|
|
|
sed -i 's_#!.*/usr/bin/python_#!/usr/bin/python2_' $file
|
|
|
|
sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
|
|
|
|
done
|
|
|
|
|
|
|
|
sed -i 's|/sysconfig/|/conf.d/|g' \
|
|
|
|
daemon/libvirtd.service.in \
|
|
|
|
tools/{libvirt-guests.service,libvirt-guests.sh,virt-pki-validate}.in \
|
|
|
|
src/locking/virtlockd.service.in
|
|
|
|
sed -i 's|@sbindir@|/usr/bin|g' src/locking/virtlockd.service.in
|
|
|
|
sed -i 's|#group =.*|group="kvm"|' src/qemu/qemu.conf
|
|
|
|
sed -i 's|/usr/libexec/qemu-bridge-helper|/usr/lib/qemu/qemu-bridge-helper|g' \
|
|
|
|
src/qemu/qemu{.conf,_conf.c} \
|
|
|
|
src/qemu/test_libvirtd_qemu.aug.in
|
|
|
|
}
|
|
|
|
|
2012-05-25 07:18:52 +08:00
|
|
|
build() {
|
|
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
|
2014-06-30 05:48:41 +08:00
|
|
|
export PYTHON=`which python2`
|
2012-05-25 07:18:52 +08:00
|
|
|
export LDFLAGS=-lX11
|
2013-07-21 22:53:33 +08:00
|
|
|
export RADVD=/usr/bin/radvd
|
|
|
|
[ -f Makefile ] || ./configure --prefix=/usr --libexec=/usr/lib/"$pkgname" --sbindir=/usr/bin \
|
2012-12-18 09:41:06 +08:00
|
|
|
--with-storage-lvm --without-xen --with-udev --without-hal --disable-static \
|
2013-07-21 22:53:33 +08:00
|
|
|
--with-init-script=systemd --with-audit \
|
|
|
|
--with-qemu-user=nobody --with-qemu-group=nobody \
|
2014-06-30 05:48:41 +08:00
|
|
|
--without-netcf --with-interface --with-lxc
|
2013-07-21 22:53:33 +08:00
|
|
|
make
|
2012-05-25 07:18:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
|
|
|
|
install -D -m644 "$srcdir"/libvirtd.conf.d "$pkgdir"/etc/conf.d/libvirtd
|
|
|
|
install -D -m644 "$srcdir"/libvirtd-guests.conf.d "$pkgdir"/etc/conf.d/libvirtd-guests
|
2012-12-18 09:41:06 +08:00
|
|
|
install -D -m644 "$srcdir"/libvirt.tmpfiles.d "$pkgdir"/usr/lib/tmpfiles.d/libvirt.conf
|
2012-05-25 07:18:52 +08:00
|
|
|
|
2013-07-21 22:53:33 +08:00
|
|
|
rm -rf \
|
|
|
|
"$pkgdir"/var/run \
|
|
|
|
"$pkgdir"/etc/sysconfig \
|
2014-06-30 05:48:41 +08:00
|
|
|
"$pkgdir"/etc/rc.d
|
2012-05-25 07:18:52 +08:00
|
|
|
}
|
2013-12-04 18:10:44 +08:00
|
|
|
|