summaryrefslogtreecommitdiff
path: root/package/pmacct
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-05-30 20:39:07 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-05-30 20:39:07 +0200
commitba3359722cbf8aa7b0ed39e1f81d1d74ec88fecd (patch)
tree10c726d162bc0ded85eb7aeacf8f246bd39ad63a /package/pmacct
parentbbd610f15a71b27c955175cb98392b114717fd47 (diff)
optimize ipkg package management
- generate ipkg control file from PKG_* variables - automatically install init scripts from ./files/*.init set #PKG pkgname to set the binary package - rename FWINIT -> INIT - move postinst and conffiles meta data to ./files - update the packages to the latest upstream version - remove some unready or unused package (strongswan,..) more cleanups needed after allmodconfig
Diffstat (limited to 'package/pmacct')
-rw-r--r--package/pmacct/Config.in191
-rw-r--r--package/pmacct/Makefile187
-rw-r--r--package/pmacct/files/nfacctd.conffiles (renamed from package/pmacct/ipkg/nfacctd.conffiles)0
-rw-r--r--package/pmacct/files/nfacctd.init4
-rw-r--r--package/pmacct/files/nfacctd.postinst (renamed from package/pmacct/ipkg/nfacctd.postinst)0
-rw-r--r--package/pmacct/files/pmacctd.conffiles (renamed from package/pmacct/ipkg/pmacctd.conffiles)0
-rw-r--r--package/pmacct/files/pmacctd.init4
-rw-r--r--package/pmacct/files/pmacctd.postinst (renamed from package/pmacct/ipkg/pmacctd.postinst)0
-rw-r--r--package/pmacct/ipkg/nfacctd-custom.control6
-rw-r--r--package/pmacct/ipkg/nfacctd-mysql.control6
-rw-r--r--package/pmacct/ipkg/nfacctd-pgsql.control6
-rw-r--r--package/pmacct/ipkg/nfacctd-sqlite.control6
-rw-r--r--package/pmacct/ipkg/nfacctd.control6
-rw-r--r--package/pmacct/ipkg/pmacct-client.control5
-rw-r--r--package/pmacct/ipkg/pmacctd-custom.control6
-rw-r--r--package/pmacct/ipkg/pmacctd-mysql.control6
-rw-r--r--package/pmacct/ipkg/pmacctd-pgsql.control6
-rw-r--r--package/pmacct/ipkg/pmacctd-sqlite.control6
-rw-r--r--package/pmacct/ipkg/pmacctd.control6
-rw-r--r--package/pmacct/patches/patch-src_nfprobe_plugin_netflow9_c45
20 files changed, 91 insertions, 405 deletions
diff --git a/package/pmacct/Config.in b/package/pmacct/Config.in
index 9a4e1f6d0..ef1e85a41 100644
--- a/package/pmacct/Config.in
+++ b/package/pmacct/Config.in
@@ -1,200 +1,31 @@
config ADK_COMPILE_PMACCT
tristate
default n
- depends ADK_COMPILE_PMACCT_BASIC || ADK_COMPILE_PMACCT_MYSQL || ADK_COMPILE_PMACCT_PGSQL || ADK_COMPILE_PMACCT_SQLITE || ADK_COMPILE_PMACCT_CUSTOM || ADK_PACKAGE_PMACCT_CLIENT
+ depends ADK_PACKAGE_PMACCTD || ADK_PACKAGE_PMACCT_CLIENT || ADK_PACKAGE_SFACCTD || ADK_PACKAGE_NFACCTD
-config ADK_COMPILE_PMACCT_BASIC
+config ADK_PACKAGE_PMACCTD
+ prompt "pmacctd....................... IP accounting daemon (libpcap based)"
tristate
default n
- depends ADK_PACKAGE_NFACCTD_BASIC || ADK_PACKAGE_PMACCTD_BASIC
- select ADK_COMPILE_PMACCT
-
-config ADK_COMPILE_PMACCT_MYSQL
- tristate
- default n
- depends ADK_PACKAGE_NFACCTD_MYSQL || ADK_PACKAGE_PMACCTD_MYSQL
- select ADK_COMPILE_PMACCT
-
-config ADK_COMPILE_PMACCT_PGSQL
- tristate
- default n
- depends ADK_PACKAGE_NFACCTD_PGSQL || ADK_PACKAGE_PMACCTD_PGSQL
- select ADK_COMPILE_PMACCT
-
-config ADK_COMPILE_PMACCT_SQLITE
- tristate
- default n
- depends ADK_PACKAGE_NFACCTD_SQLITE || ADK_PACKAGE_PMACCTD_SQLITE
- select ADK_COMPILE_PMACCT
-
-config ADK_COMPILE_PMACCT_CUSTOM
- tristate
- default n
- depends ADK_PACKAGE_NFACCTD_CUSTOM || ADK_PACKAGE_PMACCTD_CUSTOM
- select ADK_COMPILE_PMACCT
-
-config ADK_SHOW_PMACCT
- bool "pmacct/nfacct..................... IPv4/IPv6 accounting and aggregation tools"
-
-config ADK_SHOW_NFACCTD
- prompt "nfacctd......................... NetFlow accounting daemon"
- bool
- default n
- depends ADK_SHOW_PMACCT
help
-
- An IPv4/IPv6 Netflow accounting and aggregation daemon
-
- http://www.ba.cnr.it/~paolo/pmacct/
-
- Depends:
- - libmysqlclient (for MySQL database logging support)
- - libpq (for PostgreSQL database logging support)
- - libsqlite (for SQLite database logging support)
-
-
-config ADK_PACKAGE_NFACCTD_BASIC
- prompt "nfacctd....................... built without database support"
- tristate
- select ADK_COMPILE_PMACCT_BASIC
- select ADK_PACKAGE_LIBPCAP
- depends ADK_SHOW_NFACCTD
-
-config ADK_PACKAGE_NFACCTD_MYSQL
- prompt "nfacctd-mysql................. built with MySQL database support"
- tristate
- select ADK_COMPILE_PMACCT_MYSQL
- select ADK_PACKAGE_LIBPCAP
- select ADK_PACKAGE_LIBMYSQLCLIENT
- depends ADK_SHOW_NFACCTD
-
-config ADK_PACKAGE_NFACCTD_PGSQL
- prompt "nfacctd-pgsql................. built with PostgreSQL database support"
- tristate
- select ADK_COMPILE_PMACCT_PGSQL
- select ADK_PACKAGE_LIBPCAP
- select ADK_PACKAGE_LIBPQ
- depends ADK_SHOW_NFACCTD
-
-config ADK_PACKAGE_NFACCTD_SQLITE
- prompt "nfacctd-sqlite................ built with SQLite database support"
- tristate
- select ADK_COMPILE_PMACCT_SQLITE
- select ADK_PACKAGE_LIBPCAP
- select ADK_PACKAGE_LIBSQLITE
- depends ADK_SHOW_NFACCTD
+ An IPv4/IPv6 libpcap-based accounting and aggregation daemon
-config ADK_PACKAGE_NFACCTD_CUSTOM
- prompt "nfacctd-custom................ customized to your needs"
+config ADK_PACKAGE_NFACCTD
+ prompt "nfacctd....................... Netflow accounting and aggregation daemon"
tristate
- select ADK_COMPILE_PMACCT_CUSTOM
select ADK_PACKAGE_LIBPCAP
- depends ADK_SHOW_NFACCTD
-
-config ADK_COMPILE_NFACCTD_WITH_MYSQL
- prompt "MySQL database support"
- bool
- default n
- depends ADK_PACKAGE_NFACCTD_CUSTOM
- select ADK_PACKAGE_LIBMYSQLCLIENT
-
-config ADK_COMPILE_NFACCTD_WITH_PGSQL
- prompt "PostgreSQL database support"
- bool
- default n
- depends ADK_PACKAGE_NFACCTD_CUSTOM
- select ADK_PACKAGE_LIBPQ
-
-config ADK_COMPILE_NFACCTD_WITH_SQLITE
- prompt "SQLite database support"
- bool
- default n
- depends ADK_PACKAGE_NFACCTD_CUSTOM
- select ADK_PACKAGE_LIBSQLITE
-
-
-config ADK_SHOW_PMACCTD
- prompt "pmacctd......................... IP accounting daemon (libpcap based)"
- bool
- default n
- depends ADK_SHOW_PMACCT
help
-
An IPv4/IPv6 libpcap-based accounting and aggregation daemon
-
- http://www.ba.cnr.it/~paolo/pmacct/
-
- Depends:
- - libpcap
- - libmysqlclient (for MySQL database logging support)
- - libpq (for PostgreSQL database logging support)
- - libsqlite (for SQLite database logging support)
-
-
-config ADK_PACKAGE_PMACCTD_BASIC
- prompt "pmacctd....................... built without database support"
- tristate
- select ADK_COMPILE_PMACCT_BASIC
- select ADK_PACKAGE_LIBPCAP
- depends ADK_SHOW_PMACCTD
-
-config ADK_PACKAGE_PMACCTD_MYSQL
- prompt "pmacctd-mysql................. built with MySQL database support"
- tristate
- select ADK_COMPILE_PMACCT_MYSQL
- select ADK_PACKAGE_LIBPCAP
- select ADK_PACKAGE_LIBMYSQLCLIENT
- depends ADK_SHOW_PMACCTD
-
-config ADK_PACKAGE_PMACCTD_PGSQL
- prompt "pmacctd-pgsql................. built with PostgreSQL database support"
- tristate
- select ADK_COMPILE_PMACCT_PGSQL
- select ADK_PACKAGE_LIBPCAP
- select ADK_PACKAGE_LIBPQ
- depends ADK_SHOW_PMACCTD
-
-config ADK_PACKAGE_PMACCTD_SQLITE
- prompt "pmacctd-sqlite................ built with SQLite database support"
- tristate
- select ADK_COMPILE_PMACCT_SQLITE
- select ADK_PACKAGE_LIBPCAP
- select ADK_PACKAGE_LIBSQLITE
- depends ADK_SHOW_PMACCTD
-config ADK_PACKAGE_PMACCTD_CUSTOM
- prompt "pmacctd-custom................ customized to your needs"
+config ADK_PACKAGE_SFACCTD
+ prompt "sfacctd....................... sFlow accounting and aggregation daemon"
tristate
- select ADK_COMPILE_PMACCT_CUSTOM
select ADK_PACKAGE_LIBPCAP
- depends ADK_SHOW_PMACCTD
-
-config ADK_COMPILE_PMACCTD_WITH_MYSQL
- prompt "MySQL database support"
- bool
- default n
- depends ADK_PACKAGE_PMACCTD_CUSTOM
- select ADK_PACKAGE_LIBMYSQLCLIENT
-
-config ADK_COMPILE_PMACCTD_WITH_PGSQL
- prompt "PostgreSQL database support"
- bool
- default n
- depends ADK_PACKAGE_PMACCTD_CUSTOM
- select ADK_PACKAGE_LIBPQ
-
-config ADK_COMPILE_PMACCTD_WITH_SQLITE
- prompt "SQLite database support"
- bool
- default n
- depends ADK_PACKAGE_PMACCTD_CUSTOM
- select ADK_PACKAGE_LIBSQLITE
-
+ help
+ An IPv4/IPv6 libpcap-based accounting and aggregation daemon
config ADK_PACKAGE_PMACCT_CLIENT
prompt "pmacct-client................... Command-line client to gather data from the IMT plugin"
tristate
default n
- select ADK_COMPILE_PMACCT
- depends ADK_SHOW_PMACCT
-
+ help
diff --git a/package/pmacct/Makefile b/package/pmacct/Makefile
index 8fc8e86f2..bd300dd9e 100644
--- a/package/pmacct/Makefile
+++ b/package/pmacct/Makefile
@@ -6,166 +6,37 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= pmacct
-PKG_VERSION:= 0.10.0
-PKG_RELEASE:= 14
-PKG_MD5SUM:= ed510e7ee2130d1f37f27901b89e985a
-
-MASTER_SITES:= http://www.ba.cnr.it/~paolo/pmacct/
-DISTFILES:= $(PKG_NAME)-$(PKG_VERSION)rc2.tar.gz
+PKG_VERSION:= 0.11.6
+PKG_RELEASE:= 1
+PKG_MD5SUM:= e0f3bcba9a73b7a70bbf5a303cd22f77
+PKG_DESCR:= IP accounting daemons
+PKG_SECTION:= net
+PKG_DEPENDS:= libpcap
+PKG_URL:= http://www.pmacct.net
+PKG_SITES:= http://www.pmacct.net/
include $(TOPDIR)/mk/package.mk
-PMACCT_CLIENT_OPTS:= \
-
-PMACCT_BASIC_CONFIGURE_OPTS:= \
-
-PMACCT_MYSQL_CONFIGURE_OPTS:= \
- --enable-mysql \
- --with-mysql-includes="$(STAGING_DIR)/usr/include" \
- --with-mysql-libs="$(STAGING_DIR)/usr/lib/mysql"
-
-PMACCT_PGSQL_CONFIGURE_OPTS:= \
- --enable-pgsql \
- --with-pgsql-includes="$(STAGING_DIR)/usr/include" \
- --with-pgsql-libs="$(STAGING_DIR)/usr/lib"
-
-PMACCT_SQLITE_CONFIGURE_OPTS:= \
- --enable-sqlite3 \
- --with-sqlite3-includes="$(STAGING_DIR)/usr/include" \
- --with-sqlite3-libs="$(STAGING_DIR)/usr/lib"
-
-NFACCTD_CUSTOM_CONFIGURE_OPTS:= \
-
-ifeq ($(ADK_PACKAGE_NFACCTD_WITH_MYSQL),y)
-NFACCTD_CUSTOM_CONFIGURE_OPTS+= $(PMACCT_MYSQL_CONFIGURE_OPTS)
-endif
-
-ifeq ($(ADK_PACKAGE_NFACCTD_WITH_PGSQL),y)
-NFACCTD_CUSTOM_CONFIGURE_OPTS+= $(PMACCT_PGSQL_CONFIGURE_OPTS)
-endif
-
-ifeq ($(ADK_PACKAGE_NFACCTD_WITH_SQLITE),y)
-NFACCTD_CUSTOM_CONFIGURE_OPTS+= $(PMACCT_SQLITE_CONFIGURE_OPTS)
-endif
-
-PMACCTD_CUSTOM_CONFIGURE_OPTS:= \
-
-ifeq ($(ADK_PACKAGE_PMACCTD_WITH_MYSQL),y)
-PMACCTD_CUSTOM_CONFIGURE_OPTS+= $(PMACCT_MYSQL_CONFIGURE_OPTS)
-endif
-
-ifeq ($(ADK_PACKAGE_PMACCTD_WITH_PGSQL),y)
-PMACCTD_CUSTOM_CONFIGURE_OPTS+= $(PMACCT_PGSQL_CONFIGURE_OPTS)
-endif
-
-ifeq ($(ADK_PACKAGE_PMACCTD_WITH_SQLITE),y)
-PMACCTD_CUSTOM_CONFIGURE_OPTS+= $(PMACCT_SQLITE_CONFIGURE_OPTS)
-endif
-
-define PKG_build
-
-ifneq ($(ADK_PACKAGE_$(1)),)
-BUILD_TARGETS+= $(WRKBUILD)/$(2)
-BUILD_TARGETS+= $(WRKBUILD)/$(3)
-endif
-
-$(WRKBUILD)/$(2) $(WRKBUILD)/$(3): $(WRKBUILD)/.prepared
- -$(MAKE) -C $(WRKBUILD) distclean
- (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
- $(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS)" \
- CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
- LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --program-prefix="" \
- --program-suffix="" \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/sbin \
- --datadir=/usr/share \
- --includedir=/usr/include \
- --infodir=/usr/share/info \
- --libdir=/usr/lib \
- --libexecdir=/usr/lib/locate \
- --localstatedir=/var/lib \
- --mandir=/usr/share/man \
- --sbindir=/usr/sbin \
- --sysconfdir=/etc \
- --disable-nls \
- --enable-shared \
- --disable-static \
- --with-pcap-includes="$(STAGING_DIR)/usr/include" \
- --with-pcap-libs="$(STAGING_DIR)/usr/lib" \
- $$($(1)_CONFIGURE_OPTS) \
- );
- $(MAKE) -C $(WRKBUILD) \
- $(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include"
- mv -f $(WRKBUILD)/nfacctd $(WRKBUILD)/$(2)
- mv -f $(WRKBUILD)/pmacctd $(WRKBUILD)/$(3)
-
-endef
-
-define PKG_package
-
-$$(IPKG_$(1)): $(WRKBUILD)/$(2)
- install -d -m0755 $$(IDIR_$(1))/etc
- install -m0644 ./files/$(3).conf $$(IDIR_$(1))/etc/
- #install -d -m0755 $$(IDIR_$(1))/etc/default
- #install -m0644 ./files/$(3).default $$(IDIR_$(1))/etc/default/$(3)
- install -d -m0755 $$(IDIR_$(1))/etc/init.d
- install -m0755 ./files/$(3).init $$(IDIR_$(1))/etc/init.d/$(3)
- install -d -m0755 $$(IDIR_$(1))/usr/sbin
- install -m0755 $(WRKBUILD)/$(2) $$(IDIR_$(1))/usr/sbin/$(3)
- $(RSTRIP) $$(IDIR_$(1))
- $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
-
-endef
-
-$(eval $(call PKG_template,NFACCTD_BASIC,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,NFACCTD_MYSQL,nfacctd-mysql,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,NFACCTD_PGSQL,nfacctd-pgsql,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,NFACCTD_SQLITE,nfacctd-sqlite,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,NFACCTD_CUSTOM,nfacctd-custom,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,PMACCTD_BASIC,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,PMACCTD_MYSQL,pmacctd-mysql,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,PMACCTD_PGSQL,pmacctd-pgsql,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,PMACCTD_SQLITE,pmacctd-sqlite,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,PMACCTD_CUSTOM,pmacctd-custom,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,PMACCT_CLIENT,pmacct-client,$(PKG_VERSION)-$(PKG_RELEASE)))
-
-$(eval $(call PKG_build,PMACCT_CLIENT,nfacctd-basic,pmacctd-basic,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_build,PMACCT_BASIC,nfacctd-basic,pmacctd-basic,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_build,PMACCT_MYSQL,nfacctd-mysql,pmacctd-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_build,PMACCT_PGSQL,nfacctd-pgsql,pmacctd-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_build,PMACCT_SQLITE,nfacctd-sqlite,pmacctd-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_build,NFACCTD_CUSTOM,nfacctd-custom,pmacctd-dummy,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_build,PMACCTD_CUSTOM,nfacctd-dummy,pmacctd-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-
-$(eval $(call PKG_package,NFACCTD_BASIC,nfacctd-basic,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_package,NFACCTD_MYSQL,nfacctd-mysql,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_package,NFACCTD_PGSQL,nfacctd-pgsql,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_package,NFACCTD_SQLITE,nfacctd-sqlite,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_package,NFACCTD_CUSTOM,nfacctd-custom,nfacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_package,PMACCTD_BASIC,pmacctd-basic,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_package,PMACCTD_MYSQL,pmacctd-mysql,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_package,PMACCTD_PGSQL,pmacctd-pgsql,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_package,PMACCTD_SQLITE,pmacctd-sqlite,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(eval $(call PKG_package,PMACCTD_CUSTOM,pmacctd-custom,pmacctd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-
-$(WRKBUILD)/.configured:
- touch $@
-
-$(WRKBUILD)/.built: $(BUILD_TARGETS)
- touch $@
-
-$(IPKG_PMACCT_CLIENT):
- install -d -m0755 $(IDIR_PMACCT_CLIENT)/usr/sbin
- $(CP) $(WRKBUILD)/pmacct $(IDIR_PMACCT_CLIENT)/usr/sbin/
- $(RSTRIP) $(IDIR_PMACCT_CLIENT)
- $(IPKG_BUILD) $(IDIR_PMACCT_CLIENT) $(PACKAGE_DIR)
+$(eval $(call PKG_template,NFACCTD,nfacctd,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,PMACCTD,pmacctd,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,SFACCTD,sfacctd,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,PMACCT_CLIENT,pmacct-client,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_ENV+= --with-pcap-includes="$(STAGING_DIR)/usr/include" \
+ --with-pcap-libs="$(STAGING_DIR)/usr/lib"
+CONFIGURE_STYLE:= gnu
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
+
+
+post-install:
+ ${INSTALL_DIR} $(IDIR_SFACCTD)/usr/sbin
+ ${INSTALL_BIN} $(WRKINST)/usr/sbin/sfacctd $(IDIR_SFACCTD)/usr/sbin/
+ ${INSTALL_DIR} $(IDIR_NFACCTD)/usr/sbin
+ ${INSTALL_BIN} $(WRKINST)/usr/sbin/nfacctd $(IDIR_NFACCTD)/usr/sbin/
+ ${INSTALL_DIR} $(IDIR_PMACCTD)/usr/sbin
+ ${INSTALL_BIN} $(WRKINST)/usr/sbin/pmacctd $(IDIR_PMACCTD)/usr/sbin/
+ ${INSTALL_DIR} $(IDIR_PMACCT_CLIENT)/usr/bin
+ ${INSTALL_BIN} $(WRKINST)/usr/bin/pmacct $(IDIR_PMACCT_CLIENT)/usr/bin/
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/pmacct/ipkg/nfacctd.conffiles b/package/pmacct/files/nfacctd.conffiles
index 88dba6572..88dba6572 100644
--- a/package/pmacct/ipkg/nfacctd.conffiles
+++ b/package/pmacct/files/nfacctd.conffiles
diff --git a/package/pmacct/files/nfacctd.init b/package/pmacct/files/nfacctd.init
index 2d0072bf5..3e768474d 100644
--- a/package/pmacct/files/nfacctd.init
+++ b/package/pmacct/files/nfacctd.init
@@ -1,5 +1,7 @@
#!/bin/sh
-#FWINIT 80
+#PKG nfacctd
+#INIT 80
+
. /etc/rc.conf
case $1 in
diff --git a/package/pmacct/ipkg/nfacctd.postinst b/package/pmacct/files/nfacctd.postinst
index 0b382cf0f..0b382cf0f 100644
--- a/package/pmacct/ipkg/nfacctd.postinst
+++ b/package/pmacct/files/nfacctd.postinst
diff --git a/package/pmacct/ipkg/pmacctd.conffiles b/package/pmacct/files/pmacctd.conffiles
index ce1303ff9..ce1303ff9 100644
--- a/package/pmacct/ipkg/pmacctd.conffiles
+++ b/package/pmacct/files/pmacctd.conffiles
diff --git a/package/pmacct/files/pmacctd.init b/package/pmacct/files/pmacctd.init
index 5cde04ba7..2e9a01dd1 100644
--- a/package/pmacct/files/pmacctd.init
+++ b/package/pmacct/files/pmacctd.init
@@ -1,5 +1,7 @@
#!/bin/sh
-#FWINIT 80
+#PKG pmacctd
+#INIT 80
+
. /etc/rc.conf
case $1 in
diff --git a/package/pmacct/ipkg/pmacctd.postinst b/package/pmacct/files/pmacctd.postinst
index 49cde0f8e..49cde0f8e 100644
--- a/package/pmacct/ipkg/pmacctd.postinst
+++ b/package/pmacct/files/pmacctd.postinst
diff --git a/package/pmacct/ipkg/nfacctd-custom.control b/package/pmacct/ipkg/nfacctd-custom.control
deleted file mode 100644
index 096be7e04..000000000
--- a/package/pmacct/ipkg/nfacctd-custom.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: nfacctd-custom
-Priority: optional
-Section: net
-Description: a NetFlow accounting daemon,
- built with custom options
-Depends: libpcap
diff --git a/package/pmacct/ipkg/nfacctd-mysql.control b/package/pmacct/ipkg/nfacctd-mysql.control
deleted file mode 100644
index e030db8fc..000000000
--- a/package/pmacct/ipkg/nfacctd-mysql.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: nfacctd-mysql
-Priority: optional
-Section: net
-Description: a NetFlow accounting daemon,
- built with MySQL database support
-Depends: libmysqlclient, libpcap
diff --git a/package/pmacct/ipkg/nfacctd-pgsql.control b/package/pmacct/ipkg/nfacctd-pgsql.control
deleted file mode 100644
index 8500ff342..000000000
--- a/package/pmacct/ipkg/nfacctd-pgsql.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: nfacctd-pgsql
-Priority: optional
-Section: net
-Description: a NetFlow accounting daemon,
- built with PostgreSQL database support
-Depends: libpq, libpcap
diff --git a/package/pmacct/ipkg/nfacctd-sqlite.control b/package/pmacct/ipkg/nfacctd-sqlite.control
deleted file mode 100644
index add839416..000000000
--- a/package/pmacct/ipkg/nfacctd-sqlite.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: nfacctd-sqlite
-Priority: optional
-Section: net
-Description: a NetFlow accounting daemon,
- built with SQLite database support
-Depends: libsqlite, libpcap
diff --git a/package/pmacct/ipkg/nfacctd.control b/package/pmacct/ipkg/nfacctd.control
deleted file mode 100644
index e5afbf68d..000000000
--- a/package/pmacct/ipkg/nfacctd.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: nfacctd
-Priority: optional
-Section: net
-Description: a NetFlow accounting daemon,
- built without database support
-Depends: libpcap
diff --git a/package/pmacct/ipkg/pmacct-client.control b/package/pmacct/ipkg/pmacct-client.control
deleted file mode 100644
index c943e731e..000000000
--- a/package/pmacct/ipkg/pmacct-client.control
+++ /dev/null
@@ -1,5 +0,0 @@
-Package: pmacct-client
-Priority: optional
-Section: net
-Description: a command-line client for pmacctd or nfacctd,
- used to retrieve data from an active memory plugin
diff --git a/package/pmacct/ipkg/pmacctd-custom.control b/package/pmacct/ipkg/pmacctd-custom.control
deleted file mode 100644
index 0278df142..000000000
--- a/package/pmacct/ipkg/pmacctd-custom.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: pmacctd-custom
-Priority: optional
-Section: net
-Description: an IP accounting daemon,
- built with custom options
-Depends: libpcap
diff --git a/package/pmacct/ipkg/pmacctd-mysql.control b/package/pmacct/ipkg/pmacctd-mysql.control
deleted file mode 100644
index 2ea345fcb..000000000
--- a/package/pmacct/ipkg/pmacctd-mysql.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: pmacctd-mysql
-Priority: optional
-Section: net
-Description: an IP accounting daemon,
- built with MySQL database support
-Depends: libmysqlclient, libpcap
diff --git a/package/pmacct/ipkg/pmacctd-pgsql.control b/package/pmacct/ipkg/pmacctd-pgsql.control
deleted file mode 100644
index 7018c7350..000000000
--- a/package/pmacct/ipkg/pmacctd-pgsql.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: pmacctd-pgsql
-Priority: optional
-Section: net
-Description: an IP accounting daemon,
- built with PostgreSQL database support
-Depends: libpq, libpcap
diff --git a/package/pmacct/ipkg/pmacctd-sqlite.control b/package/pmacct/ipkg/pmacctd-sqlite.control
deleted file mode 100644
index ad8f7c96f..000000000
--- a/package/pmacct/ipkg/pmacctd-sqlite.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: pmacctd-sqlite
-Priority: optional
-Section: net
-Description: an IP accounting daemon,
- built with SQLite database support
-Depends: libsqlite, libpcap
diff --git a/package/pmacct/ipkg/pmacctd.control b/package/pmacct/ipkg/pmacctd.control
deleted file mode 100644
index 5d2cc7c4e..000000000
--- a/package/pmacct/ipkg/pmacctd.control
+++ /dev/null
@@ -1,6 +0,0 @@
-Package: pmacctd
-Priority: optional
-Section: net
-Description: an IP accounting daemon,
- built without database support
-Depends: libpcap
diff --git a/package/pmacct/patches/patch-src_nfprobe_plugin_netflow9_c b/package/pmacct/patches/patch-src_nfprobe_plugin_netflow9_c
new file mode 100644
index 000000000..4787952fb
--- /dev/null
+++ b/package/pmacct/patches/patch-src_nfprobe_plugin_netflow9_c
@@ -0,0 +1,45 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- pmacct-0.11.6.orig/src/nfprobe_plugin/netflow9.c 2007-02-12 23:00:40.000000000 +0100
++++ pmacct-0.11.6/src/nfprobe_plugin/netflow9.c 2009-05-30 16:28:41.207303809 +0200
+@@ -298,8 +298,8 @@ nf9_init_template(void)
+ */
+
+ rcount = 0;
+- bzero(&v4_template, sizeof(v4_template));
+- bzero(&v4_int_template, sizeof(v4_int_template));
++ memset(&v4_template, 0, sizeof(v4_template));
++ memset(&v4_int_template, 0, sizeof(v4_int_template));
+
+ v4_template.r[rcount].type = htons(NF9_LAST_SWITCHED);
+ v4_template.r[rcount].length = htons(4);
+@@ -443,8 +443,8 @@ nf9_init_template(void)
+ v4_int_template.tot_rec_len += v4_int_template.r[idx].length;
+
+ rcount = 0;
+- bzero(&v6_template, sizeof(v6_template));
+- bzero(&v6_int_template, sizeof(v6_int_template));
++ memset(&v6_template, 0, sizeof(v6_template));
++ memset(&v6_int_template, 0, sizeof(v6_int_template));
+
+ v6_template.r[rcount].type = htons(NF9_LAST_SWITCHED);
+ v6_template.r[rcount].length = htons(4);
+@@ -598,8 +598,8 @@ nf_flow_to_flowset(const struct FLOW *fl
+ char *ftoft_ptr_0 = ftoft_buf_0;
+ char *ftoft_ptr_1 = ftoft_buf_1;
+
+- bzero(ftoft_buf_0, sizeof(ftoft_buf_0));
+- bzero(ftoft_buf_1, sizeof(ftoft_buf_1));
++ memset(ftoft_buf_0, 0, sizeof(ftoft_buf_0));
++ memset(ftoft_buf_1, 0, sizeof(ftoft_buf_1));
+ *len_used = nflows = ret_len = 0;
+
+ rec32 = htonl(timeval_sub_ms(&flow->flow_last, system_boot_time));
+@@ -707,7 +707,7 @@ send_netflow_v9(struct FLOW **flows, int
+
+ last_valid = num_packets = 0;
+ for (j = 0; j < num_flows;) {
+- bzero(packet, sizeof(packet));
++ memset(packet, 0, sizeof(packet));
+ nf9 = (struct NF9_HEADER *)packet;
+
+ nf9->version = htons(9);