|
@@ -0,0 +1,200 @@
|
|
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:=ulogd
|
|
11
|
+PKG_VERSION:=2.0.4
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
15
|
+PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \
|
|
16
|
+ ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \
|
|
17
|
+ ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \
|
|
18
|
+ ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/
|
|
19
|
+PKG_MD5SUM:=7c71ec460dfea5287eba27472c521ebc
|
|
20
|
+
|
|
21
|
+PKG_LICENSE:=GPL-2.0
|
|
22
|
+PKG_LICENSE_FILE:=COPYING
|
|
23
|
+PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
|
|
24
|
+
|
|
25
|
+PKG_FIXUP:=autoreconf
|
|
26
|
+PKG_INSTALL:=1
|
|
27
|
+
|
|
28
|
+include $(INCLUDE_DIR)/package.mk
|
|
29
|
+
|
|
30
|
+define Package/ulogd/Default
|
|
31
|
+ SECTION:=net
|
|
32
|
+ CATEGORY:=Network
|
|
33
|
+ URL:=http://www.netfilter.org/projects/ulogd/index.html
|
|
34
|
+endef
|
|
35
|
+
|
|
36
|
+define Package/ulogd
|
|
37
|
+ $(call Package/ulogd/Default)
|
|
38
|
+ DEPENDS:=+libmnl +libnfnetlink +libpthread
|
|
39
|
+ TITLE:=Netfilter userspace logging daemon
|
|
40
|
+ MENU:=1
|
|
41
|
+endef
|
|
42
|
+
|
|
43
|
+define Package/ulogd/conffiles
|
|
44
|
+/etc/ulogd.conf
|
|
45
|
+endef
|
|
46
|
+
|
|
47
|
+define Package/ulogd-mod-dbi
|
|
48
|
+ $(call Package/ulogd/Default)
|
|
49
|
+ DEPENDS:=ulogd +libdbi
|
|
50
|
+ TITLE:=Output plugin for logging to a database using libdbi
|
|
51
|
+endef
|
|
52
|
+
|
|
53
|
+define Package/ulogd-mod-mysql
|
|
54
|
+ $(call Package/ulogd/Default)
|
|
55
|
+ DEPENDS:=ulogd +libmysqlclient
|
|
56
|
+ TITLE:=Output plugin for logging to a MySQL database
|
|
57
|
+endef
|
|
58
|
+
|
|
59
|
+define Package/ulogd-mod-nfacct
|
|
60
|
+ $(call Package/ulogd/Default)
|
|
61
|
+ DEPENDS:=ulogd +libnetfilter-acct
|
|
62
|
+ TITLE:=Input plugin for flow-based logging (accounting)
|
|
63
|
+endef
|
|
64
|
+
|
|
65
|
+define Package/ulogd-mod-nfct
|
|
66
|
+ $(call Package/ulogd/Default)
|
|
67
|
+ DEPENDS:=ulogd +libnetfilter-conntrack
|
|
68
|
+ TITLE:=Input plugin for flow-based logging (conntracking)
|
|
69
|
+endef
|
|
70
|
+
|
|
71
|
+define Package/ulogd-mod-nflog
|
|
72
|
+ $(call Package/ulogd/Default)
|
|
73
|
+ DEPENDS:=ulogd +libnetfilter-log
|
|
74
|
+ TITLE:=Input plugin using NFLOG
|
|
75
|
+endef
|
|
76
|
+
|
|
77
|
+define Package/ulogd-mod-pcap
|
|
78
|
+ $(call Package/ulogd/Default)
|
|
79
|
+ DEPENDS:=ulogd +libpcap
|
|
80
|
+ TITLE:=Output plugin for logging in pcap format
|
|
81
|
+endef
|
|
82
|
+
|
|
83
|
+define Package/ulogd-mod-pgsql
|
|
84
|
+ $(call Package/ulogd/Default)
|
|
85
|
+ DEPENDS:=ulogd +libpq
|
|
86
|
+ TITLE:=Output plugin for logging to a PostgreSQL database
|
|
87
|
+endef
|
|
88
|
+
|
|
89
|
+define Package/ulogd-mod-sqlite
|
|
90
|
+ $(call Package/ulogd/Default)
|
|
91
|
+ DEPENDS:=ulogd +libsqlite3
|
|
92
|
+ TITLE:=Output plugin for logging to an SQLite database
|
|
93
|
+endef
|
|
94
|
+
|
|
95
|
+define Package/ulogd-mod-syslog
|
|
96
|
+ $(call Package/ulogd/Default)
|
|
97
|
+ DEPENDS:=ulogd
|
|
98
|
+ TITLE:=Syslog output plugin
|
|
99
|
+endef
|
|
100
|
+
|
|
101
|
+define Package/ulogd-mod-xml
|
|
102
|
+ $(call Package/ulogd/Default)
|
|
103
|
+ DEPENDS:=ulogd +libnetfilter-acct +libnetfilter-conntrack +libnetfilter-log
|
|
104
|
+ TITLE:=XML output plugin
|
|
105
|
+endef
|
|
106
|
+
|
|
107
|
+define Package/ulogd-mod-extra
|
|
108
|
+ $(call Package/ulogd/Default)
|
|
109
|
+ DEPENDS:=ulogd
|
|
110
|
+ TITLE:=Extra plugins
|
|
111
|
+endef
|
|
112
|
+
|
|
113
|
+PKG_BUILD_DEPENDS:=libnetfilter-acct libnetfilter-conntrack libnetfilter-log
|
|
114
|
+
|
|
115
|
+PKG_CONFIG_DEPENDS:= \
|
|
116
|
+ CONFIG_PACKAGE_ulogd-mod-dbi \
|
|
117
|
+ CONFIG_PACKAGE_ulogd-mod-mysql \
|
|
118
|
+ CONFIG_PACKAGE_ulogd-mod-pgsql \
|
|
119
|
+ CONFIG_PACKAGE_ulogd-mod-sqlite \
|
|
120
|
+
|
|
121
|
+CONFIGURE_ARGS += \
|
|
122
|
+ --enable-nfacct \
|
|
123
|
+ --enable-nfct \
|
|
124
|
+ --enable-nflog \
|
|
125
|
+
|
|
126
|
+ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-dbi),)
|
|
127
|
+ CONFIGURE_ARGS += --with-dbi \
|
|
128
|
+ --with-dbi-inc=$(STAGING_DIR)/usr/include/dbi \
|
|
129
|
+ --with-dbi-lib=$(STAGING_DIR)/usr/lib
|
|
130
|
+else
|
|
131
|
+ CONFIGURE_ARGS += --without-dbi
|
|
132
|
+endif
|
|
133
|
+
|
|
134
|
+ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-mysql),)
|
|
135
|
+ CONFIGURE_ARGS += --with-mysql="$(STAGING_DIR)/usr"
|
|
136
|
+else
|
|
137
|
+ CONFIGURE_ARGS += --without-mysql
|
|
138
|
+endif
|
|
139
|
+
|
|
140
|
+ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-pgsql),)
|
|
141
|
+ CONFIGURE_ARGS += --with-pgsql="$(STAGING_DIR)/usr"
|
|
142
|
+else
|
|
143
|
+ CONFIGURE_ARGS += --without-pgsql
|
|
144
|
+endif
|
|
145
|
+
|
|
146
|
+ifneq ($(SDK)$(CONFIG_PACKAGE_ulogd-mod-sqlite),)
|
|
147
|
+ CONFIGURE_ARGS += --with-sqlite="$(STAGING_DIR)/usr"
|
|
148
|
+else
|
|
149
|
+ CONFIGURE_ARGS += --without-sqlite
|
|
150
|
+endif
|
|
151
|
+
|
|
152
|
+define Package/ulogd/install
|
|
153
|
+ $(INSTALL_DIR) $(1)/etc
|
|
154
|
+ $(CP) $(PKG_BUILD_DIR)/ulogd.conf $(1)/etc/
|
|
155
|
+ $(INSTALL_DIR) $(1)/usr/sbin
|
|
156
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ulogd $(1)/usr/sbin/
|
|
157
|
+ $(INSTALL_DIR) $(1)/usr/lib/ulogd
|
|
158
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_raw2packet_BASE.so $(1)/usr/lib/ulogd/
|
|
159
|
+ $(INSTALL_DIR) $(1)/etc/init.d
|
|
160
|
+ $(INSTALL_BIN) ./files/ulogd.init $(1)/etc/init.d/ulogd
|
|
161
|
+endef
|
|
162
|
+
|
|
163
|
+define BuildPlugin
|
|
164
|
+ define Package/ulogd-mod-$(1)/install
|
|
165
|
+ $(INSTALL_DIR) $$(1)/usr/lib/ulogd
|
|
166
|
+ for m in $(2); do \
|
|
167
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_$$$$$$$${m}.so $$(1)/usr/lib/ulogd/ ; \
|
|
168
|
+ done
|
|
169
|
+ endef
|
|
170
|
+ $$(eval $$(call BuildPackage,ulogd-mod-$(1)))
|
|
171
|
+endef
|
|
172
|
+
|
|
173
|
+ULOGD_EXTRA_PLUGINS:= \
|
|
174
|
+ filter_HWHDR \
|
|
175
|
+ filter_IFINDEX \
|
|
176
|
+ filter_IP2BIN \
|
|
177
|
+ filter_IP2HBIN \
|
|
178
|
+ filter_IP2STR \
|
|
179
|
+ filter_MARK \
|
|
180
|
+ filter_PRINTFLOW \
|
|
181
|
+ filter_PRINTPKT \
|
|
182
|
+ filter_PWSNIFF \
|
|
183
|
+ inppkt_UNIXSOCK \
|
|
184
|
+ output_GPRINT \
|
|
185
|
+ output_GRAPHITE \
|
|
186
|
+ output_LOGEMU \
|
|
187
|
+ output_OPRINT \
|
|
188
|
+
|
|
189
|
+$(eval $(call BuildPackage,ulogd))
|
|
190
|
+$(eval $(call BuildPlugin,dbi,output_DBI))
|
|
191
|
+$(eval $(call BuildPlugin,mysql,output_MYSQL))
|
|
192
|
+$(eval $(call BuildPlugin,nfacct,inpflow_NFACCT))
|
|
193
|
+$(eval $(call BuildPlugin,nfct,inpflow_NFCT))
|
|
194
|
+$(eval $(call BuildPlugin,nflog,inppkt_NFLOG))
|
|
195
|
+$(eval $(call BuildPlugin,pcap,output_PCAP))
|
|
196
|
+$(eval $(call BuildPlugin,pgsql,output_PGSQL))
|
|
197
|
+$(eval $(call BuildPlugin,sqlite,output_SQLITE3))
|
|
198
|
+$(eval $(call BuildPlugin,syslog,output_SYSLOG))
|
|
199
|
+$(eval $(call BuildPlugin,xml,output_XML))
|
|
200
|
+$(eval $(call BuildPlugin,extra,$(ULOGD_EXTRA_PLUGINS)))
|