summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-01-17 09:18:18 +0100
committerLars Wendler <polynomial-c@gentoo.org>2020-01-17 09:23:43 +0100
commitc8dd60f04c810f92ba365db6f0d3230518b01941 (patch)
tree7219289e5d29ca45c3669fbf65d5246766cc67f8 /app-admin/sysklogd
parentgnome-extra/gucharmap: fix build with unicode-data 12.1.0 (diff)
downloadgentoo-c8dd60f04c810f92ba365db6f0d3230518b01941.tar.gz
gentoo-c8dd60f04c810f92ba365db6f0d3230518b01941.tar.bz2
gentoo-c8dd60f04c810f92ba365db6f0d3230518b01941.zip
app-admin/sysklogd: Added live ebuild
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-admin/sysklogd')
-rw-r--r--app-admin/sysklogd/sysklogd-9999.ebuild82
1 files changed, 82 insertions, 0 deletions
diff --git a/app-admin/sysklogd/sysklogd-9999.ebuild b/app-admin/sysklogd/sysklogd-9999.ebuild
new file mode 100644
index 00000000000..bd1e8726ca4
--- /dev/null
+++ b/app-admin/sysklogd/sysklogd-9999.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="Standard log daemons"
+HOMEPAGE="https://troglobit.com/sysklogd.html https://github.com/troglobit/sysklogd"
+
+if [[ "${PV}" == *9999 ]] ; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="https://github.com/troglobit/sysklogd.git"
+else
+ SRC_URI="https://github.com/troglobit/sysklogd/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="logger logrotate systemd"
+RESTRICT="test"
+
+DEPEND="
+ logger? (
+ !<sys-apps/util-linux-2.34-r3
+ !>=sys-apps/util-linux-2.34-r3[logger]
+ )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( ChangeLog.md README.md )
+
+pkg_setup() {
+ append-lfs-flags
+ tc-export CC
+}
+
+src_prepare() {
+ default
+ [[ "${PV}" == *9999 ]] && eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --runstatedir="${EPREFIX}"/run
+ $(use_with logger)
+ $(use_with systemd systemd $(systemd_get_systemunitdir))
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ doins syslog.conf
+ keepdir /etc/syslog.d
+
+ newinitd "${FILESDIR}"/sysklogd.rc10 sysklogd
+ newconfd "${FILESDIR}"/sysklogd.confd3 sysklogd
+
+ if use logrotate ; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/sysklogd.logrotate sysklogd
+ sed 's@ -r 10M:10@@' -i "${ED}"/etc/conf.d/sysklogd || die
+ fi
+
+ find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die
+}
+
+pkg_postinst() {
+ if ! use logrotate && [[ -n ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -lt 2.0 ; then
+ elog "Starting with version 2.0 syslogd has built in log rotation"
+ elog "functionality that does no longer require a running cron daemon."
+ elog "So we no longer install any log rotation cron files for sysklogd."
+ fi
+ if [[ -n ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -lt 2.1 ; then
+ elog "Starting with version 2.1 sysklogd no longer provides klogd."
+ elog "syslogd now also logs kernel messages."
+ fi
+}