1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/libbytesize/APKBUILD

52 lines
1.4 KiB
Text

# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=libbytesize
pkgver=2.6
pkgrel=0
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/libbytesize-$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="
f6e72b763216c54c08318d090d604791c61cd5a3e683ffbe6e9d01de850661bd4e8a3adeb85c6fd0fb60244e2e128292cbae06c0aa2d1fe9f34104e64af8210e libbytesize-2.6.tar.gz
"