2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \
17 ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \
18 ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \
19 ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/
20 PKG_MD5SUM:=05b4ed2926b9a22aaeaf642917bbf8ff
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
25 define Package/ulogd/Default
28 URL:=http://gnumonks.org/projects/ulogd
32 $(call Package/ulogd/Default)
34 TITLE:=Netfilter userspace logging daemon
38 define Package/ulogd/conffiles
43 define Package/ulogd-mod-mysql
44 $(call Package/ulogd/Default)
45 DEPENDS:=ulogd +libmysqlclient
46 TITLE:=Output plugin for logging to a MySQL database
49 define Package/ulogd-mod-pcap
50 $(call Package/ulogd/Default)
51 DEPENDS:=ulogd +libpcap
52 TITLE:=Output plugin for logging in pcap format
55 define Package/ulogd-mod-pgsql
56 $(call Package/ulogd/Default)
58 TITLE:=Output plugin for logging to a PostgreSQL database
61 define Package/ulogd-mod-sqlite
62 $(call Package/ulogd/Default)
63 DEPENDS:=ulogd +libsqlite3
64 TITLE:=Output plugin for logging to an SQLite database
67 define Package/ulogd-mod-extra
68 $(call Package/ulogd/Default)
73 define Package/ulogd-mod-extra/description
74 This package contains the LOCAL, LOGEMU, OPRINT, PWSNIFF and SYSLOG plugins.
77 include $(INCLUDE_DIR)/package.mk
79 ifneq ($(Package/ulogd-mod-mysql),)
80 ULOGD_MYSQL_OPTION:= --with-mysql="$(STAGING_DIR)/usr"
83 ifneq ($(Package/ulogd-mod-pcap),)
84 ULOGD_PCAP_HEADER:=yes
89 ifneq ($(Package/ulogd-mod-pgsql),)
90 ULOGD_PGSQL_OPTION:= --with-pgsql="$(STAGING_DIR)/usr"
93 ifneq ($(Package/ulogd-mod-sqlite),)
94 ULOGD_SQLITE_OPTION:= --with-sqlite3="$(STAGING_DIR)/usr"
97 define Build/Configure
98 $(call Build/Configure/Default, \
99 $(ULOGD_MYSQL_OPTION) \
100 $(ULOGD_PGSQL_OPTION) \
101 $(ULOGD_SQLITE_OPTION) \
103 ac_cv_header_pcap_h=$(ULOGD_PCAP_HEADER) \
108 $(MAKE) -C $(PKG_BUILD_DIR) \
109 DESTDIR="$(PKG_INSTALL_DIR)" \
110 CFLAGS="$(TARGET_CFLAGS) \
112 -I$(PKG_BUILD_DIR)/include/ulogd \
113 -I$(PKG_BUILD_DIR)/include \
114 -I$(PKG_BUILD_DIR)/libipulog/include \
115 -I$(STAGING_DIR)/usr/include" \
119 define Package/ulogd/install
120 $(INSTALL_DIR) $(1)/etc
121 $(CP) $(PKG_INSTALL_DIR)/etc/ulogd.conf $(1)/etc/
122 $(INSTALL_DIR) $(1)/usr/sbin
123 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ulogd $(1)/usr/sbin/
124 $(INSTALL_DIR) $(1)/usr/lib/ulogd
125 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_BASE.so $(1)/usr/lib/ulogd/
126 $(INSTALL_DIR) $(1)/etc/default
127 $(INSTALL_DATA) ./files/ulogd.default $(1)/etc/default/ulogd
128 $(INSTALL_DIR) $(1)/etc/init.d
129 $(INSTALL_BIN) ./files/ulogd.init $(1)/etc/init.d/ulogd
133 define Package/$(1)/install
134 $(INSTALL_DIR) $$(1)/usr/lib/ulogd
136 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_$$$$$$$${m}.so $$(1)/usr/lib/ulogd/ ; \
140 $$(eval $$(call BuildPackage,$(1)))
143 $(eval $(call BuildPackage,ulogd))
144 $(eval $(call BuildPlugin,ulogd-mod-mysql,MYSQL))
145 $(eval $(call BuildPlugin,ulogd-mod-pcap,PCAP))
146 $(eval $(call BuildPlugin,ulogd-mod-pgsql,PGSQL))
147 $(eval $(call BuildPlugin,ulogd-mod-sqlite,SQLITE3))
148 $(eval $(call BuildPlugin,ulogd-mod-extra,LOCAL LOGEMU OPRINT PWSNIFF SYSLOG))