vnstat: new package
PATCH 1/1 vnstat: new package
From: "Alvaro G. M" <[email protected]>
---
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
package/Config.in +1 -0
@@ -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"
package/vnstat/Config.in new file +8 -0
@@ -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.
package/vnstat/vnstat.mk new file +15 -0
@@ -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))
Signature · 1 line
1.7.9.1
PATCH 1/1 vnstat: new package
Hello,
Le Mon, 19 Mar 2012 10:48:05 +0100,
"Alvaro G. M" <[email protected]> a ?crit :
Quoted 4 lines
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 vnstat: new package
2012/3/19 Thomas Petazzoni <[email protected]>
Quoted 2 lines
Thanks for this package!
No, thanks all of you!
Quoted 3 lines
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,
Signature · 4 lines
?lvaro G?mez Machado -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120319/45a59dbf/attachment.html>
PATCH 1/1 vnstat: new package
Le Mon, 19 Mar 2012 11:10:55 +0100,
Alvaro Gamez <[email protected]> a ?crit :
Quoted 2 lines
I see, but then essentially I would have to copy, paste and reformat the original
Makefileinto 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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 vnstat: new package
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 <[email protected]>
Quoted 29 lines
Le Mon, 19 Mar 2012 11:10:55 +0100,
Alvaro Gamez <[email protected]> a ?crit :Quoted 2 lines
I see, but then essentially I would have to copy, paste and reformat the original
Makefileinto 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
endefYou 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
Signature · 4 lines
?lvaro G?mez Machado -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120319/11f52a94/attachment-0001.html>
PATCH 1/1 vnstat: new package
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Alvaro" == Alvaro Gamez <[email protected]> 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.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 vnstat: new package
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 <[email protected]>
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Alvaro" == Alvaro Gamez <[email protected]> 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
Signature · 4 lines
?lvaro G?mez Machado -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120319/911f009d/attachment.html>
PATCH 1/1 vnstat: new package
Le Mon, 19 Mar 2012 11:56:02 +0100,
Alvaro Gamez <[email protected]> a ?crit :
Quoted 3 lines
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com