diff options
author | Milan P. Stanić <mps@arvanta.net> | 2019-03-02 13:20:19 +0100 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2019-03-06 11:03:51 +0000 |
commit | 73f0cb176c5dc28bb94be5c1c857d777d1c2df55 (patch) | |
tree | 37e5822bf9913f1cf974164c3d88837ebba302b1 /testing/metalog | |
parent | f84dbbbf7fbdf44117d3862a49fc1f52878dc0e0 (diff) | |
download | aports-73f0cb176c5dc28bb94be5c1c857d777d1c2df55.tar.bz2 aports-73f0cb176c5dc28bb94be5c1c857d777d1c2df55.tar.xz |
testing/metalog: new aport
Diffstat (limited to 'testing/metalog')
-rw-r--r-- | testing/metalog/APKBUILD | 53 | ||||
-rw-r--r-- | testing/metalog/metalog.confd | 10 | ||||
-rw-r--r-- | testing/metalog/metalog.initd | 28 |
3 files changed, 91 insertions, 0 deletions
diff --git a/testing/metalog/APKBUILD b/testing/metalog/APKBUILD new file mode 100644 index 0000000000..b5c4e4689e --- /dev/null +++ b/testing/metalog/APKBUILD @@ -0,0 +1,53 @@ +# Contributor: Milan P. Stanić <mps@arvanta.net> +# Maintainer: Milan P. Stanić <mps@arvanta.net> +pkgname=metalog +pkgver=20181125 +pkgrel=0 +pkgdesc="small, simple to config, flexible syslogd/klogd daemon" +url="https://github.com/hvisage/metalog" +arch="all" +license="GPL-2.0-only" +depends="" +makedepends="pcre-dev automake autoconf autoconf-archive" +subpackages="$pkgname-doc $pkgname-openrc" +source="$pkgname-$pkgver.tar.gz::https://github.com/hvisage/metalog/archive/${pkgver}.tar.gz + metalog.initd + metalog.confd + " +builddir="$srcdir/$pkgname-$pkgver" + +prepare() { + cd "$builddir" + ./autogen.sh +} + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install + + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname +} + +sha512sums="8ab6713e158a50a330efd0f81764bb4e9be16da3194eea8043d3758474171841adbca86c735a387b87df7f69b1567d3fcf320fc5dfcd5b6ad88f7ce4c6622d58 metalog-20181125.tar.gz +09d8ac585418c6a3dfccc9d0f1a050b5862924712d78dc44fce3cb497bb362afe0a556240b14cf957fcdf64d0d06f5b6a8df4372c69129b43dc3520ecd310344 metalog.initd +1efbc74e23abef06bd62b35bb1f4166b86b5b4618d81e8eb085b4c9b45d0c4319b6db19a24648f7010400eed05c2486e16f16176a0e5435d7f263492934019c6 metalog.confd" diff --git a/testing/metalog/metalog.confd b/testing/metalog/metalog.confd new file mode 100644 index 0000000000..2f3630d03d --- /dev/null +++ b/testing/metalog/metalog.confd @@ -0,0 +1,10 @@ +# Configuration file +CONFIGFILE="/etc/metalog.conf" + +# PID file +PIDFILE="/run/metalog.pid" + +# Options to metalog +# "-B" start server in background/daemon mode +# "-s" tells metalog to run in sync mode +METALOG_OPTS="-B -s" diff --git a/testing/metalog/metalog.initd b/testing/metalog/metalog.initd new file mode 100644 index 0000000000..bb947bdadf --- /dev/null +++ b/testing/metalog/metalog.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +pidfile="${PIDFILE:-/run/metalog.pid}" +command="/usr/sbin/metalog" +command_args="--pidfile=${pidfile} --daemonize ${METALOG_OPTS}" + +extra_started_commands="buffer unbuffer" + +depend() { + need localmount + use clock hostname + after bootmisc + provide logger +} + +buffer() { + ebegin "Enabling log buffering" + start-stop-daemon --exec "${command}" --signal USR2 --pidfile "${pidfile}" + eend ${?} +} + +unbuffer() { + ebegin "Disabling log buffering" + start-stop-daemon --exec "${command}" --signal USR1 --pidfile "${pidfile}" + eend ${?} +} |