aboutsummaryrefslogtreecommitdiffstats
path: root/main/libbytesize
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-05-02 16:28:48 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2019-05-27 18:23:11 +0000
commitcea660389b0d19f5ca02cfe0320299e0432b52a7 (patch)
tree3ca5391bed70a83259cf9f10a708259665025393 /main/libbytesize
parent390d2ae0c43393898cf6407fca34174e8450a88a (diff)
downloadaports-cea660389b0d19f5ca02cfe0320299e0432b52a7.tar.bz2
aports-cea660389b0d19f5ca02cfe0320299e0432b52a7.tar.xz
main/libbytesize: move from testing
It's required for libblockdev -> udisks2
Diffstat (limited to 'main/libbytesize')
-rw-r--r--main/libbytesize/APKBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/main/libbytesize/APKBUILD b/main/libbytesize/APKBUILD
new file mode 100644
index 0000000000..ac4469d8f9
--- /dev/null
+++ b/main/libbytesize/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
+# Contributor: André Klitzing <aklitzing@gmail.com>
+# Maintainer: André Klitzing <aklitzing@gmail.com>
+pkgname=libbytesize
+pkgver=2.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="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() {
+ 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
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+_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"