Browse Source

net/rsyslog: add new package

Signed-off-by: Dov Murik <dmurik@us.ibm.com>
Dov Murik 9 years ago
parent
commit
7c0b1e07a5
3 changed files with 87 additions and 0 deletions
  1. 57
    0
      net/rsyslog/Makefile
  2. 18
    0
      net/rsyslog/files/rsyslog.conf
  3. 12
    0
      net/rsyslog/files/rsyslog.init

+ 57
- 0
net/rsyslog/Makefile View File

@@ -0,0 +1,57 @@
1
+#
2
+# Copyright (C) 2006-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=rsyslog
11
+PKG_VERSION:=8.14.0
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://www.rsyslog.com/files/download/rsyslog/
16
+PKG_MD5SUM:=9862b08fd8d13753c13d7f9d86ec8f4e
17
+
18
+PKG_MAINTAINER:=Dov Murik <dmurik@us.ibm.com>
19
+PKG_LICENSE:=GPL-3.0
20
+PKG_LICENSE_FILES:=COPYING
21
+
22
+PKG_INSTALL:=1
23
+PKG_FIXUP:=autoreconf
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/rsyslog
28
+  SECTION:=net
29
+  CATEGORY:=Network
30
+  TITLE:=Enhanced system logging and kernel message trapping daemons
31
+  URL:=http://www.rsyslog.com/
32
+  DEPENDS:=+libestr +libjson-c +libuuid +zlib
33
+endef
34
+
35
+define Package/rsyslog/conffiles
36
+/etc/rsyslog.conf
37
+endef
38
+
39
+CONFIGURE_ARGS+= \
40
+	--disable-libgcrypt \
41
+	--disable-liblogging-stdlog
42
+
43
+TARGET_CFLAGS += \
44
+	-std=c99
45
+
46
+define Package/rsyslog/install
47
+	$(INSTALL_DIR) $(1)/usr/sbin
48
+	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/rsyslogd $(1)/usr/sbin/
49
+	$(INSTALL_DIR) $(1)/usr/lib/rsyslog
50
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/rsyslog/* $(1)/usr/lib/rsyslog/
51
+	$(INSTALL_DIR) $(1)/etc
52
+	$(INSTALL_CONF) ./files/rsyslog.conf $(1)/etc
53
+	$(INSTALL_DIR) $(1)/etc/init.d
54
+	$(INSTALL_BIN) ./files/rsyslog.init $(1)/etc/init.d/rsyslog
55
+endef
56
+
57
+$(eval $(call BuildPackage,rsyslog))

+ 18
- 0
net/rsyslog/files/rsyslog.conf View File

@@ -0,0 +1,18 @@
1
+module(load="imuxsock")
2
+module(load="imklog")
3
+module(load="imudp")
4
+input(type="imudp" port="514")
5
+#module(load="imtcp")
6
+#input(type="imtcp" port="514")
7
+
8
+$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
9
+
10
+*.info;mail.none;authpriv.none;cron.none  /var/log/messages
11
+
12
+authpriv.*                                /var/log/secure
13
+
14
+mail.*                                    /var/log/maillog
15
+
16
+cron.*                                    /var/log/cron
17
+
18
+local7.*                                  /var/log/boot.log

+ 12
- 0
net/rsyslog/files/rsyslog.init View File

@@ -0,0 +1,12 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2014 OpenWrt.org
3
+
4
+START=20
5
+
6
+USE_PROCD=1
7
+
8
+start_service() {
9
+	procd_open_instance
10
+	procd_set_param command /usr/sbin/rsyslogd
11
+	procd_close_instance
12
+}