|
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
9
|
9
|
|
10
|
10
|
PKG_NAME:=bandwidthd
|
11
|
11
|
PKG_VERSION:=2.0.1
|
12
|
|
-PKG_RELEASE:=4
|
|
12
|
+PKG_RELEASE:=5
|
13
|
13
|
|
14
|
14
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
|
15
|
15
|
PKG_SOURCE_URL:=@SF/bandwidthd
|
|
@@ -18,22 +18,50 @@ PKG_MD5SUM:=aa79aad7bd489fd2cae1f7dc086ca8b6
|
18
|
18
|
PKG_MAINTAINER:=Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
|
19
|
19
|
|
20
|
20
|
PKG_LICENSE:=GPL-2.0
|
21
|
|
-PKG_LICENSE_FILES:=
|
|
21
|
+
|
|
22
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
22
|
23
|
|
23
|
24
|
include $(INCLUDE_DIR)/package.mk
|
24
|
25
|
|
25
|
|
-define Package/bandwidthd
|
|
26
|
+define Package/bandwidthd/Default
|
26
|
27
|
SECTION:=utils
|
27
|
28
|
CATEGORY:=Utilities
|
28
|
29
|
TITLE:=Bandwidthd
|
29
|
30
|
URL:=http://bandwidthd.sourceforge.net/
|
|
31
|
+endef
|
|
32
|
+
|
|
33
|
+define Package/bandwidthd
|
|
34
|
+$(call Package/bandwidthd/Default)
|
|
35
|
+ TITLE += (without postgresql)
|
|
36
|
+ VARIANT:=no-pgsql
|
30
|
37
|
DEPENDS:=+libgd +libpcap
|
31
|
38
|
endef
|
32
|
39
|
|
|
40
|
+define Package/bandwidthd-pgsql
|
|
41
|
+$(call Package/bandwidthd/Default)
|
|
42
|
+ TITLE += (with postgresql enabled)
|
|
43
|
+ VARIANT:=pgsql
|
|
44
|
+ DEPENDS:=+libgd +libpcap +libpq
|
|
45
|
+endef
|
|
46
|
+
|
|
47
|
+define Package/bandwidthd/description
|
|
48
|
+ A bandwidthd tracking utility.
|
|
49
|
+endef
|
|
50
|
+
|
|
51
|
+define Package/bandwidthd-pgsql/description
|
|
52
|
+$(call Package/bandwidthd/description)
|
|
53
|
+With the ability to store in a postgresql database.
|
|
54
|
+endef
|
|
55
|
+
|
33
|
56
|
define Package/bandwidthd/daemon
|
34
|
57
|
This package contains bandwidthd a bandwith tracking utility.
|
35
|
58
|
endef
|
36
|
59
|
|
|
60
|
+define Package/bandwidthd-pgsql/daemon
|
|
61
|
+ This package contains bandwidthd a bandwith tracking utility.
|
|
62
|
+endef
|
|
63
|
+
|
|
64
|
+ifeq ($(BUILD_VARIANT),no-pgsql)
|
37
|
65
|
CONFIGURE_ARGS += \
|
38
|
66
|
ac_cv_file__sw_lib=no \
|
39
|
67
|
ac_cv_file__sw_include=no \
|
|
@@ -41,7 +69,18 @@ CONFIGURE_ARGS += \
|
41
|
69
|
ac_cv_file__usr_pkg_include=no \
|
42
|
70
|
ac_cv_file__usr_local_pgsql_lib=no \
|
43
|
71
|
ac_cv_file__usr_local_pgsql_include=no \
|
44
|
|
- ac_cv_lib_pq_PQconnectdb=no \
|
|
72
|
+ ac_cv_lib_pq_PQconnectdb=no
|
|
73
|
+endif
|
|
74
|
+
|
|
75
|
+ifeq ($(BUILD_VARIANT),pgsql)
|
|
76
|
+CONFIGURE_ARGS += \
|
|
77
|
+ ac_cv_file__sw_lib=no \
|
|
78
|
+ ac_cv_file__sw_include=no \
|
|
79
|
+ ac_cv_file__usr_pkg_lib=no \
|
|
80
|
+ ac_cv_file__usr_pkg_include=no \
|
|
81
|
+ ac_cv_file__usr_local_pgsql_lib=no \
|
|
82
|
+ ac_cv_file__usr_local_pgsql_include=no
|
|
83
|
+endif
|
45
|
84
|
|
46
|
85
|
EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
|
47
|
86
|
EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
|
|
@@ -58,8 +97,28 @@ define Package/bandwidthd/install
|
58
|
97
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/htdocs/logo.gif $(1)/www/
|
59
|
98
|
endef
|
60
|
99
|
|
|
100
|
+define Package/bandwidthd-pgsql/install
|
|
101
|
+ $(INSTALL_DIR) $(1)/usr/sbin
|
|
102
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/bandwidthd $(1)/usr/sbin/
|
|
103
|
+ $(INSTALL_DIR) $(1)/etc/config
|
|
104
|
+ $(INSTALL_DATA) ./files/bandwidthd-pgsql.config $(1)/etc/config/bandwidthd
|
|
105
|
+ $(INSTALL_DIR) $(1)/etc/init.d
|
|
106
|
+ $(INSTALL_BIN) ./files/bandwidthd-pgsql.init $(1)/etc/init.d/bandwidthd
|
|
107
|
+ $(INSTALL_DIR) $(1)/www/phphtdocs
|
|
108
|
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/htdocs/legend.gif $(1)/www/
|
|
109
|
+ $(INSTALL_DATA) ./files/logo.gif $(1)/www/
|
|
110
|
+ $(INSTALL_DIR) $(1)/usr/share/postgresql
|
|
111
|
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/schema.postgresql $(1)/usr/share/postgresql
|
|
112
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/phphtdocs/bd_pgsql_purge.sh $(1)/usr/share/postgresql
|
|
113
|
+endef
|
|
114
|
+
|
61
|
115
|
define Package/bandwidthd/conffiles
|
62
|
116
|
/etc/config/bandwidthd
|
63
|
117
|
endef
|
64
|
118
|
|
|
119
|
+define Package/bandwidthd-pgsql/conffiles
|
|
120
|
+/etc/config/bandwidthd
|
|
121
|
+endef
|
|
122
|
+
|
65
|
123
|
$(eval $(call BuildPackage,bandwidthd))
|
|
124
|
+$(eval $(call BuildPackage,bandwidthd-pgsql))
|