# Template file for 'metalog'
pkgname=metalog
version=20230719
revision=2
build_style=gnu-configure
conf_files="/etc/metalog.conf"
hostmakedepends="autoconf autoconf-archive automake pkg-config"
makedepends="pcre2-devel"
short_desc="Modern replacement for syslogd and klogd"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://github.com/hvisage/metalog"
changelog="https://github.com/hvisage/metalog/blob/master/NEWS"
distfiles="https://github.com/hvisage/metalog/archive/metalog-${version}.tar.gz"
checksum=563b41409ee9e396c3709f002b59ccd9aff901b7d7e3adee6344e4b599a02105

pre_configure() {
	./autogen.sh
}

post_install() {
	vsv metalog

	# Disable logging for metaloga to avoid any issues
	# https://github.com/void-linux/void-packages/pull/44912#issuecomment-1625625388
	rm -rf "${DESTDIR}/etc/sv/metalog/log"
}
