[Pkg-wmaker-commits] [wmppp.app] 05/120: Imported Debian patch 1.3.0-8

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 27 12:04:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmppp.app.

commit bff787b4ff7fff13aea82cecfe4d0adccd913298
Author: Chris Waters <xtifr at debian.org>
Date:   Wed Jan 18 16:00:09 2006 -0800

    Imported Debian patch 1.3.0-8
---
 debian/README.debian |  15 +++++++
 debian/changelog     | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++
 debian/compat        |   1 +
 debian/control       |  20 ++++++++++
 debian/copyright     |  11 +++++
 debian/dirs          |   3 ++
 debian/docs          |   4 ++
 debian/examples      |   3 ++
 debian/getmodemspeed |  18 +++++++++
 debian/ip-down       |   5 +++
 debian/ip-up         |   3 ++
 debian/menu          |   4 ++
 debian/rules         |  51 +++++++++++++++++++++++
 debian/wmppp.1       | 103 +++++++++++++++++++++++++++++++++++++++++++++++
 wmppp/wmppp.c        |  38 +++++++++++++++---
 15 files changed, 384 insertions(+), 6 deletions(-)

diff --git a/debian/README.debian b/debian/README.debian
new file mode 100644
index 0000000..e26b855
--- /dev/null
+++ b/debian/README.debian
@@ -0,0 +1,15 @@
+wmppp.app for DEBIAN
+--------------------
+
+This is Debian GNU/Linux's prepackaged version of wmppp.app, a load
+monitor tool for your PPP connection. It's designed with the NeXTStep
+look in mind.
+
+wmppp installs /etc/ppp/ip-up.d/00wmppp and /etc/ppp/ip-down.d/00wmppp.
+These files are necessary for the proper operation of wmppp. The first
+one touches /var/run/wmppp.$PPP_IFACE and the other one removes
+it. When wmppp finds the file, it will display the online indicator,
+and will use its modification time to calculate the enlapsed time
+since the connection came up.
+
+Marcelo E. Magallon <mmagallo at debian.org>, Wed,  1 May 1998 09:11:00 -0600
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..1a9c15d
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,111 @@
+wmppp.app (1.3.0-8) unstable; urgency=low
+
+  * Updated build-dependencies for xlibs split (closes: #346983).
+  * Accepted patch from jguiton to display very high speeds with a "k"
+    suffix (closes: #328699).
+
+ -- Chris Waters <xtifr at debian.org>  Wed, 18 Jan 2006 16:00:09 -0800
+
+wmppp.app (1.3.0-7) unstable; urgency=low
+
+  * Updated for newer standards.
+
+ -- Chris Waters <xtifr at debian.org>  Thu, 22 May 2003 21:15:37 -0700
+
+wmppp.app (1.3.0-6) unstable; urgency=low
+
+  * Re-added patches that got dropped on the floor when I switched to
+    using CVS, including the all-important patch to use pon/poff by
+    default (closes:#138939).
+
+ -- Chris Waters <xtifr at debian.org>  Mon, 18 Mar 2002 13:26:54 -0800
+
+wmppp.app (1.3.0-5) unstable; urgency=low
+
+  * Added some patches by Juan Cespedes <cespedes at debian.org> which may
+    allow ISDN devices to be used.  Also included Juan's patches for
+    stampfile handling.  (closes:#97509)
+
+ -- Chris Waters <xtifr at debian.org>  Fri, 15 Mar 2002 19:17:41 -0800
+
+wmppp.app (1.3.0-4) unstable; urgency=low
+
+  * Added missing dependency on ppp (bad, bad, bad!)
+
+ -- Chris Waters <xtifr at debian.org>  Mon, 16 Apr 2001 23:46:15 -0700
+
+wmppp.app (1.3.0-3) unstable; urgency=low
+
+  * Fixed build-dependency on obsolete xpm4g-dev package (closes:#92683)
+  * Rebuilt against XFree86-4.
+  * Moved binary and man page out of X11R6 tree, as per new policy.
+  * Changed debian/rules to use the new dh_installman, and therefore added
+    versioned build-depends on debhelper.
+
+ -- Chris Waters <xtifr at debian.org>  Sun,  8 Apr 2001 12:49:13 -0700
+
+wmppp.app (1.3.0-2) unstable; urgency=low
+
+  * new maintainer (closes: #76961)
+  * corrected directories mentioned in README.Debian (closes: #72928)
+  * recompiled (again) against modern xpm4g package (closes: #67955)
+  * updated file locations for FHS-compatibility.
+  * updated standards-version in debian/control.
+  * brought the man page up-to-date, adding new options and correcting
+    a few minor details here and there.
+
+ -- Chris Waters <xtifr at debian.org>  Tue, 14 Nov 2000 00:24:57 -0800
+
+wmppp.app (1.3.0-1.1) unstable; urgency=low
+
+  * NMU by Branden Robinson <branden at debian.org>.
+  * Recompile against modern xpm4g package to get proper shared library
+    dependency and permit this package to be installed with forthcoming
+    XFree86 4.x packages, which include libXpm.
+  * debian/control: added Build-Depends
+
+ -- Branden Robinson <branden at debian.org>  Mon, 23 Oct 2000 14:59:01 -0500
+
+wmppp.app (1.3.0-1) unstable; urgency=low
+
+  * New upstream release
+  * Some patches from 1.2 incorporated upstream
+  * Patched wmppp/wmppp.c to expect a NUMBER from getmodemspeed, and not
+    the whole connect line
+  * Modified debian/rules to cope with new source layout
+
+ -- Marcelo E. Magallon <mmagallo at debian.org>  Sun, 20 Sep 1998 12:41:40 -0600
+
+wmppp.app (1.2p1-1) unstable; urgency=low
+
+  * New upstream version
+  * Redid the patch to parse configuration files.
+
+ -- Marcelo E. Magallon <mmagallo at debian.org>  Sat,  2 May 1998 17:08:52 -0600
+
+wmppp.app (1.2-1) unstable; urgency=low
+
+  * New upstream version
+  * Some of the patches to 1.1 incorportated upstream
+  * Modified wmppp a bit to make it work with Debian PPP scripts.
+  * Wrote real manpages for wmppp and wmifs
+  * Modified configuration file parsing to make it more flexible and less
+    dictatorial (sent upstream)
+
+ -- Marcelo E. Magallon <mmagallo at debian.org>  Fri,  1 May 1998 20:28:43 -0600
+
+wmppp.app (1.1-1) unstable; urgency=low
+
+  * Initial release
+  * Modified to work with Debian PPP scripts and Debian ip-{up,dow}.d
+    structure.
+  * Patches to let it connect to a PPP session not started by WMPPP (sent
+    upstream)
+  * Patches to pass it some things on the command line (programs to
+    excecute) (sent upstream)
+  * Patches for wmifs to let it work with arbitrary interfaces, not just
+    eth? and ppp0 (sent upstream)
+
+ -- Marcelo E. Magallon <mmagallo at debian.org>  Sat, 11 Apr 1998 16:44:31 -0600
+
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b3d797a
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,20 @@
+Source: wmppp.app
+Section: net
+Priority: optional
+Maintainer: Chris Waters <xtifr at debian.org>
+Standards-Version: 3.6.2
+Build-Depends:  libx11-dev, libxext-dev, libxpm-dev, debhelper (>= 4.0.0)
+
+Package: wmppp.app
+Architecture: any
+Section: net
+Priority: optional
+Depends: ppp, ${shlibs:Depends}
+Suggests: wmaker
+Description: PPP dial control and network load monitor with NeXTStep look
+ wmppp.app provides a PPP activator and network load monitor on a 64x64 mini
+ window.  With wmppp you can monitor the total traffic as well as the outbound
+ and inbound traffic.  It is designed to work with the WindowMaker dock, but
+ will work great with other window managers as well.
+ .
+ Now with experimental ippp device support.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..c812361
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,11 @@
+This package was debianized by Marcelo Magallon <mmagallo at debian.org>
+on Sat, 11 Apr 1998 16:02:00 -0600
+
+It was downloaded from http://www.xs4all.nl/~warp/wmppp.html
+(http://www.xs4all.nl/~warp/files/wmppp.app-1.2.tar.gz)
+
+  WMPPP.app is copyright (c) 1997, 1998 by Martijn Pieterse and
+  Antoine Nulle licensed through the GNU General Public License. 
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..e5f81c1
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,3 @@
+etc/ppp/ip-up.d
+etc/ppp/ip-down.d
+usr/bin
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..fd429de
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,4 @@
+BUGS
+README
+HINTS
+TODO
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..17492db
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1,3 @@
+wmppp/system.wmppprc
+wmppp/user.wmppprc
+debian/getmodemspeed
diff --git a/debian/getmodemspeed b/debian/getmodemspeed
new file mode 100644
index 0000000..1fb0a33
--- /dev/null
+++ b/debian/getmodemspeed
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# this is an example getmodemspeed script
+# I add '-r /var/tmp/modem.speed' to the 'connect' line in
+# /etc/ppp/peers/provider and a 'REPORT CONNECT' line to
+# /etc/chatscripts/provider. From my USR modem I get something like this:
+#
+# Opening "/var/tmp/modem.speed"...
+# chat:  Sep 20 07:34:42 CONNECT nnnnn/ARQ/V32/LAPM/V42BIS
+# Closing "/var/tmp/modem.speed".
+#
+# I'm interested in the "nnnnn" part. The following works for me, but YMMV
+
+grep CONNECT /var/tmp/modem.speed | \
+	tail -1 | \
+	sed -e 's,^.*CONNECT[[:blank:]]*\([[:digit:]]*\).*$,\1,'
+
+exit 0
diff --git a/debian/ip-down b/debian/ip-down
new file mode 100644
index 0000000..4b1c3ac
--- /dev/null
+++ b/debian/ip-down
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+stamp_file=/var/run/wmppp.$PPP_IFACE
+
+[ -f $stamp_file ] && rm $stamp_file
diff --git a/debian/ip-up b/debian/ip-up
new file mode 100644
index 0000000..0888087
--- /dev/null
+++ b/debian/ip-up
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+touch /var/run/wmppp.$PPP_IFACE
diff --git a/debian/menu b/debian/menu
new file mode 100644
index 0000000..c963ba0
--- /dev/null
+++ b/debian/menu
@@ -0,0 +1,4 @@
+?package(wmppp.app):needs="x11" \
+	section="Apps/Net" \
+	title="WMppp" \
+	command="/usr/bin/wmppp"
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ff6aef7
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,51 @@
+#!/usr/bin/make -f
+
+DSTDIR = debian/wmppp.app
+
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+	cd wmppp && $(MAKE)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	-cd wmppp && $(MAKE) clean
+	-rm -f build-stamp debian/conffiles
+	dh_clean
+
+# Build architecture-independent files here.
+binary-indep: build
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	install -s -m 755 wmppp/wmppp $(DSTDIR)/usr/bin/wmppp
+	install -m 755 debian/ip-up $(DSTDIR)/etc/ppp/ip-up.d/00wmppp
+	install -m 755 debian/ip-down $(DSTDIR)/etc/ppp/ip-down.d/00wmppp
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installman debian/wmppp.1
+	dh_installchangelogs CHANGES
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+source diff:                                                                  
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+ok: binary
+.PHONY: build clean binary-indep binary-arch binary ok
diff --git a/debian/wmppp.1 b/debian/wmppp.1
new file mode 100644
index 0000000..9eeec30
--- /dev/null
+++ b/debian/wmppp.1
@@ -0,0 +1,103 @@
+.\"             -*-Nroff-*-
+.\"
+.TH wmppp.app 1 "September 1998" "Debian Project" "Debian GNU/Linux"
+.SH NAME
+wmppp \- Graphically monitor the average PPP load
+.P
+.SH SYNOPSIS
+.B wmppp
+.RB [\| \-display
+.IR <display\ name> \|]
+.RB [\| \-t \|]
+.RB [\| \-u
+.IR <update\ rate> \|]
+.RB [\| \-i
+.IR <device> \|]
+.RB [\| \-h \|]
+.RB [\| \-v \|]
+.SH DESCRIPTION
+\fBwmppp.app\fP displays a dynamic representation of the load on the
+PPP line on a 64x64 miniwindow. It also starts and stops the
+connection and displays the time enlapsed since the it came up. The
+traffic on the interface is also monitored.
+.SH OPTIONS
+.TP
+.B \-display <display\ name>
+name of display to use
+.TP
+.B \-t
+sets the on-line timer to display MM:SS instead of the default HH:MM.
+.TP
+.B \-u <update rate>
+sets the frequency, in seconds, for updates to the display.  Valid
+range is 1-10, default value is 5.
+.TP
+.B \-i <device>
+choose the net device (ppp1, ippp0, etc.) to monitor.  (Note that this
+feature is EXPERIMENTAL and should be used with caution.  Bug reports
+are welcomed.)
+.TP
+.B \-h
+displays a command line summary
+.TP
+.B \-v
+displays the version number.
+.SH CONFIGURATION
+The configuration file (see below) may contain any of the following
+key-value pairs. The format is \fIkey: value\fP.
+.TP
+.I start
+The program that starts the connection
+.TP
+.I stop
+The program that stops the connection
+.TP
+.I speed
+This program reports the speed of the connection. This program should
+output \fI<speed>\fP, that is, a \fInumber\fP is expected and not the
+whole \"CONNECT\" line the modem outputs.
+.TP
+.I ifdown
+This program is run if the line goes down, and the \fIstop\fP program
+hasn't been run. (Redial program)
+.TP
+.I stampfile
+The modification time of this file is used to calculate the amount of
+time the connection has been up. Something like \fItouch <stampfile>\fP
+should be run for this to work.
+.SH FILES
+.TP
+/var/run/wmppp.\fIppp0\fP
+this is the stamp file use to determine the ammount of time enlapsed
+since the connection came up. This file should be managed by the ip-up
+and ip-down scripts. On Debian systems, \fI/etc/ppp/ip-up.d/00wmppp\fP
+creates the file, and \fI/etc/ppp/ip-down.d/00wmppp\fP removes it.
+.TP
+/etc/wmppprc
+System wide defaults
+.TP
+$HOME/.wmppprc
+User defined settings
+.TP
+/etc/wmppprc.fixed
+System wide fixed options, this overrides the user settings
+.SH AUTHORS
+\fBwmppp.app\fP was written by \fIMartijn Pieterse
+<pieterse at xs4all.nl>\fP and \fIAntoine Nulle <warp at xs4all.nl>\fP, and
+it's based on work by \fIBeat Christen <bchriste at iiic.ethz.ch>\fP
+(asclock) and \fIMichael Callahan <callahan at maths.ox.ac.uk>\fP, \fIAl
+Longyear longyear at netcom.com\fP and \fIPaul Mackerras
+<Paul.Mackerras at cs.anu.edu.au>\fP (pppstats).
+.P
+Email regarding wmppp should be sent to
+\fIdockapps at windowmaker.kimitsu.com\fP.
+.P
+This manpage was written by \fIMarcelo Magallon
+<mmagallo at debian.org\fP for the \fIDebian Project\fP
+.SH "SEE ALSO"
+.BR pppd (8),
+.BR pppstats (8),
+.BR plog (1),
+.BR pon (1),
+.BR poff (1)
+
diff --git a/wmppp/wmppp.c b/wmppp/wmppp.c
index 1f22fc2..84cb046 100644
--- a/wmppp/wmppp.c
+++ b/wmppp/wmppp.c
@@ -187,12 +187,12 @@
  /* Defines */
 /***********/
 
-#define START_ACTION (NULL)
-#define STOP_ACTION (NULL)
+#define START_ACTION "/usr/bin/pon"
+#define STOP_ACTION "/usr/bin/poff"
 #define SPEED_ACTION (NULL)
-#define IFDOWN_ACTION (NULL)
+#define IFDOWN_ACTION "/usr/bin/poff -r"
 
-#define STAMP_FILE "/var/run/ppp0.pid"
+#define STAMP_FILE_PRE "/var/run/wmppp."
 
 /* Defines voor alle coordinate */
 
@@ -310,10 +310,15 @@ int main(int argc, char *argv[]) {
 					usage();
 					exit(1);
 				}
+				/* following removed to allow experiments with
+				 * new devices, i.e. ippp
+				 */
+#if 0
 				if (strncmp(argv[i+1], "ppp", 3)) {
 					usage();
 					exit(1);
 				}
+#endif
 				active_interface = argv[i+1];
 				i++;
 				break;
@@ -357,6 +362,7 @@ char	*start_action = NULL;
 char	*stop_action = NULL;
 char	*speed_action = NULL;
 char	*ifdown_action = NULL;
+char    *stamp_file = NULL;
 
 void wmppp_routine(int argc, char **argv) {
 
@@ -365,6 +371,7 @@ void wmppp_routine(int argc, char **argv) {
 		{ "stop", &stop_action },
 		{ "speed", &speed_action },
 		{ "ifdown", &ifdown_action },
+		{ "stampfile", &stamp_file },
 		{ NULL, NULL }
 	};
 
@@ -406,6 +413,10 @@ void wmppp_routine(int argc, char **argv) {
 	if (STOP_ACTION) stop_action = strdup(STOP_ACTION);
 	if (SPEED_ACTION) speed_action = strdup(SPEED_ACTION);
 	if (IFDOWN_ACTION) ifdown_action = strdup(IFDOWN_ACTION);
+	if (STAMP_FILE_PRE) {
+	    sprintf (temp, "%s%s", STAMP_FILE_PRE, active_interface);
+	    stamp_file = strdup (temp);
+	}
 	
 	strcpy(temp, "/etc/wmppprc");
 	parse_rcfile(temp, wmppp_keys);
@@ -415,7 +426,7 @@ void wmppp_routine(int argc, char **argv) {
 	strcat(temp, "/.wmppprc");
 	parse_rcfile(temp, wmppp_keys);
 
-	strcpy(temp, "/etc/wmppp.fixed");
+	strcpy(temp, "/etc/wmppprc.fixed");
 	parse_rcfile(temp, wmppp_keys);
 
 	/* Open the display */
@@ -478,7 +489,7 @@ void wmppp_routine(int argc, char **argv) {
 				if (!starttime) {
 					starttime = currenttime;
 
-					if (stat(STAMP_FILE, &st) == 0)
+					if (stat(stamp_file, &st) == 0)
 						starttime = st.st_mtime;
 
 					SetOnLED(LED_PPP_POWER);
@@ -759,6 +770,11 @@ void DrawStats(int *his, int num, int size, int x_left, int y_bottom) {
 void PrintLittle(int i, int *k) {
 
 	switch (i) {
+	case -2:
+		*k -= 5;
+		/* Print the "k" letter */
+		copyXPMArea(11*5-5, 86, 4, 9, *k, 48);
+		break;
 	case -1:
 		*k -= 5;
 		copyXPMArea(13*5-5, 86, 4, 9, *k, 48);
@@ -791,9 +807,12 @@ void DrawSpeedInd(char *speed_action) {
 
 		pclose(fp);
 
+#if 0
 		if ((p=strstr(temp, "CONNECT"))) {
 			linespeed = atoi(p + 8);
 		}
+#endif
+		linespeed = atoi(temp);
 
 		k = 30;
 
@@ -824,6 +843,13 @@ void DrawLoadInd(int speed) {
 
 	k = 30;
 
+	/* If speed is greater than 99999, display it in K */
+	if (speed > 99999 )
+	{
+		speed /= 1024 ;
+		PrintLittle(-2, &k) ;
+	}
+
 	do {
 		PrintLittle(speed % 10, &k);
 		speed /= 10;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmppp.app.git



More information about the Pkg-wmaker-commits mailing list