summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2016-06-01 08:41:03 +0200
committerUltrabug <ultrabug@gentoo.org>2016-06-01 08:41:03 +0200
commit10547a21006ad786ea3d365764056871d43508d2 (patch)
tree4680224510778e7d7793fea9e38175378a7fcc2b /app-admin/nxlog-ce
parentimproved rethinkdb ebuild with enhanced config from bgo overlay (diff)
downloadultrabug-10547a21006ad786ea3d365764056871d43508d2.tar.gz
ultrabug-10547a21006ad786ea3d365764056871d43508d2.tar.bz2
ultrabug-10547a21006ad786ea3d365764056871d43508d2.zip
app-admin/nxlog-ce: new ebuild
Diffstat (limited to 'app-admin/nxlog-ce')
-rw-r--r--app-admin/nxlog-ce/Manifest3
-rw-r--r--app-admin/nxlog-ce/files/nxlog.initd45
-rw-r--r--app-admin/nxlog-ce/nxlog-ce-2.8.1248.ebuild69
3 files changed, 117 insertions, 0 deletions
diff --git a/app-admin/nxlog-ce/Manifest b/app-admin/nxlog-ce/Manifest
new file mode 100644
index 0000000..ae87ccc
--- /dev/null
+++ b/app-admin/nxlog-ce/Manifest
@@ -0,0 +1,3 @@
+AUX nxlog.initd 858 SHA256 efb4694690f49e0bde016fb99df239d92a050358ac963993bfc8f0bd4d995a06 SHA512 8879a280258e5b8394ec57e0c3079ba4a5248e6b16caeaaec4f6d299a5622690244b9f09fbc48b5bc874a6ef935b5a7c343acd8f10e345a012f2b7a76f259411 WHIRLPOOL fd8972f07b38249646257464e6a1d4c5b747b2c69f38353321429cf154d064a01b6fced7e55876cd9189ac1a044a989cf73af0798b0d711faf828810041341ac
+DIST nxlog-ce-2.8.1248.tar.gz 2552618 SHA256 13c8e41ed7a41cd529822a54c7f7b8f44b7022e6ce870f1161a173a7930d890e SHA512 1cb31421f0a17c09ba5fc187dde8ffbe913bc176eaece7d9f614432ce857f8632c294e12fa8a0f1bfa3eff93d8ea5a4e76b281d67ba624b3bc47dd7775ea65dc WHIRLPOOL e89465ae9b870f78410a2af48e90bc33eafa2be78580365b4c1fa1c9f3d22c24383d0c9c8f41ca9e078521719e02fbf2e90c6070a640e7c8c12be0a503ca6997
+EBUILD nxlog-ce-2.8.1248.ebuild 1544 SHA256 2b7baf5b7f3005c07d8bb0ac1604ca5b7a1942d6c6dab089b5f4057d772bc942 SHA512 7f06c881dd05999e77b25e51e17e4720e3fe5e5ab799812f1c3407bfb7c299f43a91f9c076aeb891c4985279eb0ba951d8a5cbda4557edaf563ed54659b413a4 WHIRLPOOL 8cb64a3f4a7f8678922fb0716efaab3431bbd49e71af287ee1d5f9e230e93a19f96594863dd82fd1a06ecf830ba4fbcb9c1ca9ca143a9845ef998e9130b46941
diff --git a/app-admin/nxlog-ce/files/nxlog.initd b/app-admin/nxlog-ce/files/nxlog.initd
new file mode 100644
index 0000000..33490e3
--- /dev/null
+++ b/app-admin/nxlog-ce/files/nxlog.initd
@@ -0,0 +1,45 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+config_file=${config_file:-/etc/nxlog/${SVCNAME}.conf}
+run_dir=${run_dir:-/run/nxlog}
+
+command="/usr/bin/nxlog"
+command_args="-c ${config_file}"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-nxlog}
+group=${group:-nxlog}
+
+extra_started_commands="${opts} reload"
+
+depend() {
+ use net
+}
+
+check_config() {
+ ${command} ${command_args} -v >/dev/null
+ return $?
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ fi
+ check_config
+ return $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ check_config
+ if [ $? == 0 ]; then
+ ${command} ${command_args} -r
+ eend $?
+ else
+ eend 1
+ fi
+}
diff --git a/app-admin/nxlog-ce/nxlog-ce-2.8.1248.ebuild b/app-admin/nxlog-ce/nxlog-ce-2.8.1248.ebuild
new file mode 100644
index 0000000..46a1d57
--- /dev/null
+++ b/app-admin/nxlog-ce/nxlog-ce-2.8.1248.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+inherit autotools user
+
+MY_PN="nxlog"
+
+DESCRIPTION="Universal log collector and forwarder supporting different platforms"
+HOMEPAGE="http://nxlog.org"
+SRC_URI="http://nxlog.org/system/files/products/files/1/${P}.tar.gz"
+
+LICENSE="NXLOG-1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="perl static-libs"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup nxlog
+ enewuser nxlog -1 -1 /var/lib/${MY_PN} "adm,nxlog"
+}
+
+# TODO: fix me ?
+# src_prepare() {
+# sed -e 's/.* -ggdb3 .*/echo/g' -i configure.in || die 'failed to remove ggdb3 flag'
+# mv configure.in configure.ac
+# find . -name Makefile.in -exec sed -e 's@/configure.in@/configure.ac@g' -i {} \;
+# eautoreconf
+# eapply_user
+# }
+
+src_configure() {
+ local conf_opts=(
+ --libexecdir=/usr/$(get_libdir)
+ --libdir=/usr/$(get_libdir)
+ --localstatedir=/var
+ --with-pidfile=/run/nxlog/nxlog.pid
+ $(use_enable perl xm_perl)
+ $(use_enable static-libs static)
+ )
+ econf "${conf_opts[@]}"
+}
+
+src_install() {
+ default
+
+ use static-libs || find ${D} -type f -name "*.la" -delete
+
+ insinto /etc/nxlog
+ doins packaging/debian/nxlog.conf
+
+ keepdir /var/log/nxlog
+ fowners nxlog:nxlog /var/log/nxlog
+
+ keepdir /var/spool/nxlog
+ fowners nxlog:nxlog /var/spool/nxlog
+
+ newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN}
+}
+
+pkg_postinst() {
+ einfo "See the nxlog reference manual for configuration options."
+ einfo " http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html"
+}