aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libguestfs
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2019-02-26 15:20:29 +0200
committerKevin Daudt <kdaudt@alpinelinux.org>2019-02-28 21:39:48 +0000
commitef4f1174067eb3a903d8ae7d9f8feaabfab98710 (patch)
treebcc18822941c2fd1875080f9f980d1ffd41264ae /testing/libguestfs
parent61cce9c606fd8d21443c6179ad8fe2890082d184 (diff)
downloadaports-ef4f1174067eb3a903d8ae7d9f8feaabfab98710.tar.bz2
aports-ef4f1174067eb3a903d8ae7d9f8feaabfab98710.tar.xz
testing/libguestfs: new aport
Closes: https://bugs.alpinelinux.org/issues/1792 Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Diffstat (limited to 'testing/libguestfs')
-rw-r--r--testing/libguestfs/APKBUILD116
1 files changed, 116 insertions, 0 deletions
diff --git a/testing/libguestfs/APKBUILD b/testing/libguestfs/APKBUILD
new file mode 100644
index 0000000000..97d192c676
--- /dev/null
+++ b/testing/libguestfs/APKBUILD
@@ -0,0 +1,116 @@
+# Maintainer: Fathi Boudra <fathi.boudra@linaro.org>
+pkgname=libguestfs
+pkgver=1.40.2
+pkgrel=0
+pkgdesc="tools for accessing and modifying virtual machine disk images"
+url="http://libguestfs.org/"
+arch="x86_64"
+license="GPL2"
+depends="cdrkit curl gptfdisk qemu-img qemu-system-x86_64"
+makedepends="
+ acl-dev
+ augeas-dev
+ bash
+ bison
+ cdrkit
+ coreutils
+ cpio
+ file-dev
+ flex
+ fuse-dev
+ gawk
+ gettext-dev
+ hivex-dev
+ jansson-dev
+ gperf
+ gptfdisk
+ libcap-dev
+ libconfig-dev
+ libselinux-dev
+ libselinux-utils
+ libtirpc-dev
+ libvirt-dev
+ libxml2-dev
+ libxml2-utils
+ ncurses-dev
+ ocaml
+ ocaml-findlib
+ pcre-dev
+ perl
+ psmisc
+ python3-dev
+ qemu-img
+ qemu-system-x86_64
+ readline-dev
+ xz
+ xz-dev
+"
+install=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang py3-$pkgname:_py"
+source="
+ http://download.libguestfs.org/1.40-stable/$pkgname-$pkgver.tar.gz
+ https://raw.githubusercontent.com/alpinelinux/aports/3.9-stable/main/kbd/error.h
+"
+builddir="$srcdir/$pkgname-$pkgver"
+options="!check charset.alias" # Test suite does not support Alpine Linux at this moment
+
+prepare() {
+ cd "$builddir"
+ # busybox gzip does not support --best
+ sed -i 's/gzip --best/gzip -9/g' test-data/files/*
+ # musl lacks error.h
+ cp -a "$srcdir"/error.h "$builddir"/lib/
+}
+
+build() {
+ cd "$builddir"
+ PYTHON=/usr/bin/python3 ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --sysconfdir=/etc \
+ --disable-probes \
+ --disable-daemon \
+ --disable-appliance \
+ --disable-ocaml \
+ --disable-perl \
+ --disable-ruby \
+ --disable-haskell \
+ --disable-php \
+ --disable-erlang \
+ --disable-lua \
+ --disable-golang \
+ --disable-gobject \
+ --without-java
+ # Building index-parse.c and index-scan.c by hand works around a race
+ # condition in the autotools cruft, where two other more copies of yacc
+ # race with each other, resulting in a corrupted file.
+ make -j1 -C builder index-parse.c
+ make -j1 -C builder index-scan.c
+ make V=1 INSTALLDIRS=vendor LTLIBINTL=-lintl
+}
+
+# FIXME test require supermin to create an appliance or a prebuilt binary appliance
+# check() {
+# cd "$builddir"
+# wget http://download.libguestfs.org/binaries/appliance/appliance-1.38.0.tar.xz -O /tmp/appliance-1.38.0.tar.xz
+# $(cd /tmp && tar xf appliance-1.38.0.tar.xz)
+# export LIBGUESTFS_PATH=/tmp/appliance
+# make quickcheck
+# }
+
+package() {
+ cd "$builddir"
+ make V=1 INSTALLDIRS=vendor DESTDIR="$pkgdir" install
+ make V=1 INSTALLDIRS=vendor DESTDIR="$pkgdir" -C python install
+}
+
+_py() {
+ local _py=${subpkgname##-*}
+ local _pyver=${_py%py}
+ pkgdesc="$pkgname - Python 3 bindings"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/
+}
+
+sha512sums="d288f15d5a70b4b87a4271ea2eb7dc0ec4f48fdb136b8f62003352a069f75573de873e1063763889f410fb1b99951252e9a48dd73bf0233047f21aae43ac6de2 libguestfs-1.40.2.tar.gz
+c66f6b0d8c8b8d285c740bdbe7130dee272ac01cd5e73b35a58cedf1a77fe8d9e062631b804fb58014d8eb9861c8f28aed07bc022ef31662bcc61b5c85a21752 error.h"