61 lines
1.8 KiB
Bash
61 lines
1.8 KiB
Bash
# Template file for 'libhugetlbfs'
|
|
pkgname=libhugetlbfs
|
|
version=2.22
|
|
revision=1
|
|
# fails to build on musl (relies on glibc specifics) + only for these archs
|
|
archs="x86_64 i686 armv[67]l aarch64 ppc64le ppc64 ppc"
|
|
build_style=gnu-makefile
|
|
make_build_args="ARCH=${XBPS_TARGET_MACHINE%-*} LIB32=lib32 LIB64=lib BUILDTYPE=NATIVEONLY"
|
|
make_install_args="${make_build_args}"
|
|
short_desc="Library to deal with hugetlbfs"
|
|
maintainer="q66 <daniel@octaforge.org>"
|
|
license="LGPL-2.1-or-later"
|
|
homepage="https://github.com/libhugetlbfs/libhugetlbfs"
|
|
distfiles="https://github.com/${pkgname}/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.gz"
|
|
checksum=94dca9ea2c527cd77bf28904094fe4708865a85122d416bfccc8f4b73b9a6785
|
|
patch_args="-Np1"
|
|
CFLAGS="-fPIC"
|
|
|
|
do_check() {
|
|
# requires mounted hugetlbfs
|
|
:
|
|
}
|
|
|
|
post_extract() {
|
|
vsed -i 's,CUSTOM_LDSCRIPTS = yes,CUSTOM_LDSCRIPTS = no,' Makefile
|
|
}
|
|
|
|
post_install() {
|
|
# only needed with old binutils, and wrong for some of our setups
|
|
rm -rf ${DESTDIR}/usr/share/libhugetlbfs/ldscripts
|
|
# don't need this
|
|
rm -f ${DESTDIR}/usr/lib/libhugetlbfs_privutils.so
|
|
# soname
|
|
mv ${DESTDIR}/usr/lib/libhugetlbfs.so ${DESTDIR}/usr/lib/libhugetlbfs-${version}.so
|
|
ln -s libhugetlbfs-${version}.so ${DESTDIR}/usr/lib/libhugetlbfs.so.0
|
|
ln -s libhugetlbfs.so.0 ${DESTDIR}/usr/lib/libhugetlbfs.so
|
|
# ld
|
|
rm ${DESTDIR}/usr/share/${pkgname}/ld
|
|
mv ${DESTDIR}/usr/share/${pkgname}/ld.hugetlbfs ${DESTDIR}/usr/bin
|
|
}
|
|
|
|
libhugetlbfs-devel_package() {
|
|
depends="libhugetlbfs>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/libhugetlbfs.so
|
|
vmove usr/lib/libhugetlbfs.a
|
|
vmove usr/share/man/man3
|
|
}
|
|
}
|
|
|
|
libhugetlbfs-tools_package() {
|
|
short_desc="Tools to ease use of hugetlbfs"
|
|
pkg_install() {
|
|
vmove usr/bin
|
|
vmove usr/share/man/man1
|
|
vmove usr/share/man/man8
|
|
}
|
|
}
|