Luna/ports/gmp/package.sh

44 lines
686 B
Bash
Raw Normal View History

2022-10-26 19:56:43 +00:00
pkgname="gmp"
pkgver="6.2.1"
pkgurl="https://ftp.gnu.org/gnu/gmp/gmp-$pkgver.tar.xz"
pkgmode="web"
islib=1
setupdir="$workdir"
builddir="$workdir/build"
installdir="$workdir/build"
srcdir="$workdir/gmp-$pkgver"
port_unpack()
{
tar xvf gmp-$pkgver.tar.xz
}
port_patch()
{
patch -u -i $portdir/gmp.patch -p 1 -d $workdir
}
port_configure()
{
CC_FOR_BUILD=gcc $srcdir/configure --enable-shared=no --with-gnu-ld --host=x86_64-luna --prefix=/usr
}
port_build()
{
make -j$(nproc)
}
port_install()
{
make DESTDIR=$LUNA_BASE install
rm -f $LUNA_BASE/usr/lib/*.la
}
port_uninstall()
{
make DESTDIR=$LUNA_BASE uninstall
rm -f $LUNA_BASE/usr/lib/libgmp.a
}