[Pkg-wmaker-commits] [wmtop] 08/34: Imported Debian patch 0.84-8
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Wed Aug 26 01:01: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 wmtop.
commit d1504584127092fb4df1e1794cff91e49b20b755
Author: Sandro Tosi <matrixhasu at gmail.com>
Date: Wed Jan 9 20:04:01 2008 +0100
Imported Debian patch 0.84-8
---
Makefile | 2 +-
debian/changelog | 27 +++++++++++++
debian/control | 7 ++--
debian/copyright | 18 ++++++---
debian/dirs | 2 -
debian/docs | 3 --
debian/patches/00list | 2 +
debian/patches/01_restore_pristine_code.dpatch | 52 ++++++++++++++++++++++++++
debian/patches/10_fix_manpage.dpatch | 18 +++++++++
debian/rules | 12 +++---
wmtop.c | 13 +++----
11 files changed, 127 insertions(+), 29 deletions(-)
diff --git a/Makefile b/Makefile
index 543096e..eedf30b 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ clean:
rm -f *~
install: wmtop
- #strip wmtop
+ strip wmtop
cp -f wmtop $(PREFIX)/bin/
chmod 755 $(PREFIX)/bin/wmtop
cp -f wmtop.1 $(PREFIX)/man/man1
diff --git a/debian/changelog b/debian/changelog
index d0d3463..7b976ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,30 @@
+wmtop (0.84-8) unstable; urgency=low
+
+ * debian/control
+ - bump Standards-Version to 3.7.3
+ - moved Homepage field from binary to source stanza
+ - added build-dependency against libxext-dev since libx11-dev no longer
+ depends on it
+ - added dpatch dependency
+ * debian/rules
+ - added dpatch stuff
+ - small change to clean target
+ - added direct docs installation
+ * debian/patches/01_restore_pristine_code.dpatch
+ - added restore pristine source code
+ * debian/patches/10_fix_manpage.dpatch
+ - added escape of minus signs in manpage (lintian warning)
+ * debian/dirs
+ - removed
+ * debian/docs
+ - removed
+ * debian/copyright
+ - clear separation of license and copyright
+ - upstream author, license and copyright indented with 4 spaces
+ - link to local GPLv2 license text fixed
+
+ -- Sandro Tosi <matrixhasu at gmail.com> Wed, 09 Jan 2008 20:04:01 +0100
+
wmtop (0.84-7) unstable; urgency=low
* comment strip of binary from upstream Makefile and debian/rules
diff --git a/debian/control b/debian/control
index 7fd1296..bd4c3b4 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,9 @@ Section: x11
Priority: optional
Maintainer: Sandro Tosi <matrixhasu at gmail.com>
Uploaders: tony mancill <tmancill at debian.org>
-Build-Depends: debhelper (>= 5), libx11-dev, libxpm-dev
-Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 5), libx11-dev, libxpm-dev, libxext-dev, dpatch
+Standards-Version: 3.7.3
+Homepage: http://wmtop.sourceforge.net/
Package: wmtop
Architecture: any
@@ -14,5 +15,3 @@ Description: Dockapp that displays 3 top memory or CPU using processes
running on a unix box displaying the cpu usage or memory usage in an
attractive graphical way using little screen real estate. It's a kind
of mini 'top'.
- .
- Homepage: http://wmtop.sourceforge.net/
diff --git a/debian/copyright b/debian/copyright
index 64459ca..a54ce5c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,17 +5,23 @@ It is now maintained by Sandro Tosi <matrixhasu at gmail.com>
It was originally downloaded from: http://wmtop.sourceforge.net/
-Upstream Author: Dan Piponi <sigfpe at users.sourceforge.net>
+Upstream Author:
-Copyright: 1999-2001 Dan Piponi
+ Dan Piponi <sigfpe at users.sourceforge.net>
-wmtop is licensed through the GNU General Public License v2.
+Copyright:
-You are free to distribute this software under the terms of
-the GNU General Public License.
+ 1999-2001 Dan Piponi
+
+License:
+
+ wmtop is licensed through the GNU General Public License v2.
+
+ You are free to distribute this software under the terms of
+ the GNU General Public License.
On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common-licenses/GPL file.
+License can be found in /usr/share/common-licenses/GPL-2 file.
This file has different copyright notes:
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index e881af2..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/menu
-usr/bin
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index d5aaf52..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,3 +0,0 @@
-BUGS
-README
-TODO
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644
index 0000000..3af16c3
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1,2 @@
+01_restore_pristine_code
+10_fix_manpage
diff --git a/debian/patches/01_restore_pristine_code.dpatch b/debian/patches/01_restore_pristine_code.dpatch
new file mode 100644
index 0000000..c882e3c
--- /dev/null
+++ b/debian/patches/01_restore_pristine_code.dpatch
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_restore_pristine_code.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: New patch generated from wmtop 0.84-7 diff.gz
+
+ at DPATCH@
+diff -urNad wmtop~/Makefile wmtop/Makefile
+--- wmtop~/Makefile 2006-08-27 13:44:47.000000000 +0200
++++ wmtop/Makefile 2008-01-09 19:57:58.915396801 +0100
+@@ -38,7 +38,7 @@
+ rm -f *~
+
+ install: wmtop
+- strip wmtop
++ #strip wmtop
+ cp -f wmtop $(PREFIX)/bin/
+ chmod 755 $(PREFIX)/bin/wmtop
+ cp -f wmtop.1 $(PREFIX)/man/man1
+diff -urNad wmtop~/wmtop.c wmtop/wmtop.c
+--- wmtop~/wmtop.c 2008-01-05 16:40:08.000000000 +0100
++++ wmtop/wmtop.c 2008-01-09 19:57:51.618981002 +0100
+@@ -843,7 +843,7 @@
+ #if defined(LINUX)
+ int calc_mem_total() {
+ int ps;
+- char line[512];
++ char line[1024];
+ char *ptr;
+ int rc;
+
+@@ -853,13 +853,16 @@
+ if (rc<0)
+ return 0;
+
+- if ((ptr = strstr(line, "Mem:")) == NULL) {
+- return 0;
+- } else {
++ if ((ptr = strstr(line, "Mem:")) != NULL) {
+ ptr += 4;
+ return atoi(ptr);
++ } else if ((ptr = strstr(line, "MemTotal:")) != NULL) {
++ /* The "Mem:" line has been removed in Linux 2.6 */
++ ptr += 9;
++ return atoi(ptr) << 10; /* MemTotal is given in kiB */
++ } else {
++ return 0;
+ }
+-
+ }
+ #endif /* defined(LINUX) */
+
diff --git a/debian/patches/10_fix_manpage.dpatch b/debian/patches/10_fix_manpage.dpatch
new file mode 100644
index 0000000..6f206e0
--- /dev/null
+++ b/debian/patches/10_fix_manpage.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_fix_manpage.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## DP: Escapes minus signs
+
+ at DPATCH@
+diff -urNad wmtop~/wmtop.1 wmtop/wmtop.1
+--- wmtop~/wmtop.1 2006-08-27 13:44:47.000000000 +0200
++++ wmtop/wmtop.1 2008-01-05 16:45:14.949782353 +0100
+@@ -64,7 +64,7 @@
+ Monitor only users processes, exclude WindowMaker dock apps and
+ pop up xps when double clicked:
+ .IP
+-wmtop -c xps -U -x '^wm'
++wmtop \-c xps \-U \-x '^wm'
+ .LP
+ where we assume dock apps all have names starting with 'wm'.
+
diff --git a/debian/rules b/debian/rules
index e348413..12111a4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,8 +3,10 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+include /usr/share/dpatch/dpatch.make
+
build: build-stamp
-build-stamp:
+build-stamp: patch-stamp
dh_testdir
# Add here commands to compile the package.
@@ -12,13 +14,13 @@ build-stamp:
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
- $(MAKE) clean
+ [ ! -f Makefile ] || $(MAKE) clean
dh_clean
@@ -26,7 +28,7 @@ install: build
dh_testdir
dh_testroot
dh_clean -k
- dh_installdirs
+ dh_installdirs usr/bin
# Add here commands to install the package into debian/wmtop.
install -m 0755 wmtop `pwd`/debian/wmtop/usr/bin/wmtop
@@ -39,7 +41,7 @@ binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
- dh_installdocs
+ dh_installdocs BUGS README TODO
dh_installmenu
dh_installman wmtop.1
dh_installchangelogs CHANGES
diff --git a/wmtop.c b/wmtop.c
index b5b8441..1c0895f 100644
--- a/wmtop.c
+++ b/wmtop.c
@@ -843,7 +843,7 @@ void calc_cpu_each(int total) {
#if defined(LINUX)
int calc_mem_total() {
int ps;
- char line[1024];
+ char line[512];
char *ptr;
int rc;
@@ -853,16 +853,13 @@ int calc_mem_total() {
if (rc<0)
return 0;
- if ((ptr = strstr(line, "Mem:")) != NULL) {
+ if ((ptr = strstr(line, "Mem:")) == NULL) {
+ return 0;
+ } else {
ptr += 4;
return atoi(ptr);
- } else if ((ptr = strstr(line, "MemTotal:")) != NULL) {
- /* The "Mem:" line has been removed in Linux 2.6 */
- ptr += 9;
- return atoi(ptr) << 10; /* MemTotal is given in kiB */
- } else {
- return 0;
}
+
}
#endif /* defined(LINUX) */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmtop.git
More information about the Pkg-wmaker-commits
mailing list