2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=https
://netfilter.org
/projects
/ulogd
/files
/ \
16 ftp
://ftp.netfilter.org
/pub
/ulogd
/
17 PKG_HASH
:=4ead6c3970c3f57fa1e89fe2d7cc483ba6fe2bd1b08701521e0b3afd667df291
19 PKG_MAINTAINER
:=Alexandru Ardelean
<ardeleanalex@gmail.com
>
20 PKG_LICENSE
:=GPL-2.0
-only
21 PKG_LICENSE_FILES
:=COPYING
27 PKG_BUILD_DEPENDS
:=libnetfilter-acct libnetfilter-conntrack libnetfilter-log
28 PKG_CONFIG_DEPENDS
:= \
29 CONFIG_PACKAGE_ulogd-mod-dbi \
30 CONFIG_PACKAGE_ulogd-mod-mysql \
31 CONFIG_PACKAGE_ulogd-mod-pgsql \
32 CONFIG_PACKAGE_ulogd-mod-sqlite
34 include $(INCLUDE_DIR
)/package.mk
36 define Package
/ulogd
/Default
39 URL
:=https
://www.netfilter.org
/projects
/ulogd
/index.html
43 $(call Package
/ulogd
/Default
)
44 DEPENDS
:=+libmnl
+libnfnetlink
+libpthread
+libnetfilter-conntrack
45 TITLE
:=Netfilter userspace logging daemon
49 define Package
/ulogd
/conffiles
53 define Package
/ulogd-mod-dbi
54 $(call Package
/ulogd
/Default
)
55 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-dbi
:libdbi
56 TITLE
:=Output plugin for logging to a database using libdbi
59 define Package
/ulogd-mod-json
60 $(call Package
/ulogd
/Default
)
61 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-json
:jansson
62 TITLE
:=JSON output plugin
65 define Package
/ulogd-mod-mysql
66 $(call Package
/ulogd
/Default
)
67 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-mysql
:libmysqlclient
68 TITLE
:=Output plugin for logging to a MySQL database
71 define Package
/ulogd-mod-nfacct
72 $(call Package
/ulogd
/Default
)
73 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-nfacct
:libnetfilter-acct
74 TITLE
:=Input plugin for flow-based logging
(accounting
)
77 define Package
/ulogd-mod-nfct
78 $(call Package
/ulogd
/Default
)
79 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-nfct
:libnetfilter-conntrack
80 TITLE
:=Input plugin for flow-based logging
(conntracking
)
83 define Package
/ulogd-mod-nflog
84 $(call Package
/ulogd
/Default
)
85 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-nflog
:libnetfilter-log
86 TITLE
:=Input plugin using NFLOG
89 define Package
/ulogd-mod-pcap
90 $(call Package
/ulogd
/Default
)
91 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-pcap
:libpcap
92 TITLE
:=Output plugin for logging in pcap format
95 define Package
/ulogd-mod-pgsql
96 $(call Package
/ulogd
/Default
)
97 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-pgsql
:libpq
98 TITLE
:=Output plugin for logging to a PostgreSQL database
101 define Package
/ulogd-mod-sqlite
102 $(call Package
/ulogd
/Default
)
103 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-sqlite
:libsqlite3
104 TITLE
:=Output plugin for logging to an SQLite database
107 define Package
/ulogd-mod-syslog
108 $(call Package
/ulogd
/Default
)
110 TITLE
:=Syslog output plugin
113 define Package
/ulogd-mod-xml
114 $(call Package
/ulogd
/Default
)
115 DEPENDS
:=ulogd
+PACKAGE_ulogd-mod-xml
:libnetfilter-acct
+PACKAGE_ulogd-mod-xml
:libnetfilter-conntrack
+PACKAGE_ulogd-mod-xml
:libnetfilter-log
116 TITLE
:=XML output plugin
119 define Package
/ulogd-mod-extra
120 $(call Package
/ulogd
/Default
)
130 ifneq ($(DEVELOPER
)$(SDK
)$(CONFIG_PACKAGE_ulogd-mod-dbi
),)
131 CONFIGURE_ARGS
+= --with-dbi \
132 --with-dbi-inc
=$(STAGING_DIR
)/usr
/include/dbi \
133 --with-dbi-lib
=$(STAGING_DIR
)/usr
/lib
135 CONFIGURE_ARGS
+= --without-dbi
138 ifneq ($(DEVELOPER
)$(SDK
)$(CONFIG_PACKAGE_ulogd-mod-mysql
),)
140 --with-mysql-inc
=$(STAGING_DIR
)/usr
/include/mysql \
141 --with-mysql-lib
=$(STAGING_DIR
)/usr
/lib
/mysql
143 CONFIGURE_ARGS
+= --without-mysql
146 ifneq ($(DEVELOPER
)$(SDK
)$(CONFIG_PACKAGE_ulogd-mod-pgsql
),)
147 CONFIGURE_ARGS
+= --with-pgsql
="$(STAGING_DIR)/usr"
149 CONFIGURE_ARGS
+= --without-pgsql
152 ifneq ($(SDK
)$(CONFIG_PACKAGE_ulogd-mod-sqlite
),)
153 CONFIGURE_ARGS
+= --with-sqlite
="$(STAGING_DIR)/usr"
155 CONFIGURE_ARGS
+= --without-sqlite
158 define Package
/ulogd
/install
159 $(INSTALL_DIR
) $(1)/etc
160 $(CP
) $(PKG_BUILD_DIR
)/ulogd.conf
$(1)/etc
/
161 $(INSTALL_DIR
) $(1)/usr
/sbin
162 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ulogd
$(1)/usr
/sbin
/
163 $(INSTALL_DIR
) $(1)/usr
/lib
/ulogd
164 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ulogd
/ulogd_raw2packet_BASE.so
$(1)/usr
/lib
/ulogd
/
165 $(INSTALL_DIR
) $(1)/etc
/init.d
166 $(INSTALL_BIN
) .
/files
/ulogd.init
$(1)/etc
/init.d
/ulogd
170 define Package
/ulogd-mod-
$(1)/install
171 $(INSTALL_DIR
) $$(1)/usr
/lib
/ulogd
173 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ulogd
/ulogd_
$$$$$$$${m}.so
$$(1)/usr
/lib
/ulogd
/ ; \
176 $$(eval
$$(call BuildPackage
,ulogd-mod-
$(1)))
179 ULOGD_EXTRA_PLUGINS
:= \
196 $(eval
$(call BuildPackage
,ulogd
))
197 $(eval
$(call BuildPlugin
,dbi
,output_DBI
))
198 $(eval
$(call BuildPlugin
,json
,output_JSON
))
199 $(eval
$(call BuildPlugin
,mysql
,output_MYSQL
))
200 $(eval
$(call BuildPlugin
,nfacct
,inpflow_NFACCT
))
201 $(eval
$(call BuildPlugin
,nfct
,inpflow_NFCT
))
202 $(eval
$(call BuildPlugin
,nflog
,inppkt_NFLOG
))
203 $(eval
$(call BuildPlugin
,pcap
,output_PCAP
))
204 $(eval
$(call BuildPlugin
,pgsql
,output_PGSQL
))
205 $(eval
$(call BuildPlugin
,sqlite
,output_SQLITE3
))
206 $(eval
$(call BuildPlugin
,syslog
,output_SYSLOG
))
207 $(eval
$(call BuildPlugin
,xml
,output_XML
))
208 $(eval
$(call BuildPlugin
,extra
,$(ULOGD_EXTRA_PLUGINS
)))