diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-07 18:55:53 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-07 19:01:21 +0000 |
commit | cbd5c0c0f015c198a3b5441ce7e49d6e57c92343 (patch) | |
tree | 70380259d96503277e453a27906dd87ddcf88bd8 /main/libvirt | |
parent | ae2ca35eddccfea2f955befcd90df72ff7179e24 (diff) | |
download | aports-cbd5c0c0f015c198a3b5441ce7e49d6e57c92343.tar.bz2 aports-cbd5c0c0f015c198a3b5441ce7e49d6e57c92343.tar.xz |
main/libvirt: build static library subpackage and modernize
Diffstat (limited to 'main/libvirt')
-rw-r--r-- | main/libvirt/APKBUILD | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/main/libvirt/APKBUILD b/main/libvirt/APKBUILD index c682d87032..3d2dc971f7 100644 --- a/main/libvirt/APKBUILD +++ b/main/libvirt/APKBUILD @@ -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 } |