Gentoo Archives: gentoo-commits

From: "Christian Ruppert (idl0r)" <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/vnstat: ChangeLog vnstat-1.10-r1.ebuild vnstat-1.11-r2.ebuild vnstat-1.10.ebuild vnstat-1.11-r1.ebuild
Date: Sun, 01 Jan 2012 01:18:15
Message-Id: 20120101011805.0717D2004B@flycatcher.gentoo.org
1 idl0r 12/01/01 01:18:05
2
3 Modified: ChangeLog
4 Added: vnstat-1.10-r1.ebuild vnstat-1.11-r2.ebuild
5 Removed: vnstat-1.10.ebuild vnstat-1.11-r1.ebuild
6 Log:
7 Revbump. Don't use the deprecated $opts variable, bug 386115.
8
9 (Portage version: 2.1.10.41/cvs/Linux i686, RepoMan options: --force)
10
11 Revision Changes Path
12 1.53 net-analyzer/vnstat/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/vnstat/ChangeLog?rev=1.53&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/vnstat/ChangeLog?rev=1.53&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/vnstat/ChangeLog?r1=1.52&r2=1.53
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/ChangeLog,v
21 retrieving revision 1.52
22 retrieving revision 1.53
23 diff -u -r1.52 -r1.53
24 --- ChangeLog 21 Oct 2011 15:16:06 -0000 1.52
25 +++ ChangeLog 1 Jan 2012 01:18:04 -0000 1.53
26 @@ -1,6 +1,14 @@
27 # ChangeLog for net-analyzer/vnstat
28 -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/ChangeLog,v 1.52 2011/10/21 15:16:06 jer Exp $
30 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
31 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/ChangeLog,v 1.53 2012/01/01 01:18:04 idl0r Exp $
32 +
33 +*vnstat-1.11-r2 (01 Jan 2012)
34 +*vnstat-1.10-r1 (01 Jan 2012)
35 +
36 + 01 Jan 2012; Christian Ruppert <idl0r@g.o> -vnstat-1.10.ebuild,
37 + +vnstat-1.10-r1.ebuild, -vnstat-1.11-r1.ebuild, +vnstat-1.11-r2.ebuild,
38 + files/vnstatd.initd:
39 + Revbump. Don't use the deprecated $opts variable, bug 386115.
40
41 21 Oct 2011; Jeroen Roovers <jer@g.o> vnstat-1.11-r1.ebuild:
42 Remove fowners call for /var/run/vnstatd too.
43
44
45
46 1.1 net-analyzer/vnstat/vnstat-1.10-r1.ebuild
47
48 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/vnstat/vnstat-1.10-r1.ebuild?rev=1.1&view=markup
49 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/vnstat/vnstat-1.10-r1.ebuild?rev=1.1&content-type=text/plain
50
51 Index: vnstat-1.10-r1.ebuild
52 ===================================================================
53 # Copyright 1999-2012 Gentoo Foundation
54 # Distributed under the terms of the GNU General Public License v2
55 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/vnstat-1.10-r1.ebuild,v 1.1 2012/01/01 01:18:04 idl0r Exp $
56
57 EAPI="2"
58
59 inherit eutils toolchain-funcs
60
61 DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage"
62 HOMEPAGE="http://humdi.net/vnstat/"
63 SRC_URI="http://humdi.net/vnstat/${P}.tar.gz"
64
65 LICENSE="GPL-2"
66 SLOT="0"
67 KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86"
68 IUSE="gd"
69
70 DEPEND="
71 gd? ( media-libs/gd[png] )"
72 RDEPEND="${DEPEND}
73 virtual/cron"
74
75 pkg_setup() {
76 enewgroup vnstat
77 enewuser vnstat -1 -1 /dev/null vnstat
78 }
79
80 src_compile() {
81 sed -i 's:vnstat[.]log:vnstatd.log:' cfg/vnstat.conf || die
82 sed -i 's:vnstat[.]pid:vnstatd/vnstatd.pid:' cfg/vnstat.conf || die
83
84 if use gd; then
85 emake all CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake all failed"
86 else
87 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed"
88 fi
89 }
90
91 src_install() {
92 if use gd; then
93 dobin src/vnstati || die "vnstati dobin failed"
94 fi
95 dobin src/vnstat src/vnstatd || die "dobin failed"
96 exeinto /etc/cron.hourly
97 newexe "${FILESDIR}"/vnstat.cron vnstat || die
98
99 insinto /etc
100 doins cfg/vnstat.conf || die
101 fowners root:vnstat /etc/vnstat.conf
102
103 newconfd "${FILESDIR}/vnstatd.confd" vnstatd || die
104 newinitd "${FILESDIR}/vnstatd.initd" vnstatd || die
105
106 keepdir /var/lib/vnstat
107 keepdir /var/run/vnstatd
108 fowners vnstat:vnstat /var/lib/vnstat
109 fowners vnstat:vnstat /var/run/vnstatd
110
111 use gd && { doman man/vnstati.1 || die; }
112 doman man/vnstat.1 man/vnstatd.1 || die
113
114 newdoc examples/vnstat_ip-up ip-up.example || die
115 newdoc examples/vnstat_ip-down ip-down.example || die
116 newdoc INSTALL README.setup || die
117 dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi || die
118 }
119
120 pkg_postinst() {
121 # compatibility for 1.1 ebuild
122 if [[ -d ${ROOT}/var/spool/vnstat ]]; then
123 mv -f "${ROOT}"/var/spool/vnstat/* "${ROOT}"/var/lib/vnstat/ \
124 && rmdir "${ROOT}"/var/spool/vnstat
125 ewarn "vnStat db files have been moved from /var/spool/vnstat to /var/lib/vnstat"
126 ewarn
127 fi
128
129 # Workaround feature/bug #141619
130 chown -R vnstat:vnstat "${ROOT}/var/lib/vnstat"
131 chown vnstat:vnstat "${ROOT}/var/run/vnstatd"
132 ewarn "vnStat db files owning user and group has been changed to \"vnstat\"."
133
134 elog
135 elog "Repeat the following command for every interface you"
136 elog "wish to monitor (replace eth0):"
137 elog " vnstat -u -i eth0"
138 elog "and set correct permissions after that, e.g."
139 elog " chown -R vnstat:vnstat /var/lib/vnstat"
140 elog
141 elog "Note: if an interface transfers more than ~4GB in"
142 elog "the time between cron runs, you may miss traffic"
143 elog
144
145 if [[ -e ${ROOT}/etc/cron.d/vnstat ]] ; then
146 elog "vnstat's cron script is now installed as /etc/cron.hourly/vnstat."
147 elog "Please remove /etc/cron.d/vnstat."
148 elog
149 fi
150 elog "To update the interfaces database automatically with cron, uncomment"
151 elog "lines in /etc/cron.hourly/vnstat and set cron job to run it as"
152 elog "frequently as required. Alternatively you can use vnstatd. Init script"
153 elog "was installed into /etc/init.d/vnstatd for your convenience."
154 elog
155 elog "Starting with version 1.5 --dbdir option is droped. You can do the same"
156 elog "with DatabaseDir directive in configuration file (/etc/vnstat.conf)."
157 }
158
159
160
161 1.1 net-analyzer/vnstat/vnstat-1.11-r2.ebuild
162
163 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/vnstat/vnstat-1.11-r2.ebuild?rev=1.1&view=markup
164 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/vnstat/vnstat-1.11-r2.ebuild?rev=1.1&content-type=text/plain
165
166 Index: vnstat-1.11-r2.ebuild
167 ===================================================================
168 # Copyright 1999-2012 Gentoo Foundation
169 # Distributed under the terms of the GNU General Public License v2
170 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/vnstat-1.11-r2.ebuild,v 1.1 2012/01/01 01:18:04 idl0r Exp $
171
172 EAPI="4"
173
174 inherit eutils toolchain-funcs
175
176 DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage"
177 HOMEPAGE="http://humdi.net/vnstat/"
178 SRC_URI="http://humdi.net/vnstat/${P}.tar.gz"
179
180 LICENSE="GPL-2"
181 SLOT="0"
182 KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
183 IUSE="gd"
184
185 DEPEND="
186 gd? ( media-libs/gd[png] )"
187 RDEPEND="${DEPEND}
188 virtual/cron"
189
190 pkg_setup() {
191 enewgroup vnstat
192 enewuser vnstat -1 -1 /dev/null vnstat
193 }
194
195 src_compile() {
196 sed -i 's:vnstat[.]log:vnstatd.log:' cfg/vnstat.conf || die
197 sed -i 's:vnstat[.]pid:vnstatd/vnstatd.pid:' cfg/vnstat.conf || die
198
199 if use gd; then
200 emake all CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
201 else
202 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
203 fi
204 }
205
206 src_install() {
207 use gd && dobin src/vnstati
208 dobin src/vnstat src/vnstatd
209 exeinto /etc/cron.hourly
210 newexe "${FILESDIR}"/vnstat.cron vnstat
211
212 insinto /etc
213 doins cfg/vnstat.conf
214 fowners root:vnstat /etc/vnstat.conf
215
216 newconfd "${FILESDIR}/vnstatd.confd" vnstatd
217 newinitd "${FILESDIR}/vnstatd.initd" vnstatd
218
219 keepdir /var/lib/vnstat
220 fowners vnstat:vnstat /var/lib/vnstat
221
222 use gd && doman man/vnstati.1
223 doman man/vnstat.1 man/vnstatd.1
224
225 newdoc examples/vnstat_ip-up ip-up.example
226 newdoc examples/vnstat_ip-down ip-down.example
227 newdoc INSTALL README.setup
228 dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi
229 }
230
231 pkg_postinst() {
232 # Workaround feature/bug #141619
233 chown -R vnstat:vnstat "${ROOT}/var/lib/vnstat"
234 chown vnstat:vnstat "${ROOT}/var/run/vnstatd"
235 ewarn "vnStat db files owning user and group has been changed to \"vnstat\"."
236
237 elog
238 elog "Repeat the following command for every interface you"
239 elog "wish to monitor (replace eth0):"
240 elog " vnstat -u -i eth0"
241 elog "and set correct permissions after that, e.g."
242 elog " chown -R vnstat:vnstat /var/lib/vnstat"
243 elog
244 elog "Note: if an interface transfers more than ~4GB in"
245 elog "the time between cron runs, you may miss traffic"
246 elog
247 elog "To update the interfaces database automatically with cron, uncomment"
248 elog "lines in /etc/cron.hourly/vnstat and set cron job to run it as"
249 elog "frequently as required. Alternatively you can use vnstatd. Init script"
250 elog "was installed into /etc/init.d/vnstatd for your convenience."
251 }