From 8c46b58783a97a077d605a0adb52cd31538a5afa Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Tue, 28 Oct 2025 04:21:55 +0200 Subject: [PATCH] ebuild added --- linux/libndbuf-9999.ebuild | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 linux/libndbuf-9999.ebuild diff --git a/linux/libndbuf-9999.ebuild b/linux/libndbuf-9999.ebuild new file mode 100644 index 0000000..f1e7c6e --- /dev/null +++ b/linux/libndbuf-9999.ebuild @@ -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" +}