diff options
Diffstat (limited to 'app-admin/syslog-ng/syslog-ng-3.0.4-r100.ebuild')
-rw-r--r-- | app-admin/syslog-ng/syslog-ng-3.0.4-r100.ebuild | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/app-admin/syslog-ng/syslog-ng-3.0.4-r100.ebuild b/app-admin/syslog-ng/syslog-ng-3.0.4-r100.ebuild new file mode 100644 index 0000000..ca1f50b --- /dev/null +++ b/app-admin/syslog-ng/syslog-ng-3.0.4-r100.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.0.4.ebuild,v 1.5 2009/10/30 11:04:45 maekke Exp $ + +EAPI=2 +inherit fixheadtails eutils + +MY_PV=${PV/_/} +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/sources/${PV}/source/syslog-ng_${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd" +IUSE="caps ipv6 pcre selinux spoof-source sql ssl static tcpd" +RESTRICT="test" + +LIBS_DEPEND=" + spoof-source? ( net-libs/libnet ) + ssl? ( dev-libs/openssl ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + >=dev-libs/eventlog-0.2 + >=dev-libs/glib-2.10.1:2 + caps? ( sys-libs/libcap ) + sql? ( >=dev-db/libdbi-0.8.3 )" +RDEPEND=" + !static? ( + pcre? ( dev-libs/libpcre ) + ${LIBS_DEPEND} + )" +DEPEND="${RDEPEND} + ${LIBS_DEPEND} + dev-util/pkgconfig + sys-devel/flex" +PROVIDE="virtual/logger" + +src_prepare() { + ht_fix_file configure +} + +src_configure() { + local myconf + + if use static ; then + myconf="${myconf} --enable-static-linking" + if use pcre ; then + ewarn "USE=pcre is incompatible with static linking" + myconf="${myconf} --disable-pcre" + fi + else + myconf="${myconf} --enable-dynamic-linking" + fi + econf \ + --disable-dependency-tracking \ + --sysconfdir=/etc/syslog-ng \ + --with-pidfile-dir=/var/run \ + $(use_enable caps linux-caps) \ + $(use_enable ipv6) \ + $(use_enable pcre) \ + $(use_enable spoof-source) \ + $(use_enable sql) \ + $(use_enable ssl) \ + $(use_enable tcpd tcp-wrapper) \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + dodoc AUTHORS ChangeLog NEWS README \ + doc/examples/{syslog-ng.conf.sample,syslog-ng.conf.solaris} \ + contrib/syslog-ng.conf* \ + contrib/syslog2ng # "${FILESDIR}/syslog-ng.conf."* + dohtml doc/reference/syslog-ng.html/* + + newinitd ${FILESDIR}/syslog-ng.init syslog-ng + + insinto /etc/syslog-ng + newins ${FILESDIR}/syslog-ng.conf-3.0 syslog-ng.conf + + insinto /etc/logrotate.d + newins ${FILESDIR}/syslog-ng.logrotate syslog-ng + diropts -m 0750 -o root -g adm + dodir /var/log/syslog-ng.archive + + 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 +} |