* [Buildroot] [PATCH] vnstat: new package
@ 2012-03-19 9:48 Alvaro G. M
2012-03-19 9:51 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: Alvaro G. M @ 2012-03-19 9:48 UTC (permalink / raw)
To: buildroot
From: "Alvaro G. M" <alvaro.gamez@hazent.com>
Signed-off-by: Alvaro G. M <alvaro.gamez@hazent.com>
---
I think this could replace somehow ttcp in the near future. I've used
it sometimes with the help of netcat to stablish a TCP connection.
I am not sure I made this right, because vnstat doesn't use autotools,
so there is no ./configure to do. Please, check it out.
---
package/Config.in | 1 +
package/vnstat/Config.in | 8 ++++++++
package/vnstat/vnstat.mk | 15 +++++++++++++++
3 files changed, 24 insertions(+), 0 deletions(-)
create mode 100644 package/vnstat/Config.in
create mode 100644 package/vnstat/vnstat.mk
diff --git a/package/Config.in b/package/Config.in
index f0ce963..dcedcba 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -517,6 +517,7 @@ source "package/tn5250/Config.in"
source "package/transmission/Config.in"
source "package/ttcp/Config.in"
source "package/udpcast/Config.in"
+source "package/vnstat/Config.in"
source "package/vpnc/Config.in"
source "package/vsftpd/Config.in"
source "package/vtun/Config.in"
diff --git a/package/vnstat/Config.in b/package/vnstat/Config.in
new file mode 100644
index 0000000..79427ce
--- /dev/null
+++ b/package/vnstat/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_VNSTAT
+ bool "vnstat"
+ help
+ vnStat is a console-based network traffic monitor that keeps a log
+ of network traffic for the selected interface(s). It uses the
+ network interface statistics provided by the kernel as information
+ source. This means that vnStat won't actually be sniffing any
+ traffic and also ensures light use of system resources.
diff --git a/package/vnstat/vnstat.mk b/package/vnstat/vnstat.mk
new file mode 100644
index 0000000..5ac070a
--- /dev/null
+++ b/package/vnstat/vnstat.mk
@@ -0,0 +1,15 @@
+#############################################################
+#
+# vnstat
+#
+#############################################################
+http://humdi.net/vnstat/vnstat-1.11.tar.gz
+VNSTAT_VERSION = 1.11
+VNSTAT_SOURCE = vnstat-$(VNSTAT_VERSION).tar.gz
+VNSTAT_SITE = http://humdi.net/vnstat/
+
+define VNSTAT_CONFIGURE_CMDS
+ touch $@
+endef
+
+$(eval $(call AUTOTARGETS))
--
1.7.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] vnstat: new package
2012-03-19 9:48 [Buildroot] [PATCH] vnstat: new package Alvaro G. M
@ 2012-03-19 9:51 ` Thomas Petazzoni
2012-03-19 10:10 ` Alvaro Gamez
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2012-03-19 9:51 UTC (permalink / raw)
To: buildroot
Hello,
Le Mon, 19 Mar 2012 10:48:05 +0100,
"Alvaro G. M" <alvaro.gamez@hazent.com> a ?crit :
> I think this could replace somehow ttcp in the near future. I've used
> it sometimes with the help of netcat to stablish a TCP connection.
> I am not sure I made this right, because vnstat doesn't use autotools,
> so there is no ./configure to do. Please, check it out.
Thanks for this package!
If it doesn't use the autotools, then you should use the GENTARGETS
infrastructure rather than the AUTOTARGETS one.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] vnstat: new package
2012-03-19 9:51 ` Thomas Petazzoni
@ 2012-03-19 10:10 ` Alvaro Gamez
2012-03-19 10:20 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: Alvaro Gamez @ 2012-03-19 10:10 UTC (permalink / raw)
To: buildroot
2012/3/19 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Thanks for this package!
>
No, thanks all of you!
> If it doesn't use the autotools, then you should use the GENTARGETS
> infrastructure rather than the AUTOTARGETS one.
>
I see, but then essentially I would have to copy, paste and reformat the
original Makefile into vnstat.mk Isn't that a bit redundant?
AUTOTARGETS expects to find all, install, clean, uninstall targets after
configuration. If I make it skip the configuration step, wouldn't that be
easier, rather than having to redo most of the original Makefile?
Regards,
--
?lvaro G?mez Machado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120319/45a59dbf/attachment.html>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] vnstat: new package
2012-03-19 10:10 ` Alvaro Gamez
@ 2012-03-19 10:20 ` Thomas Petazzoni
2012-03-19 10:32 ` Alvaro Gamez
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2012-03-19 10:20 UTC (permalink / raw)
To: buildroot
Le Mon, 19 Mar 2012 11:10:55 +0100,
Alvaro Gamez <alvaro.gamez@hazent.com> a ?crit :
> I see, but then essentially I would have to copy, paste and reformat the
> original Makefile into vnstat.mk Isn't that a bit redundant?
No, no. You don't have to replicate the project Makefile. You would
just to something like:
define VNSTAT_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
endef
define VNSTAT_INSTALL_TARGET_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
endef
You can also see other examples in the Buildroot code.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] vnstat: new package
2012-03-19 10:20 ` Thomas Petazzoni
@ 2012-03-19 10:32 ` Alvaro Gamez
2012-03-19 10:46 ` Peter Korsgaard
0 siblings, 1 reply; 8+ messages in thread
From: Alvaro Gamez @ 2012-03-19 10:32 UTC (permalink / raw)
To: buildroot
Ah, that's better! The package I was looking at as reference is ezxml and
is much more repetitive.
Thank you!
2012/3/19 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Le Mon, 19 Mar 2012 11:10:55 +0100,
> Alvaro Gamez <alvaro.gamez@hazent.com> a ?crit :
>
> > I see, but then essentially I would have to copy, paste and reformat the
> > original Makefile into vnstat.mk Isn't that a bit redundant?
>
> No, no. You don't have to replicate the project Makefile. You would
> just to something like:
>
> define VNSTAT_BUILD_CMDS
> $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
> endef
>
> define VNSTAT_INSTALL_TARGET_CMDS
> $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR)
> install
> endef
>
> You can also see other examples in the Buildroot code.
>
> Regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
--
?lvaro G?mez Machado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120319/11f52a94/attachment-0001.html>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] vnstat: new package
2012-03-19 10:32 ` Alvaro Gamez
@ 2012-03-19 10:46 ` Peter Korsgaard
2012-03-19 10:56 ` Alvaro Gamez
0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2012-03-19 10:46 UTC (permalink / raw)
To: buildroot
>>>>> "Alvaro" == Alvaro Gamez <alvaro.gamez@hazent.com> writes:
Alvaro> Ah, that's better! The package I was looking at as reference is
Alvaro> ezxml and is much more repetitive.
That's because ezxml's makefile doesn't have a usable install target. If
vnstat has, then you can just call it.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] vnstat: new package
2012-03-19 10:46 ` Peter Korsgaard
@ 2012-03-19 10:56 ` Alvaro Gamez
2012-03-19 12:54 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: Alvaro Gamez @ 2012-03-19 10:56 UTC (permalink / raw)
To: buildroot
Ok! I'm getting it now.
I remember a conversation a few days ago, and I think it was decided to no
longer set the clean and uninstall targets, am I right? If that's the case,
then the lines from Thomas should be enough, is that right?
I'm going to test all that, thank you again!
2012/3/19 Peter Korsgaard <jacmet@uclibc.org>
> >>>>> "Alvaro" == Alvaro Gamez <alvaro.gamez@hazent.com> writes:
>
> Alvaro> Ah, that's better! The package I was looking at as reference is
> Alvaro> ezxml and is much more repetitive.
>
> That's because ezxml's makefile doesn't have a usable install target. If
> vnstat has, then you can just call it.
>
> --
> Bye, Peter Korsgaard
>
--
?lvaro G?mez Machado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120319/911f009d/attachment.html>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH] vnstat: new package
2012-03-19 10:56 ` Alvaro Gamez
@ 2012-03-19 12:54 ` Thomas Petazzoni
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2012-03-19 12:54 UTC (permalink / raw)
To: buildroot
Le Mon, 19 Mar 2012 11:56:02 +0100,
Alvaro Gamez <alvaro.gamez@hazent.com> a ?crit :
> I remember a conversation a few days ago, and I think it was decided to no
> longer set the clean and uninstall targets, am I right? If that's the case,
> then the lines from Thomas should be enough, is that right?
Well, Arnout, Luca and myself agreed on this, but we need to wait for
Peter's approval on this idea.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-03-19 12:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 9:48 [Buildroot] [PATCH] vnstat: new package Alvaro G. M
2012-03-19 9:51 ` Thomas Petazzoni
2012-03-19 10:10 ` Alvaro Gamez
2012-03-19 10:20 ` Thomas Petazzoni
2012-03-19 10:32 ` Alvaro Gamez
2012-03-19 10:46 ` Peter Korsgaard
2012-03-19 10:56 ` Alvaro Gamez
2012-03-19 12:54 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox