summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/syslog-ng/syslog-ng-2.1.4.ebuild')
-rw-r--r--app-admin/syslog-ng/syslog-ng-2.1.4.ebuild113
1 files changed, 113 insertions, 0 deletions
diff --git a/app-admin/syslog-ng/syslog-ng-2.1.4.ebuild b/app-admin/syslog-ng/syslog-ng-2.1.4.ebuild
new file mode 100644
index 0000000..f6c4508
--- /dev/null
+++ b/app-admin/syslog-ng/syslog-ng-2.1.4.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit autotools fixheadtails
+
+DESCRIPTION="syslog replacement with advanced filtering features"
+HOMEPAGE="http://www.balabit.com/products/syslog_ng/"
+SRC_URI="http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/${PV}/source/${PN}_${PV}.tar.gz"
+RESTRICT="nomirror"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="doc ipv6 logrotate spoof-source sql static tcpd"
+
+RDEPEND=">=dev-libs/eventlog-0.2.6
+ spoof-source? ( net-libs/libnet )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ sql? ( >=dev-db/libdbi-0.8.3 )
+ >=dev-libs/glib-2.2"
+DEPEND="${RDEPEND}
+ sys-devel/flex"
+PROVIDE="virtual/logger"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ ht_fix_file configure
+ if use doc; then
+ cd "${S}/doc/reference"
+ unpack ./syslog-ng.html.tar.gz || die "failed to unpack docs"
+ fi
+}
+
+src_compile() {
+ econf \
+ --sysconfdir=/etc/syslog-ng \
+ --disable-dependency-tracking \
+ $(use_enable ipv6) \
+ $(use_enable spoof-source) \
+ $(use_enable sql) \
+ $(use_enable !static dynamic-linking) \
+ $(use_enable static static-linking) \
+ $(use_enable tcpd tcp-wrapper) \
+ || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ dodoc AUTHORS ChangeLog NEWS README \
+ doc/examples/syslog-ng.conf.sample \
+ doc/reference/{syslog-ng.xml,syslog-ng.xsl,syslog-ng.txt} \
+ contrib/{syslog2ng,syslog-ng.vim,relogger.pl}
+ use doc && dohtml doc/sgml/syslog-ng.html/*
+
+ newinitd ${FILESDIR}/syslog-ng.init syslog-ng
+
+ insinto /etc/syslog-ng
+ newins ${FILESDIR}/syslog-ng.conf syslog-ng.conf
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins ${FILESDIR}/syslog-ng.logrotate syslog-ng
+ diropts -m 0750 -o root -g adm
+ dodir /var/log/syslog-ng.archive
+ fi
+
+ dodoc ${FILESDIR}/syslog-ng.remote.current.cron
+}
+
+pkg_postinst() {
+ einfo
+ einfo "The bundled syslog-ng.conf is prepared for being used"
+ einfo "for standalone, logclient and logserver installations"
+ einfo "(they can all be combined for one installation if desired)."
+ einfo
+ einfo "For standalone or logserver installations, local messages"
+ einfo "should be logged to /var/log/messages (all messages)"
+ einfo "and /var/log/syslog-ng/ (for application or facility based"
+ einfo "logging) and be archived to /var/log/syslog-ng.archive/"
+ einfo "using the bundled logrotate config snippet."
+ einfo
+ einfo "If you are using this installation for a logserver,"
+ einfo "remote messages should be logged to a directory like"
+ einfo "/var/log/syslog-ng.remote/YEAR/MONTH/DAY/HOSTNAME/"
+ einfo "and NOT be rotated with logrotate (syslog-ng.conf has"
+ einfo "an example on logging to such a destination)."
+ einfo "You can use the included syslog-ng.remote.current.cron"
+ einfo "to maintain a current symlink from 'current' to the"
+ einfo "current YEAR/MONTH/DAY directory for convenience (makes"
+ einfo "it easier to 'tail -f' or 'less +F' the current logfiles)."
+ einfo "To do so, simply copy the cron script to /etc/cron.daily/."
+ einfo "You might also want to have a look at stunnel for securely"
+ einfo "tunneling remote log messages via SSL over TCP."
+ einfo "I might add some stunnel sample configs to this package"
+ einfo "in the future ;-)"
+ einfo
+ einfo "You might want to use app-admin/tenshi for monitoring"
+ einfo "the logs. The bundled syslog-ng.conf is prepared for"
+ einfo "logging messages to a dedicated fifo for tenshi, which"
+ einfo "is believed to be the best solution available."
+ einfo
+ ewarn
+ ewarn "ATTENTION: since version 2.0.1, the values of the"
+ ewarn " syslog-ng.conf options dir_owner(),"
+ ewarn " dir_group(), owner() and group()"
+ ewarn " MUST be quoted when they are a"
+ ewarn " string instead of a UID/GID!"
+ ewarn
+}