Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/metalog/
Date: Sun, 03 Apr 2022 03:41:37
Message-Id: 1648957270.86dfb8826aa9d44a6feb31d5ca202784544d7761.sam@gentoo
1 commit: 86dfb8826aa9d44a6feb31d5ca202784544d7761
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 3 03:03:02 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 3 03:41:10 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86dfb882
7
8 app-admin/metalog: add 20220214
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 app-admin/metalog/Manifest | 1 +
13 app-admin/metalog/metalog-20220214.ebuild | 66 +++++++++++++++++++++++++++++++
14 2 files changed, 67 insertions(+)
15
16 diff --git a/app-admin/metalog/Manifest b/app-admin/metalog/Manifest
17 index d99dd76fd94a..d52b72138402 100644
18 --- a/app-admin/metalog/Manifest
19 +++ b/app-admin/metalog/Manifest
20 @@ -1 +1,2 @@
21 DIST metalog-20200113.tar.gz 40276 BLAKE2B f2fcaccf610f3b7f1974aa97f2c7b5181f3c625c9e28d72832ba1570cfa369873887c83468bcea6a9f3d3080356bd1dd62849ec34a5d03c1272ada7f476946f6 SHA512 d399d86f988c69c9f74553cd682a5fe04886bca458e6f8bb3132fe1fb9f522510a428cfde8af0857c5ba22531b276b04fa05183e0006c2d28ef0f0aead488f93
22 +DIST metalog-20220214.tar.gz 40898 BLAKE2B 7ef04b9e0cd1ba878a11d988ec4b4bffa3d733f86c6b8cec57d32dcf837fe48a001a233a2b09378443b26f6e69869b8de7afeb25f11bb7729b66e1aa3a305f67 SHA512 44a1443e8f9e92460f128aa35125d50ae247ba4f2ce8fd8cc32b96a491e29963cdc27be12a6db28f286e2d5a2bc6243e126a77ae3eb642e7c969d58446a18fcd
23
24 diff --git a/app-admin/metalog/metalog-20220214.ebuild b/app-admin/metalog/metalog-20220214.ebuild
25 new file mode 100644
26 index 000000000000..a774d0a007e2
27 --- /dev/null
28 +++ b/app-admin/metalog/metalog-20220214.ebuild
29 @@ -0,0 +1,66 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +inherit autotools systemd
36 +
37 +DESCRIPTION="A highly configurable replacement for syslogd/klogd"
38 +HOMEPAGE="https://github.com/hvisage/metalog"
39 +SRC_URI="https://github.com/hvisage/${PN}/archive/${P}.tar.gz"
40 +S="${WORKDIR}"/${PN}-${P}
41 +
42 +LICENSE="GPL-2"
43 +SLOT="0"
44 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin"
45 +IUSE="unicode"
46 +
47 +RDEPEND="dev-libs/libpcre2"
48 +DEPEND="${RDEPEND}"
49 +BDEPEND="sys-devel/autoconf-archive
50 + virtual/pkgconfig"
51 +
52 +PATCHES=(
53 + "${FILESDIR}"/${PN}-0.9-metalog-conf.patch
54 +)
55 +
56 +src_prepare() {
57 + default
58 +
59 + eautoreconf
60 +}
61 +
62 +src_configure() {
63 + econf $(use_with unicode)
64 +}
65 +
66 +src_install() {
67 + emake DESTDIR="${D}" install
68 + dodoc AUTHORS ChangeLog README NEWS metalog.conf
69 +
70 + into /
71 + newsbin "${FILESDIR}"/consolelog.sh-r1 consolelog.sh
72 +
73 + newinitd "${FILESDIR}"/metalog.initd-r1 metalog
74 + newconfd "${FILESDIR}"/metalog.confd metalog
75 + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
76 +}
77 +
78 +pkg_preinst() {
79 + if [[ -d "${ROOT}"/etc/metalog && ! -e "${ROOT}"/etc/metalog.conf ]] ; then
80 + mv -f "${ROOT}"/etc/metalog/metalog.conf "${ROOT}"/etc/metalog.conf
81 + rmdir "${ROOT}"/etc/metalog
82 + export MOVED_METALOG_CONF=true
83 + else
84 + export MOVED_METALOG_CONF=false
85 + fi
86 +}
87 +
88 +pkg_postinst() {
89 + if ${MOVED_METALOG_CONF} ; then
90 + ewarn "The default metalog.conf file has been moved"
91 + ewarn "from ${EROOT}/etc/metalog/metalog.conf to just"
92 + ewarn "${EROOT}/etc/metalog.conf. If you had a standard"
93 + ewarn "setup, the file has been moved for you."
94 + fi
95 +}