blob: c78b1ba1ede21dc539a8684b49db96290a9d28ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
include $(TOPDIR)/rules.mk
PKG_NAME:=syslog-ng
PKG_VERSION:=3.17.2
PKG_RELEASE:=2
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
PKG_HASH:=73601f7ca13c6b534318d5b0648ec1833aa9ca0516d6c3f90085b090d548c50b
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/syslog-ng
SECTION:=admin
CATEGORY:=Administration
DEPENDS:=+libpcre +glib2 +libopenssl +libuuid +libcurl
TITLE:=A powerful syslog daemon
URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/
endef
define Package/syslog-ng/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-ng/conffiles
/etc/syslog-ng.conf
/etc/syslog-ng.d/
endef
define Build/Configure
$(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure
$(Build/Configure/Default)
endef
CONFIGURE_ARGS += \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-dependency-tracking \
--disable-amqp \
--disable-tcp-wrapper \
--disable-glibtest \
--disable-mongodb \
--disable-java \
--disable-json \
--disable-python \
--disable-spoof-source \
--disable-sql \
--disable-linux-caps \
--disable-smtp \
--disable-redis \
--enable-prce \
TARGET_CPPFLAGS += \
-I$(STAGING_DIR)/usr/include/eventlog
CONFIGURE_VARS += \
LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include"
define Package/syslog-ng/install
$(INSTALL_DIR) $(1)/usr/lib
$(MAKE) -C $(PKG_BUILD_DIR) \
install-sbinPROGRAMS install-libLTLIBRARIES \
install-moduleLTLIBRARIES DESTDIR="$(1)"
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
$(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
$(INSTALL_DIR) $(1)/etc/syslog-ng.d/
$(call libtool_remove_files,$(1))
touch $(1)/etc/syslog-ng.d/.keep
endef
define Package/syslog-ng/prerm
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
# wish we had pidof unconditionally
pid=$(ps | grep syslog | grep -v grep | awk '{ print $$1; }')
[ -n "$$pid" ] && /etc/init.d/syslog-ng stop
[ "$${PKG_UPGRADE}" != "1" ] && {
echo "Removing rc.d symlink for syslog-ng"
/etc/init.d/syslog-ng disable
}
fi
exit 0
endef
$(eval $(call BuildPackage,syslog-ng))
|