ebuild added

This commit is contained in:
Alexander Vdolainen 2025-10-28 04:21:55 +02:00
parent 6429f8b102
commit 8c46b58783

View File

@ -0,0 +1,66 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit git-r3 autotools toolchain-funcs
DESCRIPTION="Binary buffer helper library (libndbuf)"
HOMEPAGE="https://vapaa.work/public/libndbuf"
SRC_URI="git+https://vapaa.work/public/libndbuf.git"
LICENSE="LGPL-2.1-or-later"
SLOT="0"
KEYWORDS=""
IUSE=""
# Adjust build/run deps as needed
DEPEND="sys-devel/autoconf
sys-devel/automake
sys-devel/libtool
sys-devel/make
sys-devel/gcc
sys-libs/glibc"
RDEPEND=""
S="${WORKDIR}/git"
src_prepare() {
default
# If the repo includes generated configure, skip autoreconf; otherwise run it.
if ! [[ -x configure ]]; then
einfo "Running autoreconf -fi"
# regenerate configure and friends
autoreconf -fi || die "autoreconf failed"
fi
# Ensure scripts are executable
if [[ -f configure ]]; then
chmod +x configure || die "chmod configure failed"
fi
}
src_configure() {
econf \
--prefix=/usr \
--libdir=/usr/lib64 \
--disable-static || die "configure failed"
}
src_compile() {
emake V=1 || die "make failed"
}
src_install() {
emake DESTDIR="${D}" install || die "make install failed"
# Ensure headers are in /usr/include and libs in /usr/lib
# Remove any bundled or undesired files if necessary
if [[ -d "${D}/usr/lib64/pkgconfig" ]]; then
dodir /usr/lib64/pkgconfig
fi
}
pkg_postinst() {
elog "libndbuf installed"
}