app-admin/metalog: add 20260103

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2026-01-04 16:52:51 +00:00
parent 5425f7cf69
commit f74b95e54a
2 changed files with 77 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST metalog-20230719.tar.gz 42579 BLAKE2B 6088c86fad90185fcb22a96ff88686647eac1fb4216884f43c07dff23274efc748c908f6f98162f743d2528437748f79809dfe6911d8d47e6cf7e58c8f3ca3b4 SHA512 a717dca5e00e9e66b97a84c3dbb0cdda522cbe628fad4cfbcb5256ee69659c63149bbb1e8797028bbab55d97787661c1d7316c7c2cbfe3b65932f84d64af15f6
DIST metalog-20260103.gh.tar.gz 50736 BLAKE2B 93d7211da2b20667c97163908a3e0ebc13d94c2daff183df7ba22b1e22b38a2fe4c6c59d08a200d48691fd8c96be001b6a564ae55fe2bbac26a36142121f79f5 SHA512 aeebdd8bc8c56d7bae62bbb6c508d6168f507ac3b70c753746b532671e16a898a630c8a65962bfbfc1e5ed1a6a65234c2c1cdb00783692cf2ca5075cfb603152

View File

@@ -0,0 +1,76 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools systemd
DESCRIPTION="Highly configurable replacement for syslogd/klogd"
HOMEPAGE="https://github.com/hvisage/metalog"
SRC_URI="https://github.com/hvisage/metalog/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="unicode zlib"
RDEPEND="
dev-libs/libpcre2
"
DEPEND="
${RDEPEND}
"
BDEPEND="
dev-build/autoconf-archive
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/metalog-20230719-metalog-conf.patch
)
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_with unicode)
$(use_with zlib compress)
)
econf "${myeconfargs[@]}"
}
src_install() {
emake DESTDIR="${D}" install
dodoc AUTHORS ChangeLog README NEWS metalog.conf
into /
newsbin "${FILESDIR}"/consolelog.sh-r1 consolelog.sh
newinitd "${FILESDIR}"/metalog.initd-r1 metalog
newconfd "${FILESDIR}"/metalog.confd metalog
systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
}
pkg_preinst() {
if [[ -d "${ROOT}"/etc/metalog && ! -e "${ROOT}"/etc/metalog.conf ]] ; then
mv -f "${ROOT}"/etc/metalog/metalog.conf "${ROOT}"/etc/metalog.conf
rmdir "${ROOT}"/etc/metalog
export MOVED_METALOG_CONF=true
else
export MOVED_METALOG_CONF=false
fi
}
pkg_postinst() {
if ${MOVED_METALOG_CONF} ; then
ewarn "The default metalog.conf file has been moved"
ewarn "from ${EROOT}/etc/metalog/metalog.conf to just"
ewarn "${EROOT}/etc/metalog.conf. If you had a standard"
ewarn "setup, the file has been moved for you."
fi
}