Browse Source

bwm-ng: import 0.6

Julen Landa Alustiza 10 years ago
parent
commit
9ba792eb9a
2 changed files with 98 additions and 0 deletions
  1. 35
    0
      net/bwm-ng/Config.in
  2. 63
    0
      net/bwm-ng/Makefile

+ 35
- 0
net/bwm-ng/Config.in View File

@@ -0,0 +1,35 @@
1
+# bwm-ng advanced configuration
2
+
3
+menu "Configuration"
4
+	depends on PACKAGE_bwm-ng
5
+
6
+config BWMNG_CONFIGFILE
7
+	bool "enable configfile support"
8
+	default n
9
+
10
+config BWMNG_HTML
11
+	bool "enable html output"
12
+	default n
13
+
14
+config BWMNG_CSV
15
+	bool "enable csv output"
16
+	default n
17
+
18
+config BWMNG_EXTENDEDSTATS
19
+	bool "enable max, sum and avg stats"
20
+	default y
21
+
22
+config BWMNG_LIBNCURSES
23
+	bool "enable libncurses support"
24
+	default n
25
+
26
+config BWMNG_TIME
27
+	bool "enable accurate time calculating"
28
+	default y
29
+
30
+config BWMNG_GETOPT_LONG
31
+	bool "enable long options"
32
+	default n
33
+
34
+endmenu
35
+

+ 63
- 0
net/bwm-ng/Makefile View File

@@ -0,0 +1,63 @@
1
+#
2
+# Copyright (C) 2014 OpenWrt.org
3
+#
4
+
5
+include $(TOPDIR)/rules.mk
6
+
7
+PKG_NAME:=bwm-ng
8
+PKG_VERSION:=0.6
9
+PKG_RELEASE:=1
10
+
11
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12
+PKG_SOURCE_URL:=http://www.gropp.org/bwm-ng
13
+PKG_MD5SUM:=d3a02484fb7946371bfb4e10927cebfb
14
+PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
15
+PKG_LICENSE:=GPL2-2.0
16
+PKG_LICENSE_FILES:=COPYING
17
+
18
+PKG_INSTALL:=1
19
+PKG_BUILD_PARALLEL:=1
20
+
21
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22
+
23
+include $(INCLUDE_DIR)/package.mk
24
+
25
+define Package/bwm-ng
26
+  SECTION:=net
27
+  CATEGORY:=Network
28
+  DEPENDS:=+BWMNG_LIBNCURSES:libncurses
29
+  TITLE:=bwm-ng
30
+  URL:=http://www.gropp.org/?id=projects&sub=bwm-ng
31
+  MENU:=1
32
+endef
33
+
34
+define Package/bwm-ng/description
35
+  Bandwidth Monitor NG is a small and simple console-based live
36
+  network and disk io bandwidth monitor.
37
+endef
38
+
39
+define Package/bwm-ng/config
40
+  source "$(SOURCE)/Config.in"
41
+endef
42
+
43
+define Build/Configure
44
+	$(call Build/Configure/Default, \
45
+	$(if $(CONFIG_BWMNG_CONFIGFILE),--enable,--disable)-configfile \
46
+	$(if $(CONFIG_BWMNG_HTML),--enable,--disable)-html \
47
+	$(if $(CONFIG_BWMNG_CSV),--enable,--disable)-csv \
48
+	$(if $(CONFIG_BWMNG_EXTENDEDSTATS),--enable,--disable)-extendedstats \
49
+	$(if $(CONFIG_BWMNG_LIBNCURSES),--with,--without)-ncurses \
50
+	$(if $(CONFIG_BWMNG_TIME),--with,--without)-time \
51
+	$(if $(CONFIG_BWMNG_GETOPT_LONG),--with,--without)-getopt_long \
52
+	--with-strip \
53
+	--with-procnetdev \
54
+	--with-diskstats \
55
+	)
56
+endef
57
+
58
+define Package/bwm-ng/install
59
+	$(INSTALL_DIR) $(1)/usr/bin
60
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/bwm-ng $(1)/usr/bin/
61
+endef
62
+
63
+$(eval $(call BuildPackage,bwm-ng))