mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-13 03:42:37 +01:00
64 lines
1.5 KiB
Plaintext
64 lines
1.5 KiB
Plaintext
# Contributor: Leo <thinkabit.ukim@gmail.com>
|
|
# Contributor: André Klitzing <aklitzing@gmail.com>
|
|
# Maintainer: André Klitzing <aklitzing@gmail.com>
|
|
pkgname=libbytesize
|
|
pkgver=2.12
|
|
pkgrel=0
|
|
pkgdesc="Library for working with arbitrary big sizes in bytes"
|
|
options="!check" # Tests require dealing with locales
|
|
url="https://github.com/storaged-project/libbytesize"
|
|
arch="all"
|
|
license="LGPL-2.1-or-later"
|
|
makedepends="gettext-dev gmp-dev mpfr-dev pcre2-dev python3"
|
|
checkdepends="bash"
|
|
subpackages="
|
|
$pkgname-dev
|
|
$pkgname-lang
|
|
py3-$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 -flto=auto -lintl" \
|
|
./configure \
|
|
--host=$CHOST \
|
|
--build=$CBUILD \
|
|
--prefix=/usr \
|
|
--disable-dependency-tracking
|
|
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"
|
|
|
|
replaces="py-libbytesize" # Backwards compatibility
|
|
provides="py-libbytesize=$pkgver-r$pkgrel" # Backwards compatibility
|
|
|
|
amove usr/lib/python*
|
|
}
|
|
|
|
_tools() {
|
|
pkgdesc="Tools for libbytesize"
|
|
depends="py-$pkgname"
|
|
|
|
amove usr/bin
|
|
}
|
|
|
|
sha512sums="
|
|
90eaa77b9e2cdafa1ac9e286c11fd7304c00146d0c33e942e36636968933cc683c00de7a3f715123b302fd9b2013ac4620c52371be7c69a1b33e02570847b091 libbytesize-2.12.tar.gz
|
|
"
|