aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libbytesize
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-04-30 00:17:43 -0300
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-10 19:18:49 +0000
commit4760708dc8b99c76e22795ec0a5fe0206350b9a6 (patch)
treee04b8d46ee0df3907cb4a28c7be261e7ebcd0411 /testing/libbytesize
parent16d9d254b29bb73b2a732dfba82ff28ae1509616 (diff)
downloadaports-4760708dc8b99c76e22795ec0a5fe0206350b9a6.tar.gz
aports-4760708dc8b99c76e22795ec0a5fe0206350b9a6.tar.bz2
aports-4760708dc8b99c76e22795ec0a5fe0206350b9a6.tar.xz
testing/libbytesize: modernize
- Add !check - Add libbytesize-tools - Update dependencies to use pcre2 - Add missing py3-six to py-$pkgname Closes GH-7441
Diffstat (limited to 'testing/libbytesize')
-rw-r--r--testing/libbytesize/APKBUILD26
1 files changed, 20 insertions, 6 deletions
diff --git a/testing/libbytesize/APKBUILD b/testing/libbytesize/APKBUILD
index 23261b68dd..ac4469d8f9 100644
--- a/testing/libbytesize/APKBUILD
+++ b/testing/libbytesize/APKBUILD
@@ -1,24 +1,29 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=libbytesize
pkgver=2.0
-pkgrel=0
+pkgrel=1
pkgdesc="Library for working with arbitrary big sizes in bytes"
+options="!check" # Tests require dealing with locales
url="https://github.com/rhinstaller/libbytesize"
arch="all"
license="LGPL-2.1-or-later"
makedepends="gettext-dev gmp-dev mpfr-dev pcre2-dev python3"
-checkdepends="py3-polib"
-options="!check" # ModuleNotFoundError: No module named 'pocketlint'
-subpackages="$pkgname-dev $pkgname-doc $pkgname-lang py-$pkgname:py:noarch"
+checkdepends="bash py3-six"
+subpackages="$pkgname-dev $pkgname-lang py-$pkgname:_py:noarch $pkgname-doc
+ $pkgname-tools:_tools:noarch"
source="https://github.com/storaged-project/libbytesize/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
build() {
- ./configure --prefix=/usr
+ CFLAGS="$CFLAGS -lintl" ./configure --prefix=/usr
make
}
check() {
+ # Disable test that depends on unpackaged pocketlint
+ sed -i 's|canary_tests.sh$||g' tests/Makefile
+
make check
}
@@ -26,11 +31,20 @@ package() {
make DESTDIR="$pkgdir" install
}
-py() {
+_py() {
pkgdesc="Python bindings for $pkgname"
+ depends="python3 py3-six"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}
+_tools() {
+ pkgdesc="Tools for libbytesize"
+ depends="py-$pkgname"
+
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin
+}
+
sha512sums="9d2a18930d0d900262ced4abd5cd358896570eadb06435f1b9aba5484ca530478b65dfb4982e8acf77ca4519a2d8a1dc236d42f5fa1ecbd7461949b282ef44a1 libbytesize-2.0.tar.gz"