[package] add syslog-ng3 (#5205)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@16844 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2009-07-14 15:33:37 +00:00
parent 94c95fed36
commit 96c8be8319
4 changed files with 103 additions and 0 deletions

60
admin/syslog-ng3/Makefile Normal file
View File

@ -0,0 +1,60 @@
#
# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=syslog-ng
PKG_VERSION:=3.0.3
PKG_RELEASE:=1
PKG_MD5SUM:=b8b3c9af28696bce48ceca0de6444426
PKG_SOURCE_URL:= \
http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/3.0.3/source/
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
define Package/syslog-ng3
SECTION:=admin
CATEGORY:=Administration
DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libwrap +libintl +libiconv
TITLE:=A powerful syslog daemon
URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/
endef
define Package/syslog-ng3/description
syslog-ng reads and logs messages to the system console, log
files, other machines and/or users as specified by its
configuration file.
endef
define Package/syslog-ng3/conffiles
/etc/syslog-ng/syslog-ng.conf
endef
define Build/Configure
$(call Build/Configure/Default, \
--disable-dependency-tracking \
--enable-tcp-wrapper \
--disable-glibtest \
, \
CPPFLAGS="-I$(STAGING_DIR)/usr/include/eventlog $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libintl/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
PKG_CONFIG="$(STAGING_DIR_HOST)/bin/pkg-config" \
)
endef
define Package/syslog-ng3/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/syslog-ng $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
$(INSTALL_DIR) $(1)/etc/syslog-ng
$(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc/syslog-ng/
endef
$(eval $(call BuildPackage,syslog-ng3))

View File

@ -0,0 +1,16 @@
options {
chain_hostnames(off);
sync(0);
# The default action of syslog-ng 1.6.0 is to log a STATS line
# to the file every 10 minutes. That's pretty ugly after a while.
# Change it to every 12 hours so you get a nice daily update of
# how many messages syslog-ng missed (0).
stats(43200);
};
source src { unix-stream("/dev/log"); internal(); };
destination messages { file("/var/log/messages"); };
log { source(src); destination(messages); };

View File

@ -0,0 +1,27 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
start() {
[ -f /etc/syslog-ng/syslog-ng.conf ] || {
echo "/etc/syslog-ng/syslog-ng.conf does not exist !";
exit 0;
};
[ -d /var/run ] || mkdir -p /var/run
[ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng
}
stop() {
killall syslog-ng
}
restart() {
stop
sleep 1
start
}
reload() {
kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null
}