[Pkg-wmaker-commits] [wmcalc] 06/65: Imported Debian patch 0.3-4
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Sun Aug 23 13:54:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmcalc.
commit 673d4854f58420a8616b71ab0fb3f88f481bd37b
Author: Sandro Tosi <matrixhasu at gmail.com>
Date: Sat Oct 13 10:56:35 2007 +0200
Imported Debian patch 0.3-4
---
Makefile | 16 +--
debian/changelog | 36 +++++
debian/control | 16 +--
debian/copyright | 26 +++-
debian/docs | 1 -
debian/manpages | 1 -
debian/menu | 2 +-
debian/patches/00list | 1 +
debian/patches/01_restore_pristine_code.dpatch | 182 +++++++++++++++++++++++++
debian/rules | 13 +-
debian/wmcalc.1 | 2 +-
wmcalc.c | 5 +-
wmcalc.conf | 35 -----
wmcalc_c.h | 1 -
wmcalcswitch.c | 27 +---
15 files changed, 268 insertions(+), 96 deletions(-)
diff --git a/Makefile b/Makefile
index 24763fd..5008008 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,9 @@
-INCLUDES =-I/usr/include/X11 -I/usr/local/include
-LIBINC =-L/usr/lib/X11
+INCLUDES =-I/usr/X11R6/include/X11 -I/usr/local/include
+LIBINC =-L/usr/X11R6/lib
LIBS = -lX11 -lXpm -lXext -lm
TARGET = wmcalc
OBJECTS = wmcalc.o readln.o wmcalcswitch.o wmcalcfunc.o
-DESTDIR =
-PREFIX = /usr/local
-BINDIR = ${PREFIX}/bin
-MANDIR = ${PREFIX}/share/man
-CONF = /etc
-INSTALL = /usr/bin/install
-INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
-INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
.c.o:
gcc -O2 -c -Wall ${INCLUDES} ${FLAGS} $< -o $*.o
@@ -22,7 +14,3 @@ ${TARGET}: ${OBJECTS}
clean::
for i in ${OBJECTS}; do if [ -e $$i ] ; then rm $$i; fi; done
if [ -e ${TARGET} ] ; then rm ${TARGET}; fi
-
-install::
- ${INSTALL_PROGRAM} wmcalc ${DESTDIR}${BINDIR}
- ${INSTALL_FILE} wmcalc.conf ${DESTDIR}${CONF}
diff --git a/debian/changelog b/debian/changelog
index e6ca9bd..cf964c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,39 @@
+wmcalc (0.3-4) unstable; urgency=low
+
+ * Adopting package (Closes: #427132)
+ * debian/control
+ - added myself as new maintainer
+ - bump Standard-Version to 3.7.2
+ - small reformat of short and long descriptions
+ - depends on dpatch
+ * debian/copyright
+ - set myself as new maintainer
+ - fixed copyright note
+ - added license note
+ - added location of GPLv2 on a debian system
+ * debian/rules
+ - added explicit manpage filename to dh_installman
+ - added explicit doc filename to dh_installdocs
+ - dpatch integration
+ - fixed lintian warning about make clean call
+ - removed unneeded dh_installinfo call
+ * debian/manpages
+ - removed
+ * debian/docs
+ - removed
+ * debian/menu
+ - fixed section to Applications
+ * debian/patches/01_restore_pristine_code.dpatch
+ - added to remove source code modification
+ * {wmcalc.c,Makefile,wmcalc_c.h,wmcalcswitch.c}
+ - restored to upstream version
+ * debian/wmcalc.1
+ - fixed a lintian warning about a minus sign not escaped
+ * wmcalc.conf
+ - removed since created by debian/patches/01_restore_pristine_code.dpatch
+
+ -- Sandro Tosi <matrixhasu at gmail.com> Sat, 13 Oct 2007 10:56:35 +0200
+
wmcalc (0.3-3) unstable; urgency=low
* Orphan package, set maintainer to Debian QA Group
diff --git a/debian/control b/debian/control
index 421e3d5..164df2d 100644
--- a/debian/control
+++ b/debian/control
@@ -1,15 +1,15 @@
Source: wmcalc
Section: x11
Priority: optional
-Maintainer: Debian QA Group <packages at qa.debian.org>
-Build-Depends: debhelper (>> 5), libx11-dev, libxext-dev, libxpm-dev, x-dev
-Standards-Version: 3.6.2.1
+Maintainer: Sandro Tosi <matrixhasu at gmail.com>
+Build-Depends: debhelper (>> 5), libx11-dev, libxext-dev, libxpm-dev, x-dev, dpatch
+Standards-Version: 3.7.2
Package: wmcalc
Architecture: any
Depends: ${shlibs:Depends}
-Description: Dockable calculator application
- Wmcalc is a small calculator meant for the WindowMaker dock or
- Afterstep Wharf. It is a simple calculator with basic functions and memory
- slots, and can launch any external application for more complex
- calculations.
+Description: dockable calculator application
+ Wmcalc is a small calculator meant for the WindowMaker dock or
+ Afterstep Wharf. It is a simple calculator with basic functions and
+ memory slots, and can launch any external application for more
+ complex calculations.
diff --git a/debian/copyright b/debian/copyright
index e0ffcd9..a713696 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,12 +1,30 @@
This package was debianized by Gordon Fraser <gordon at freakzone.net> on
Wed, 19 Sep 2001 21:33:45 +0200.
+It is now maintained by Sandro Tosi <matrixhasu at gmail.com>
+
It was downloaded from http://members.access1.net/ehflora/
Upstream Author: Edward H. Flora <ehflora at access1.net>
-Copyright:
+Copyright: 1998-2001 Edward H. Flora
+
+License:
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ MA 02110-1301, USA.
-Wmcalc is released under the GNU General Public License, version 2 or
-greater, found on Debian GNU/Linux systems in the file
-/usr/share/common-licenses/GPL
+On a Debian system the complete text of the GNU General Public License
+can be found in the file `/usr/share/common-licenses/GPL-2'
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index e845566..0000000
--- a/debian/docs
+++ /dev/null
@@ -1 +0,0 @@
-README
diff --git a/debian/manpages b/debian/manpages
deleted file mode 100644
index a7194b5..0000000
--- a/debian/manpages
+++ /dev/null
@@ -1 +0,0 @@
-debian/wmcalc.1
diff --git a/debian/menu b/debian/menu
index 4515b67..bb41277 100644
--- a/debian/menu
+++ b/debian/menu
@@ -1,2 +1,2 @@
-?package(wmcalc):needs="X11" section="Apps/Tools" hints="Dockapp,Desktop"\
+?package(wmcalc):needs="X11" section="Applications/Tools" hints="Dockapp,Desktop"\
title="wmcalc" command="/usr/bin/wmcalc"
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644
index 0000000..719f955
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1 @@
+01_restore_pristine_code.dpatch
diff --git a/debian/patches/01_restore_pristine_code.dpatch b/debian/patches/01_restore_pristine_code.dpatch
new file mode 100644
index 0000000..25e0de1
--- /dev/null
+++ b/debian/patches/01_restore_pristine_code.dpatch
@@ -0,0 +1,182 @@
+#! /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 wmcalc 0.3-3 diff.gz
+
+ at DPATCH@
+
+--- wmcalc-0.3.orig/Makefile
++++ wmcalc-0.3/Makefile
+@@ -1,9 +1,17 @@
+-INCLUDES =-I/usr/X11R6/include/X11 -I/usr/local/include
+-LIBINC =-L/usr/X11R6/lib
++INCLUDES =-I/usr/include/X11 -I/usr/local/include
++LIBINC =-L/usr/lib/X11
+ LIBS = -lX11 -lXpm -lXext -lm
+
+ TARGET = wmcalc
+ OBJECTS = wmcalc.o readln.o wmcalcswitch.o wmcalcfunc.o
++DESTDIR =
++PREFIX = /usr/local
++BINDIR = ${PREFIX}/bin
++MANDIR = ${PREFIX}/share/man
++CONF = /etc
++INSTALL = /usr/bin/install
++INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
++INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
+
+ .c.o:
+ gcc -O2 -c -Wall ${INCLUDES} ${FLAGS} $< -o $*.o
+@@ -14,3 +22,7 @@
+ clean::
+ for i in ${OBJECTS}; do if [ -e $$i ] ; then rm $$i; fi; done
+ if [ -e ${TARGET} ] ; then rm ${TARGET}; fi
++
++install::
++ ${INSTALL_PROGRAM} wmcalc ${DESTDIR}${BINDIR}
++ ${INSTALL_FILE} wmcalc.conf ${DESTDIR}${CONF}
+--- wmcalc-0.3.orig/wmcalc.c
++++ wmcalc-0.3/wmcalc.c
+@@ -90,6 +90,7 @@
+ 01/17/01 Updated to use XLookupString to get KeySym
+ 11/09/00 Added Events for focus and keyboard work.
+ 11/01/00 File Header Added
++ 21/09/01 Added global configfile by Gordon Fraser
+ ****************************************************************/
+ int main( int argc, char **argv ) {
+ XEvent report;
+@@ -107,6 +108,7 @@
+ int bufsize = 20;
+ int chcnt = 0;
+
++
+ strcpy(configfile, getenv("HOME")); // Added to wmbutton by Casey Harkin, 3/6/99
+ strcat(configfile, CONFFILENAME); // Fixed Bug - didn't look in home directory
+ // but startup directory
+@@ -428,7 +430,7 @@
+ flush_expose( iconwin );
+ XCopyArea(display, visible.pixmap, iconwin, gc, 0, 0,
+ visible.attributes.width, visible.attributes.height, 0, 0 );
+- if ( Verbose ) printf("In Redraw()\n");
++ // if ( Verbose ) printf("In Redraw()\n");
+ displaystr();
+ } /***** End of function redraw() ********************************/
+
+@@ -471,7 +473,6 @@
+ ****************************************************************/
+ int whichKey (KeySym keysym) {
+ extern int Verbose;
+- extern Display *display;
+ int func = NO_BUTTON;
+
+ if (Verbose) printf("KeySym 0x%x received, decoding...\n", (int) keysym);
+--- wmcalc-0.3.orig/wmcalc_c.h
++++ wmcalc-0.3/wmcalc_c.h
+@@ -17,6 +17,7 @@
+ #define CALC_CMD_SIZE 128
+ #define CONFFILENAME "/.wmcalc"
+ #define CONFTEMPFILE "/tmp/wmcalc.tmp"
++#define CONFIGGLOBAL "/etc/wmcalc.conf"
+ #define VER 0
+ #define REL 3
+
+--- wmcalc-0.3.orig/wmcalcswitch.c
++++ wmcalc-0.3/wmcalcswitch.c
+@@ -399,10 +399,16 @@
+
+ /* Open current Config file */
+ if ((fp = fopen(configfile, "r")) == NULL) { // Can't find config file
+- printf("%s: Configuration File not found\n", configfile);
++ printf("%s: Cannot create configuration file\n", configfile);
+ return(ERR_FILE_NOT_FOUND);
+ }
+
++ /* We cannot write to the global config-file... */
++ if(!strcmp(configfile, CONFIGGLOBAL)) {
++ strcpy(configfile, getenv("HOME")); // Added to wmbutton by Gordon Fraser, 9/21/01
++ strcat(configfile, CONFFILENAME);
++ }
++
+ /* Open Temporary File */
+ if ((fptmp = fopen(tempfile, "w")) == NULL) { // Can't open file in /tmp
+ fprintf(stderr, "%s: Temporary File Open Failed\n", tempfile);
+@@ -476,12 +482,18 @@
+ char *sepstr = NULL;
+ char sep_ch = '\t';
+ char *cfg_var_ptr = NULL;
+-
++
++
+ sepstr = &sep_ch;
+
+- if ((fp = fopen(configfile, "r")) == NULL) { // Can't find config file
+- fprintf(stderr, "%s: Configuration File not found\n", configfile);
+- return(ERR_FILE_NOT_FOUND);
++ if ((fp = fopen(configfile, "r")) == NULL) { // Can't find config file
++ strcpy(configfile, CONFIGGLOBAL); // ...so try to open global config
++ if ((fp = fopen(configfile, "r")) == NULL) { // Can't find global config file
++ fprintf(stderr, "%s: Configuration File not found\n", configfile);
++ return(ERR_FILE_NOT_FOUND);
++ } else {
++ write_config(); // if global config opened, save in homedir
++ }
+ }
+ else {
+ if (Verbose) printf("%s: Found Configuration File\n", configfile);
+@@ -498,7 +510,7 @@
+ understood */
+ i = 0;
+ /* Loop while we haven't found the variable */
+- while (((strncmp(line, CfgVarList[i], strlen(CfgVarList[i]))) != NULL)
++ while (((strncmp(line, CfgVarList[i], strlen(CfgVarList[i]))) != 0)
+ && (i < MAX_LABEL)) {
+ i++;
+ }
+@@ -586,5 +598,8 @@
+ } while (line != NULL);
+
+ fclose(fp);
++
++
++
+ return(err_code);
+ } /***** End of function read_config **************************/
+--- wmcalc-0.3.orig/wmcalc.conf
++++ wmcalc-0.3/wmcalc.conf
+@@ -0,0 +1,35 @@
++# wmcalc Configuration File
++# Last Manual Update: 10/29/00
++
++# General Notes:
++# * There must be a tab character '\t' between the variable name and
++# the value, not a series of spaces.
++# * wmcalc is case sensitive when reading these variables. Examine the
++# wmcalc_g.h file for currently defined variables.
++
++#Calculator Memory Locations
++#Note: These must all exist, though they may be in any order
++Mem0 0.000000
++Mem1 0.000000
++MEM2 2.718282
++MEM3 3.141593
++Mem4 0.000000
++Mem5 0.000000
++Mem6 0.000000
++Mem7 0.000000
++Mem8 0.000000
++Mem9 0.000000
++
++# The CalcStart variable is intended to allow the user to start a larger
++# calculator for more complicated needs. Everything after the tab '\t'
++# character is sent unmodified in a system() call, so anything you can type
++# at the command prompt may be put here.
++#CalcStart xterm -T "Basic Calculator" -e bc &
++#CalcStart xterm -T "gnuplot" -sb -sl 500 -e gnuplot &
++CalcStart xcalc &
++
++# The ImagChar variable allows the user to choose between 'i' and 'j' to
++# represent the sqrt(-1). (Electrical Engineers (such as myself) use 'j'
++# rather than 'i.')
++#ImagChar i
++ImagChar j
diff --git a/debian/rules b/debian/rules
index 7f6c735..18fab15 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,24 +2,26 @@
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
+include /usr/share/dpatch/dpatch.make
+
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: configure-stamp build-stamp
-build-stamp:
+build-stamp: patch-stamp
dh_testdir
$(MAKE)
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
- -$(MAKE) clean
+ [ ! -f Makefile ] || $(MAKE) clean
dh_clean
@@ -40,10 +42,9 @@ binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
- dh_installdocs
+ dh_installdocs README
dh_installmenu
- dh_installman
- dh_installinfo
+ dh_installman debian/wmcalc.1
dh_installchangelogs
dh_link
dh_strip
diff --git a/debian/wmcalc.1 b/debian/wmcalc.1
index 630a4ad..e7fc56a 100644
--- a/debian/wmcalc.1
+++ b/debian/wmcalc.1
@@ -108,7 +108,7 @@ Where <variable> and <content> need to be seperated by a Tab \\t and \fBnot\fP s
.TP
\fBCalcStart\fP The CalcStart variable is intended to allow the user to start a larger calculator for more complicated needs. Everything after the tab '\\t' character is sent unmodified in a system() call, so anything you can type at the command prompt may be put here.
.TP
-\fBImagChar\fP The ImagChar variable allows the user to choose between 'i' and 'j' to represent the sqrt(-1).
+\fBImagChar\fP The ImagChar variable allows the user to choose between 'i' and 'j' to represent the sqrt(\-1).
.SH AUTHOR
wmcalc was written by Edward H. Flora <ehflora at access1.net>, and is licensed under the terms of the GNU General Public License.
diff --git a/wmcalc.c b/wmcalc.c
index 19990a6..64f51c6 100644
--- a/wmcalc.c
+++ b/wmcalc.c
@@ -90,7 +90,6 @@ char *app_name = "wmcalc"; /* Name of app, for window management */
01/17/01 Updated to use XLookupString to get KeySym
11/09/00 Added Events for focus and keyboard work.
11/01/00 File Header Added
- 21/09/01 Added global configfile by Gordon Fraser
****************************************************************/
int main( int argc, char **argv ) {
XEvent report;
@@ -108,7 +107,6 @@ int main( int argc, char **argv ) {
int bufsize = 20;
int chcnt = 0;
-
strcpy(configfile, getenv("HOME")); // Added to wmbutton by Casey Harkin, 3/6/99
strcat(configfile, CONFFILENAME); // Fixed Bug - didn't look in home directory
// but startup directory
@@ -430,7 +428,7 @@ void redraw() {
flush_expose( iconwin );
XCopyArea(display, visible.pixmap, iconwin, gc, 0, 0,
visible.attributes.width, visible.attributes.height, 0, 0 );
- // if ( Verbose ) printf("In Redraw()\n");
+ if ( Verbose ) printf("In Redraw()\n");
displaystr();
} /***** End of function redraw() ********************************/
@@ -473,6 +471,7 @@ int whichButton( int x, int y ) {
****************************************************************/
int whichKey (KeySym keysym) {
extern int Verbose;
+ extern Display *display;
int func = NO_BUTTON;
if (Verbose) printf("KeySym 0x%x received, decoding...\n", (int) keysym);
diff --git a/wmcalc.conf b/wmcalc.conf
deleted file mode 100644
index d6f110d..0000000
--- a/wmcalc.conf
+++ /dev/null
@@ -1,35 +0,0 @@
-# wmcalc Configuration File
-# Last Manual Update: 10/29/00
-
-# General Notes:
-# * There must be a tab character '\t' between the variable name and
-# the value, not a series of spaces.
-# * wmcalc is case sensitive when reading these variables. Examine the
-# wmcalc_g.h file for currently defined variables.
-
-#Calculator Memory Locations
-#Note: These must all exist, though they may be in any order
-Mem0 0.000000
-Mem1 0.000000
-MEM2 2.718282
-MEM3 3.141593
-Mem4 0.000000
-Mem5 0.000000
-Mem6 0.000000
-Mem7 0.000000
-Mem8 0.000000
-Mem9 0.000000
-
-# The CalcStart variable is intended to allow the user to start a larger
-# calculator for more complicated needs. Everything after the tab '\t'
-# character is sent unmodified in a system() call, so anything you can type
-# at the command prompt may be put here.
-#CalcStart xterm -T "Basic Calculator" -e bc &
-#CalcStart xterm -T "gnuplot" -sb -sl 500 -e gnuplot &
-CalcStart xcalc &
-
-# The ImagChar variable allows the user to choose between 'i' and 'j' to
-# represent the sqrt(-1). (Electrical Engineers (such as myself) use 'j'
-# rather than 'i.')
-#ImagChar i
-ImagChar j
diff --git a/wmcalc_c.h b/wmcalc_c.h
index 6481d14..675cb1f 100644
--- a/wmcalc_c.h
+++ b/wmcalc_c.h
@@ -17,7 +17,6 @@
#define CALC_CMD_SIZE 128
#define CONFFILENAME "/.wmcalc"
#define CONFTEMPFILE "/tmp/wmcalc.tmp"
-#define CONFIGGLOBAL "/etc/wmcalc.conf"
#define VER 0
#define REL 3
diff --git a/wmcalcswitch.c b/wmcalcswitch.c
index f8b9846..84cd9d2 100644
--- a/wmcalcswitch.c
+++ b/wmcalcswitch.c
@@ -399,16 +399,10 @@ int write_config(void) {
/* Open current Config file */
if ((fp = fopen(configfile, "r")) == NULL) { // Can't find config file
- printf("%s: Cannot create configuration file\n", configfile);
+ printf("%s: Configuration File not found\n", configfile);
return(ERR_FILE_NOT_FOUND);
}
- /* We cannot write to the global config-file... */
- if(!strcmp(configfile, CONFIGGLOBAL)) {
- strcpy(configfile, getenv("HOME")); // Added to wmbutton by Gordon Fraser, 9/21/01
- strcat(configfile, CONFFILENAME);
- }
-
/* Open Temporary File */
if ((fptmp = fopen(tempfile, "w")) == NULL) { // Can't open file in /tmp
fprintf(stderr, "%s: Temporary File Open Failed\n", tempfile);
@@ -482,18 +476,12 @@ int read_config(void) {
char *sepstr = NULL;
char sep_ch = '\t';
char *cfg_var_ptr = NULL;
-
-
+
sepstr = &sep_ch;
- if ((fp = fopen(configfile, "r")) == NULL) { // Can't find config file
- strcpy(configfile, CONFIGGLOBAL); // ...so try to open global config
- if ((fp = fopen(configfile, "r")) == NULL) { // Can't find global config file
- fprintf(stderr, "%s: Configuration File not found\n", configfile);
- return(ERR_FILE_NOT_FOUND);
- } else {
- write_config(); // if global config opened, save in homedir
- }
+ if ((fp = fopen(configfile, "r")) == NULL) { // Can't find config file
+ fprintf(stderr, "%s: Configuration File not found\n", configfile);
+ return(ERR_FILE_NOT_FOUND);
}
else {
if (Verbose) printf("%s: Found Configuration File\n", configfile);
@@ -510,7 +498,7 @@ int read_config(void) {
understood */
i = 0;
/* Loop while we haven't found the variable */
- while (((strncmp(line, CfgVarList[i], strlen(CfgVarList[i]))) != 0)
+ while (((strncmp(line, CfgVarList[i], strlen(CfgVarList[i]))) != NULL)
&& (i < MAX_LABEL)) {
i++;
}
@@ -598,8 +586,5 @@ int read_config(void) {
} while (line != NULL);
fclose(fp);
-
-
-
return(err_code);
} /***** End of function read_config **************************/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmcalc.git
More information about the Pkg-wmaker-commits
mailing list