1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools systemd
7 DESCRIPTION="A highly configurable replacement for syslogd/klogd"
8 HOMEPAGE="https://github.com/hvisage/metalog"
9 SRC_URI="https://github.com/hvisage/${PN}/archive/${P}.tar.gz"
13 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin"
16 RDEPEND=">=dev-libs/libpcre-3.4"
18 sys-devel/autoconf-archive
21 S="${WORKDIR}/${PN}-${P}"
24 "${FILESDIR}"/${PN}-0.9-metalog-conf.patch
33 econf $(use_with unicode)
37 emake DESTDIR="${D}" install
38 dodoc AUTHORS ChangeLog README NEWS metalog.conf
41 dosbin "${FILESDIR}"/consolelog.sh
43 newinitd "${FILESDIR}"/metalog.initd-r1 metalog
44 newconfd "${FILESDIR}"/metalog.confd metalog
45 systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
49 if [[ -d "${ROOT}"/etc/metalog ]] && [[ ! -e "${ROOT}"/etc/metalog.conf ]] ; then
50 mv -f "${ROOT}"/etc/metalog/metalog.conf "${ROOT}"/etc/metalog.conf
51 rmdir "${ROOT}"/etc/metalog
52 export MOVED_METALOG_CONF=true
54 export MOVED_METALOG_CONF=false
59 if ${MOVED_METALOG_CONF} ; then
60 ewarn "The default metalog.conf file has been moved"
61 ewarn "from /etc/metalog/metalog.conf to just"
62 ewarn "/etc/metalog.conf. If you had a standard"
63 ewarn "setup, the file has been moved for you."