void-packages/srcpkgs/libbytesize/template
2019-03-01 12:04:45 -03:00

42 lines
1.3 KiB
Bash

# Template file for 'libbytesize'
pkgname=libbytesize
version=1.4
revision=1
build_style=gnu-configure
hostmakedepends="python3"
makedepends="mpfr-devel pcre-devel"
checkdepends="python3-six python-six"
short_desc="A library for operations with sizes in bytes"
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="LGPL-2.1-or-later"
homepage="https://github.com/storaged-project/libbytesize"
changelog="https://raw.githubusercontent.com/storaged-project/libbytesize/master/NEWS.rst"
distfiles="https://github.com/storaged-project/libbytesize/releases/download/${version}/libbytesize-${version}.tar.gz"
checksum=bb4ddc577cf2881834089c2c8d698a73c3f124990937afc2a15d421b2cfd782d
pre_check() {
# Disable test that depends on unpackaged pocketlint
sed -i 's|canary_tests.sh$||g' tests/Makefile
# Default locale doesn't work
sed -i 's|DEFAULT_LOCALE =.*|DEFAULT_LOCALE = "C"|g' tests/libbytesize_unittest.py
}
libbytesize-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}
libbytesize-python3_package() {
archs=noarch
pycompile_module="bytesize"
depends="python3-six ${sourcepkg}>=${version}_${revision}"
short_desc+=" - Python3 bindings"
pkg_install() {
vmove usr/lib/python3*
}
}