Commit cbd5c0c0 authored by Natanael Copa's avatar Natanael Copa

main/libvirt: build static library subpackage and modernize

parent ae2ca35e
......@@ -2,7 +2,7 @@
pkgname=libvirt
pkgver=3.9.0
_ver="${pkgver/_rc/-rc}"
pkgrel=0
pkgrel=1
pkgdesc="A virtualization API for several hypervisor and container systems"
url="http://libvirt.org/"
arch="all"
......@@ -20,7 +20,7 @@ makedepends="augeas-dev bridge-utils cyrus-sasl-dev device-mapper
fuse-dev util-linux libxml2-utils $_daemon_deps $_client_deps
"
install="$pkgname.post-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-client $pkgname-daemon
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-client $pkgname-daemon
$pkgname-lang $pkgname-lxc $pkgname-qemu $pkgname-uml $pkgname-vbox"
source="http://libvirt.org/sources/$pkgname-$pkgver.tar.xz
libvirt.confd
......@@ -56,13 +56,13 @@ build() {
--with-polkit \
--with-storage-fs \
--with-storage-lvm \
|| return 1
make || return 1
--enable-static \
make
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
make DESTDIR="$pkgdir" install
install -D -m755 $srcdir/$pkgname.initd $pkgdir/etc/init.d/libvirtd
install -D -m755 $srcdir/$pkgname.confd $pkgdir/etc/conf.d/libvirtd
install -D -m755 $srcdir/virtlogd.initd $pkgdir/etc/init.d/virtlogd
......@@ -107,7 +107,17 @@ client() {
"$subpkgdir"/usr/lib
mv "$pkgdir"/etc/$pkgname/$pkgname.conf "$subpkgdir"/etc/libvirt/
mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/ || return 1
mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/
}
static() {
pkgdesc="$pkgname static libraries"
mkdir -p "$subpkgdir"/usr/lib
cd "$pkgdir"
for _lib in $(find . -name '*.a'); do
mkdir -p "$subpkgdir"/${_lib%/*}
mv "$_lib" "$subpkgdir"/${_lib%/*}/
done
}
_mv_driver() {
......@@ -130,7 +140,7 @@ _mv_driver() {
for _d in $_drivers; do
find * -name "*$_d[.-]*" -o -name "*$_d" | while read _f; do
mkdir -p "$subpkgdir"/${_f%/*}
mv "$pkgdir"/$_f "$subpkgdir"/$_f || return 1
mv "$pkgdir"/$_f "$subpkgdir"/$_f
done
done
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment