blob: 8b96751aaa0fb7e548af6474f788e7b930fb6142 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=libbytesize
pkgver=2.1
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/$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="6b93d877e921820c19ed6874a36d9f8b6958112f6230f24980e8e6e30570b39ce74594f0ef126f70dc81b5434899c1f0f3ad0925f3ff7b6a596a9329c8f106c8 libbytesize-2.1.tar.gz"
|