3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=05b4ed2926b9a22aaeaf642917bbf8ff
10 PKG_SOURCE_URL
:=ftp
://ftp.netfilter.org
/pub
/ulogd
/ \
11 ftp
://ftp.be.netfilter.org
/pub
/netfilter
/ulogd
/ \
12 ftp
://ftp.de.netfilter.org
/pub
/netfilter
/ulogd
/ \
13 ftp
://ftp.no.netfilter.org
/pub
/netfilter
/ulogd
/
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
20 ifneq ($(BR2_PACKAGE_ULOGD_MOD_MYSQL
),)
21 ULOGD_MYSQL_OPTION
:=--with-mysql
=$(STAGING_DIR
)/usr
24 ifneq ($(BR2_PACKAGE_ULOGD_MOD_PCAP
),)
25 ULOGD_PCAP_HEADER
:=yes
30 ifneq ($(BR2_PACKAGE_ULOGD_MOD_PGSQL
),)
31 ULOGD_PGSQL_OPTION
:=--with-pgsql
=$(STAGING_DIR
)/usr
34 ifneq ($(BR2_PACKAGE_ULOGD_MOD_SQLITE
),)
35 ULOGD_SQLITE_OPTION
:=--with-sqlite3
=$(STAGING_DIR
)/usr
38 define IPKG_plugin_template
41 install -m0755
-d
$$(IDIR_
$(1))/usr
/lib
/ulogd
43 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ulogd
/ulogd_
$$$${m}.so
$$(IDIR_
$(1))/usr
/lib
/ulogd
/ ; \
45 $(RSTRIP
) $$(IDIR_
$(1))
46 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
50 include $(TOPDIR
)/package
/rules.mk
52 $(eval
$(call PKG_template
,ULOGD
,ulogd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
53 $(eval
$(call PKG_template
,ULOGD_MOD_MYSQL
,ulogd-mod-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
54 $(eval
$(call PKG_template
,ULOGD_MOD_PCAP
,ulogd-mod-pcap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
55 $(eval
$(call PKG_template
,ULOGD_MOD_PGSQL
,ulogd-mod-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
56 $(eval
$(call PKG_template
,ULOGD_MOD_SQLITE
,ulogd-mod-sqlite
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
57 $(eval
$(call PKG_template
,ULOGD_MOD_EXTRA
,ulogd-mod-extra
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
59 $(eval
$(call IPKG_plugin_template
,ULOGD_MOD_MYSQL
,MYSQL
))
60 $(eval
$(call IPKG_plugin_template
,ULOGD_MOD_PCAP
,PCAP
))
61 $(eval
$(call IPKG_plugin_template
,ULOGD_MOD_PGSQL
,PGSQL
))
62 $(eval
$(call IPKG_plugin_template
,ULOGD_MOD_SQLITE
,SQLITE3
))
63 $(eval
$(call IPKG_plugin_template
,ULOGD_MOD_EXTRA
,LOCAL LOGEMU OPRINT PWSNIFF SYSLOG
))
65 $(PKG_BUILD_DIR
)/.configured
:
66 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
}; \
67 $(TARGET_CONFIGURE_OPTS
) \
68 CFLAGS
="$(TARGET_CFLAGS)" \
69 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
70 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
71 ac_cv_header_pcap_h
=$(ULOGD_PCAP_HEADER
) \
73 --target
=$(GNU_TARGET_NAME
) \
74 --host
=$(GNU_TARGET_NAME
) \
75 --build
=$(GNU_HOST_NAME
) \
81 --datadir=/usr
/share \
82 --includedir=/usr
/include \
83 --infodir=/usr
/share
/info \
85 --libexecdir
=/usr
/lib \
86 --localstatedir
=/var \
87 --mandir=/usr
/share
/man \
90 $(DISABLE_LARGEFILE
) \
94 $(ULOGD_MYSQL_OPTION
) \
95 $(ULOGD_PGSQL_OPTION
) \
96 $(ULOGD_SQLITE_OPTION
) \
100 $(PKG_BUILD_DIR
)/.built
:
101 rm -rf
$(PKG_INSTALL_DIR
)
102 mkdir
-p
$(PKG_INSTALL_DIR
)
103 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
104 DESTDIR
="$(PKG_INSTALL_DIR)" \
105 STAGING_DIR
=$(STAGING_DIR
) \
110 install -d
-m0755
$(IDIR_ULOGD
)/etc
111 $(CP
) $(PKG_INSTALL_DIR
)/etc
/ulogd.conf
$(IDIR_ULOGD
)/etc
/
112 install -d
-m0755
$(IDIR_ULOGD
)/etc
/default
113 install -m0644 .
/files
/ulogd.default
$(IDIR_ULOGD
)/etc
/default
/ulogd
114 install -d
-m0755
$(IDIR_ULOGD
)/etc
/init.d
115 install -m0755 .
/files
/ulogd.init
$(IDIR_ULOGD
)/etc
/init.d
/ulogd
116 ln
-sf ulogd
$(IDIR_ULOGD
)/etc
/init.d
/S49ulogd
117 install -d
-m0755
$(IDIR_ULOGD
)/usr
/lib
/ulogd
118 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/ulogd
/ulogd_BASE.so
$(IDIR_ULOGD
)/usr
/lib
/ulogd
/
119 install -d
-m0755
$(IDIR_ULOGD
)/usr
/sbin
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ulogd
$(IDIR_ULOGD
)/usr
/sbin
/
121 $(RSTRIP
) $(IDIR_ULOGD
)
122 $(IPKG_BUILD
) $(IDIR_ULOGD
) $(PACKAGE_DIR
)