aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-libvirt/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-libvirt/APKBUILD')
-rw-r--r--testing/ocaml-libvirt/APKBUILD102
1 files changed, 60 insertions, 42 deletions
diff --git a/testing/ocaml-libvirt/APKBUILD b/testing/ocaml-libvirt/APKBUILD
index 43c4c177eea..644bc4311b3 100644
--- a/testing/ocaml-libvirt/APKBUILD
+++ b/testing/ocaml-libvirt/APKBUILD
@@ -1,67 +1,85 @@
# Contributor: Fernando Casas Schossow <casasfernando@outlook.com>
# Maintainer: Fernando Casas Schossow <casasfernando@outlook.com>
pkgname=ocaml-libvirt
-pkgver=0.6.1.4
-pkgrel=1
+_pkgname=libvirt-ocaml
+pkgver=0.6.1.7
+pkgrel=0
pkgdesc="OCaml binding for libvirt"
-url="http://libvirt.org/ocaml/"
-arch="aarch64 ppc64le x86_64" # restricted by ocaml
-license="LGPL-2.1-or-later-WITH-linking-exception"
-makedepends="ocaml ocaml-ocamldoc ocaml-findlib-dev libvirt-dev perl gawk"
+url="https://libvirt.org/ocaml/"
+arch="all !riscv64 !loongarch64" # ocaml
+license="LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
+makedepends="autoconf automake ocaml ocaml-findlib-dev libvirt-dev perl gawk"
subpackages="$pkgname-dev $pkgname-doc"
-source="https://libvirt.org/sources/ocaml/$pkgname-$pkgver.tar.gz
- 0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch
- 0001-Add-a-binding-for-virDomainCreateXML.patch
- 0001-Suppress-errors-to-stderr-and-use-thread-local-virEr.patch
- 0002-Don-t-bother-checking-return-from-virInitialize.patch
- 0001-Remove-unused-not_supported-function.patch
- 0001-Use-g-warn-error.patch
- 0002-Update-dependencies.patch
- 0003-Add-a-binding-for-virConnectGetAllDomainStats-RHBZ-1.patch
- 0004-examples-Print-more-stats-in-the-get_all_domain_stat.patch
- 0005-Change-binding-of-virConnectGetAllDomainStats-to-ret.patch"
-builddir="$srcdir/$pkgname-$pkgver"
+source="https://gitlab.com/libvirt/libvirt-ocaml/-/archive/v$pkgver/libvirt-ocaml-v$pkgver.tar.gz"
options="!check" # there is no test suite/unit tests
+builddir="$srcdir/$_pkgname-v$pkgver"
+
+# 32-bit archs
+case "$CARCH" in
+ arm*|x86) options="$options textrels" ;;
+esac
prepare() {
default_prepare
- update_config_sub
+ autoreconf -i
}
build() {
- cd "$builddir"
- export OCAMLPARAM="safe-string=0,_"
./configure \
--host=$CHOST \
--build=$CBUILD \
--target=$CTARGET \
--prefix=/usr
- make -C libvirt all
- make opt
-}
-
-check() {
- cd "$builddir"
+ make
}
package() {
- cd "$builddir"
export DESTDIR="$pkgdir"
export OCAMLFIND_DESTDIR="$DESTDIR/usr/lib/ocaml"
mkdir -p "$OCAMLFIND_DESTDIR" "$OCAMLFIND_DESTDIR/stublibs"
- make install-opt
- install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
- install -D -m644 COPYING.LIB "$pkgdir/usr/share/licenses/$pkgname/COPYING.LIB"
+
+ make install
+ install -Dm644 COPYING COPYING.LIB \
+ -t "$pkgdir"/usr/share/licenses/$pkgname/
+}
+
+dev() {
+ default_dev
+
+ cd "$pkgdir"
+
+ local path; find usr/lib/ocaml \( \
+ -name '*.cmt' -o \
+ -name '*.cmti' -o \
+ -name '*.ml' -o \
+ -name '*.mli' \
+ \) | while read -r path
+ do
+ amove "$path"
+ done
+}
+
+prepare_py_provides() {
+ local datadir="${subpkgdir:-$pkgdir}"
+ local pkgbasedir=${pkgbasedir:-"$startdir/pkg"}
+ local controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname}
+
+ options_has "!tracedeps" && return 0
+
+ ocaml4-abuild-find provides \
+ "$datadir"/usr/lib/ocaml \
+ "$controldir" \
+ "$pkgver-r$pkgrel"
+}
+
+scan_python3_dependency() {
+ local controldir="$2" datadir="$3"
+
+ ocaml4-abuild-find requires \
+ "$datadir"/usr/lib/ocaml \
+ "$controldir"
}
-sha512sums="ed081a9b6f1388935e6a2ba0400e15881b3abb81a1079ab7fd88e72392ad29a0fd61550d3d7dc00682f283bc181d298af6519d19c3d15cf077988a3d6281d204 ocaml-libvirt-0.6.1.4.tar.gz
-ca1c6503a121ae392c46a37e4b260041a12b692afb7f2da39396f490020fe11b2284ff6fe110eac6fabd01296adf2aa030f598e7349a0984323f7cd1c9fa67b0 0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch
-6404b398da1b41cd1fef41ce597a3d2b1dee44b636a403a9b730e9cec455c87b4bd4fa35eea869a12698623d4d9d667f5588032bac4938d4114f606fa499a1e0 0001-Add-a-binding-for-virDomainCreateXML.patch
-e59b4127c2244ef6465090ccf6965f8ca4431e543bd4b8772527b0080af30da9834655fce195b61e860676f9f4747d2d22caf38dc0c2ecd102c4933f0a5da668 0001-Suppress-errors-to-stderr-and-use-thread-local-virEr.patch
-7106aa55357b54409ca982ac60ff1243f4210a12fc3db7e6d355a5f317b947abe11d283ffc1c86193e93e6e30bd037f8883079a6dc83da33091adc449a31ddcd 0002-Don-t-bother-checking-return-from-virInitialize.patch
-bbc97d03031ef187230607de4830a3b250b8283d52ec0a60a220d165b4af9fe0deeacf43b00c056b4e090d6cf8f6aae8eb26c72e38cfca95df9e85ce0b72fd40 0001-Remove-unused-not_supported-function.patch
-830d93d7cd1dec1fcf3c0f762c61d056d62589972c26904b3711f9739745ab0125b117aff873abd3ff852c8ad03b3e779891d1420c3f21008915b4eb69d977bf 0001-Use-g-warn-error.patch
-f1dd3862b6c3a5ee04a2d54a885bc0baa053de60cde4ceeb9b70c6de9a8b4bfcac77429bf64400973a2d867bab542ca728438b30f07ac756cd362db454d684c0 0002-Update-dependencies.patch
-2b9ce951486ada9d700c4560e0d5c069d2b58c70d71ac70ee95900246a53ad6c5b2557fe82fc45b3f0fcdf7a966c2e1f442cc391758b0c9c6f7e755206e5e2c7 0003-Add-a-binding-for-virConnectGetAllDomainStats-RHBZ-1.patch
-2a2f48cd744d5b697ffded415993aa21aea5b3335abb6dd1d2ae9efeb443ead362b9b6988764a0405e96f054d949b2927c0a7316dcb0e41e02b19379a40b8471 0004-examples-Print-more-stats-in-the-get_all_domain_stat.patch
-abfcac22d22be5e2b552f2443244d62663d055d3eb9fd9ee9e82bcf21667d1a868cecc2bc5eac25097e9faca2ae20bd4ad6c0bb81eb072fa581ffbcd7ec3779b 0005-Change-binding-of-virConnectGetAllDomainStats-to-ret.patch"
+sha512sums="
+065008709b653f52e119665a5fbe4bedeb1dceb430b2d3ce022d4f9d685e168860145d40f6ae2be4d0715da5c0815029c9de49d370c73cd54d0e83846dc6a785 libvirt-ocaml-v0.6.1.7.tar.gz
+"