3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=fa3dfcaacf31855626d5b731b04a077f
10 PKG_SOURCE_URL
:=ftp
://ftp.netfilter.org
/pub
/ulogd
/
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 ifneq ($(BR2_PACKAGE_ULOGD_MOD_MYSQL
),)
18 ULOGD_MYSQL_OPTION
:=--with-mysql
=$(STAGING_DIR
)/usr
21 ifneq ($(BR2_PACKAGE_ULOGD_MOD_PGSQL
),)
22 ULOGD_PGSQL_OPTION
:=--with-pgsql
=$(STAGING_DIR
)/usr
25 define IPKG_plugin_template
28 install -m0755
-d
$$(IDIR_
$(1))/usr
/lib
/ulogd
29 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/lib
/ulogd
/ulogd_
$(2).so
$$(IDIR_
$(1))/usr
/lib
/ulogd
/
30 $(RSTRIP
) $$(IDIR_
$(1))
31 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
35 include $(TOPDIR
)/package
/rules.mk
37 $(eval
$(call PKG_template
,ULOGD
,ulogd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
38 $(eval
$(call PKG_template
,ULOGD_MOD_MYSQL
,ulogd-mod-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
39 $(eval
$(call PKG_template
,ULOGD_MOD_PGSQL
,ulogd-mod-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
41 $(eval
$(call IPKG_plugin_template
,ULOGD_MOD_MYSQL
,MYSQL
))
42 $(eval
$(call IPKG_plugin_template
,ULOGD_MOD_PGSQL
,PGSQL
))
44 $(PKG_BUILD_DIR
)/.configured
:
45 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
46 $(TARGET_CONFIGURE_OPTS
) \
47 CFLAGS
="$(TARGET_CFLAGS)" \
48 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
49 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
50 ac_cv_header_pcap_h
=no \
52 --target
=$(GNU_TARGET_NAME
) \
53 --host
=$(GNU_TARGET_NAME
) \
54 --build
=$(GNU_HOST_NAME
) \
60 --datadir=/usr
/share \
61 --includedir=/usr
/include \
62 --infodir=/usr
/share
/info \
64 --libexecdir
=/usr
/lib \
65 --localstatedir
=/var \
66 --mandir=/usr
/share
/man \
69 $(DISABLE_LARGEFILE
) \
73 $(ULOGD_MYSQL_OPTION
) \
74 $(ULOGD_PGSQL_OPTION
) \
78 $(PKG_BUILD_DIR
)/.built
:
79 rm -rf
$(PKG_INSTALL_DIR
)
80 mkdir
-p
$(PKG_INSTALL_DIR
)
81 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
82 DESTDIR
="$(PKG_INSTALL_DIR)" \
87 install -d
-m0755
$(IDIR_ULOGD
)/etc
88 cp
-fpR
$(PKG_INSTALL_DIR
)/etc
/ulogd.conf
$(IDIR_ULOGD
)/etc
/
89 install -d
-m0755
$(IDIR_ULOGD
)/etc
/default
90 install -m0644 .
/files
/ulogd.default
$(IDIR_ULOGD
)/etc
/default
/ulogd
91 install -d
-m0755
$(IDIR_ULOGD
)/etc
/init.d
92 install -m0755 .
/files
/ulogd.init
$(IDIR_ULOGD
)/etc
/init.d
/ulogd
93 install -d
-m0755
$(IDIR_ULOGD
)/usr
/sbin
94 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/ulogd
$(IDIR_ULOGD
)/usr
/sbin
/
95 $(RSTRIP
) $(IDIR_ULOGD
)
96 $(IPKG_BUILD
) $(IDIR_ULOGD
) $(PACKAGE_DIR
)