Skip to contentSkip to conversation

bandwidthd: new package

PATCH Superseded Nathaniel Roach 1 participant 2 messages Jul 29, 2014

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bandwidthd: new package

---
 package/Config.in                |  1 +
 package/bandwidthd/Config.in     | 48 ++++++++++++++++++++++++++++++++++++++++
 package/bandwidthd/bandwidthd.mk | 32 +++++++++++++++++++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 package/bandwidthd/Config.in
 create mode 100644 package/bandwidthd/bandwidthd.mk
package/Config.in +1 -0
index 11087da..0d7e1e8 100644
@@ -938,6 +938,7 @@ menu "Networking applications"
 	source "package/autossh/Config.in"
 	source "package/avahi/Config.in"
 	source "package/axel/Config.in"
+	source "package/bandwidthd/Config.in"
 	source "package/bcusdk/Config.in"
 	source "package/bind/Config.in"
 	source "package/bluez_utils/Config.in"
package/bandwidthd/Config.in new file +48 -0

48 lines not on this page · raw message

package/bandwidthd/bandwidthd.mk new file +32 -0
new file mode 100644
index 0000000..8ad634e
@@ -0,0 +1,32 @@
+################################################################################
+#
+# bandwidthd
+#
+################################################################################
+
+BANDWIDTHD_VERSION = v2.0.1-auto-r06
+BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION))
+
+#Specified as "any version of the GPL that is current as of your download."
+# by upstream.
+BANDWIDTHD_LICENSE = GPL
+
+BANDWIDTHD_DEPENDENCIES += gd libpng libpcap
+
+BANDWIDTHD_AUTORECONF = YES
+
+ifeq ($(BR2_PACKAGE_BANDWIDTHD_POSTGRESQL),y)
+BANDWIDTHD_DEPENDENCIES += postgresql 
+BANDWIDTHD_CONF_OPT += --with-postgresql-logging=true
+else
+BANDWIDTHD_CONF_OPT += --with-postgresql-logging=false
+endif
+
+ifeq ($(BR2_PACKAGE_BANDWIDTHD_SQLITE3),y)
+BANDWIDTHD_DEPENDENCIES += sqlite
+BANDWIDTHD_CONF_OPT += --with-sqlite-storage=true
+else
+BANDWIDTHD_CONF_OPT += --with-sqlite-storage=false
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
2.0.1
#1 lore raw

PATCH v2 1/1 bandwidthd: new package

Quoted 103 lines · Nathaniel Roach
---
 package/Config.in                |  1 +
 package/bandwidthd/Config.in     | 48 ++++++++++++++++++++++++++++++++++++++++
 package/bandwidthd/bandwidthd.mk | 32 +++++++++++++++++++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 package/bandwidthd/Config.in
 create mode 100644 package/bandwidthd/bandwidthd.mk
package/Config.in +1 -0
index 11087da..0d7e1e8 100644
@@ -938,6 +938,7 @@ menu "Networking applications"
 	source "package/autossh/Config.in"
 	source "package/avahi/Config.in"
 	source "package/axel/Config.in"
+	source "package/bandwidthd/Config.in"
 	source "package/bcusdk/Config.in"
 	source "package/bind/Config.in"
 	source "package/bluez_utils/Config.in"
package/bandwidthd/Config.in new file +48 -0
new file mode 100644
index 0000000..a536c5d
@@ -0,0 +1,48 @@
+config BR2_PACKAGE_BANDWIDTHD
+	bool "bandwidthd"
+	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBPCAP
+	select BR2_PACKAGE_GD
+	help
+	  BandwidthD - Bandwidth monitoring
+
+	  Provides a method to measure the bandwidth that travels through the
+	  machine, grouped by subnet and IP. This information can be stored
+	  locally in /var/lib/bandwidthd and can be configured to generate
+	  static HTML pages which can be hosted by a web server.
+
+	  It is highly recommended that the target has some way of retaining the
+	  time between reboots. (e.g. NTP on boot or an RTC)
+	  
+	  It is suggested to use sqlite for logfile storage but works fine
+	  without, and can be completely ignored if the postgresql portion
+	  is used. 
+
+	  As upstream is no longer actively maintained, a fork is available
+	  on github that works on making BandwidthD's build process more
+	  compatible with buildroot's.
+
+	  Upstream: http://bandwidthd.sourceforge.net/
+	  Github fork: http://github.com/nroach44/bandwidthd
+
+if BR2_PACKAGE_BANDWIDTHD
+
+config BR2_PACKAGE_BANDWIDTHD_POSTGRESQL
+	bool "enable postgresql log target support"
+	depends on BR2_TOOLCHAIN_USES_GLIBC # postgresql
+	select BR2_PACKAGE_POSTGRESQL
+	help
+	  Enable support for logging the bandwidthd data to a remote (or local)
+	  postgresql server. This data can then be viewed through a php site. See 
+	  README in the source code (github.com/nroach44/bandwidthd) for more
+	  information.
+
+config BR2_PACKAGE_BANDWIDTHD_SQLITE3
+	bool "enable sqlite3 log storage"
+	select BR2_PACKAGE_SQLITE
+	help
+	  Enable support for storing the aggregated data in an sqlite db instead
+	  of a plain text file.
+
+endif
package/bandwidthd/bandwidthd.mk new file +22 -0
new file mode 100644
index 0000000..8ad634e
@@ -0,0 +1,32 @@
+################################################################################
+#
+# bandwidthd
+#
+################################################################################
+
+BANDWIDTHD_VERSION = v2.0.1-auto-r06
+BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION))
+
+#Specified as "any version of the GPL that is current as of your download."
+# by upstream.
+BANDWIDTHD_LICENSE = GPL
+
+BANDWIDTHD_DEPENDENCIES += gd libpng libpcap
+
+BANDWIDTHD_AUTORECONF = YES
+
+ifeq ($(BR2_PACKAGE_BANDWIDTHD_POSTGRESQL),y)
+BANDWIDTHD_DEPENDENCIES += postgresql 
+BANDWIDTHD_CONF_OPT += --with-postgresql-logging=true
+else
+BANDWIDTHD_CONF_OPT += --with-postgresql-logging=false

package/bandwidthd/bandwidthd.mk line 32

Quoted 10 lines
package/bandwidthd/bandwidthd.mk new file +10 -0
+endif
+
+ifeq ($(BR2_PACKAGE_BANDWIDTHD_SQLITE3),y)
+BANDWIDTHD_DEPENDENCIES += sqlite
+BANDWIDTHD_CONF_OPT += --with-sqlite-storage=true
+else
+BANDWIDTHD_CONF_OPT += --with-sqlite-storage=false
+endif
+
+$(eval $(autotools-package))

Whelp, forgot to add the changelog in, I can resubmit if needed, but otherwise, here it is:

Changes v1 to v2

- Fixed writing style (as recommended by Thomas Petazzoni)
- Added sqlite toggle
- Bump version