Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3] bandwidthd: new package
@ 2014-07-31  5:26 Nathaniel Roach
  2014-07-31 21:47 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Nathaniel Roach @ 2014-07-31  5:26 UTC (permalink / raw)
  To: buildroot

---
Changes v2 to v3
 - Bump version (solved issues with the db stuff)

Changes v1 to v2

 - Misc tweaks as recommended by Thomas Petazzoni
 - Added sqlite toggle
 - Bump version
---
 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

diff --git a/package/Config.in b/package/Config.in
index 29b8e6b..ee158fa 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -939,6 +939,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"
diff --git a/package/bandwidthd/Config.in b/package/bandwidthd/Config.in
new file mode 100644
index 0000000..a536c5d
--- /dev/null
+++ b/package/bandwidthd/Config.in
@@ -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
diff --git a/package/bandwidthd/bandwidthd.mk b/package/bandwidthd/bandwidthd.mk
new file mode 100644
index 0000000..f85fefc
--- /dev/null
+++ b/package/bandwidthd/bandwidthd.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# bandwidthd
+#
+################################################################################
+
+BANDWIDTHD_VERSION = v2.0.1-auto-r07
+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))
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH v3] bandwidthd: new package
  2014-07-31  5:26 [Buildroot] [PATCH v3] bandwidthd: new package Nathaniel Roach
@ 2014-07-31 21:47 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2014-07-31 21:47 UTC (permalink / raw)
  To: buildroot

Dear Nathaniel Roach,

On Thu, 31 Jul 2014 13:26:59 +0800, Nathaniel Roach wrote:
> ---
> Changes v2 to v3
>  - Bump version (solved issues with the db stuff)
> 
> Changes v1 to v2
> 
>  - Misc tweaks as recommended by Thomas Petazzoni
>  - Added sqlite toggle
>  - Bump version
> ---
>  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

Thanks, I've applied the patch after doing some minor formatting fixes
(removing trailing whitespace, rewrapping too long help text, etc.).

Make sure to monitor http://autobuild.buildroot.org in the coming days
to see if your package appears in red. In which case, you're invited to
investigate the build failures caused by your new package, and provide
patches to fix them! :-)

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-31 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31  5:26 [Buildroot] [PATCH v3] bandwidthd: new package Nathaniel Roach
2014-07-31 21:47 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox