42 lines
1.0 KiB
Bash
42 lines
1.0 KiB
Bash
# Template file for 'libtommath'
|
|
pkgname=libtommath
|
|
version=1.2.1
|
|
revision=1
|
|
hostmakedepends="libtool"
|
|
short_desc="Portable number theoretic multiple-precision integer library"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="Public domain"
|
|
homepage="http://www.libtom.net/LibTomMath/"
|
|
distfiles="https://github.com/libtom/libtommath/releases/download/v${version}/ltm-${version}.tar.xz"
|
|
checksum=986025d7b374276fee2e30e99f3649e4ac0db8a02257a37ee10eae72abed0d1f
|
|
|
|
do_build() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
cp /usr/bin/libtool .
|
|
sed -e "s,CCLD=.*,CCLD=$CC,g;s,CC=.*,CC=$CC,g" -i libtool
|
|
sed -e 's,libtool,./libtool,g' -i makefile.shared
|
|
fi
|
|
make -f makefile.shared
|
|
}
|
|
|
|
do_install() {
|
|
make -f makefile.shared PREFIX=/usr DESTDIR=${DESTDIR} install
|
|
}
|
|
|
|
do_check() {
|
|
make test_standalone
|
|
|
|
./test
|
|
}
|
|
|
|
libtommath-devel_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|