[hamradio-commits] [gcb] 04/05: Split patch; use CFLAGS and LDFLAGS from dpkg-buildflags

Iain Learmonth irl-guest at moszumanska.debian.org
Wed Aug 12 23:07:46 UTC 2015


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

irl-guest pushed a commit to branch master
in repository gcb.

commit 56cc010268415660a004aaf39861fea72b2f5b81
Author: Iain R. Learmonth <irl at fsfe.org>
Date:   Wed Aug 12 23:57:56 2015 +0100

    Split patch; use CFLAGS and LDFLAGS from dpkg-buildflags
---
 Makefile                               | 12 -------
 debian/patches/add-makefile.patch      | 18 ++++++++++
 debian/patches/pre-quilt-changes.patch | 62 +++++-----------------------------
 debian/patches/series                  |  1 +
 gc.c                                   | 28 ++++++++-------
 5 files changed, 42 insertions(+), 79 deletions(-)

diff --git a/Makefile b/Makefile
deleted file mode 100644
index d9783c3..0000000
--- a/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-CC = gcc
-PROG = gcb
-CFLAGS = -O2 -Wall
-
-$(PROG):
-	$(CC) $(CFLAGS) -o $(PROG) gc.c -lm
-
-install:
-	install -s -o root -g root $(PROG) $(DESTDIR)/usr/bin
-
-clean:
-	rm -f gc $(PROG)
diff --git a/debian/patches/add-makefile.patch b/debian/patches/add-makefile.patch
new file mode 100644
index 0000000..2212512
--- /dev/null
+++ b/debian/patches/add-makefile.patch
@@ -0,0 +1,18 @@
+Description: Add a Makefile for building and installing
+Author: Iain R. Learmonth <irl at fsfe.org>
+Last-Update: 2015-08-12
+
+--- /dev/null
++++ gcb/Makefile
+@@ -0,0 +1,11 @@
++CC = gcc
++PROG = gcb
++
++$(PROG):
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) gc.c -lm
++
++install:
++	install -s -o root -g root $(PROG) $(DESTDIR)/usr/bin
++
++clean:
++	rm -f gc $(PROG)
diff --git a/debian/patches/pre-quilt-changes.patch b/debian/patches/pre-quilt-changes.patch
index 535dcbb..4248577 100644
--- a/debian/patches/pre-quilt-changes.patch
+++ b/debian/patches/pre-quilt-changes.patch
@@ -1,55 +1,9 @@
-Description: <short summary of the patch>
- TODO: Put a short summary on the line above and replace this paragraph
- with a longer explanation of this change. Complete the meta-information
- with other relevant fields (see below for details). To make it easier, the
- information below has been extracted from the changelog. Adjust it or drop
- it.
- .
- gcb (1:1.07-4) UNRELEASED; urgency=medium
- .
-   * Adopted by the Debian Hamradio Maintainers (Closes: #553654)
-   * debian/control:
-     - Bumped standards version to 3.9.6
-     - Maintainer set to Debian Hamradio Maintainers
-     - Added myself to uploaders
-     - Changed debhelper version to >= 9
-     - Added ${misc:Depends} to Build-Depends
-     - Added Vcs-* fields for the pkg-hamradio Git repository
-   * debian/compat:
-     - Bumped compat level to 9
+Description: Changes made prior to quilt being used
 Author: Iain R. Learmonth <irl at fsfe.org>
-Bug-Debian: https://bugs.debian.org/553654
+Last-Update: 2015-08-12
 
----
-The information above should follow the Patch Tagging Guidelines, please
-checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
-are templates for supplementary fields that you might want to add:
-
-Origin: <vendor|upstream|other>, <url of original patch>
-Bug: <url in upstream bugtracker>
-Bug-Debian: https://bugs.debian.org/<bugnumber>
-Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
-Forwarded: <no|not-needed|url proving that it has been forwarded>
-Reviewed-By: <name and email of someone who approved the patch>
-Last-Update: <YYYY-MM-DD>
-
---- /dev/null
-+++ gcb-1.07/Makefile
-@@ -0,0 +1,12 @@
-+CC = gcc
-+PROG = gcb
-+CFLAGS = -O2 -Wall
-+
-+$(PROG):
-+	$(CC) $(CFLAGS) -o $(PROG) gc.c -lm
-+
-+install:
-+	install -s -o root -g root $(PROG) $(DESTDIR)/usr/bin
-+
-+clean:
-+	rm -f gc $(PROG)
---- gcb-1.07.orig/gc.c
-+++ gcb-1.07/gc.c
+--- gcb.orig/gc.c
++++ gcb/gc.c
 @@ -12,10 +12,10 @@
   *
   *      Usage examples:
@@ -74,7 +28,7 @@ Last-Update: <YYYY-MM-DD>
   */
  
  /* Includes */
-@@ -101,7 +101,7 @@ void parse(s, lat, lon)
+@@ -101,7 +101,7 @@
  char    *s;
  double  *lat, *lon;
  {
@@ -83,7 +37,7 @@ Last-Update: <YYYY-MM-DD>
  
          e = s + strlen(s);
          for (i = s; i < e; ++i)  {
-@@ -148,7 +148,7 @@ double  *lat, *lon;
+@@ -148,7 +148,7 @@
                  *lat = -89.9;
  }
  
@@ -92,7 +46,7 @@ Last-Update: <YYYY-MM-DD>
  int  argc;
  char **argv;
  {
-@@ -157,17 +157,15 @@ char **argv;
+@@ -157,17 +157,15 @@
  	int	units;
  
          if (argc != 4)  {
@@ -114,7 +68,7 @@ Last-Update: <YYYY-MM-DD>
  
                  exit(1);
          }
-@@ -261,10 +259,10 @@ char **argv;
+@@ -261,10 +259,10 @@
  
          /* Computations complete, show answer */
  
diff --git a/debian/patches/series b/debian/patches/series
index 36f20b7..b5bfee3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 pre-quilt-changes.patch
+add-makefile.patch
diff --git a/gc.c b/gc.c
index f8a248d..ebc2560 100644
--- a/gc.c
+++ b/gc.c
@@ -12,10 +12,10 @@
  *
  *      Usage examples:
  *
- *      gcb n 35.19n97.27w 0s0e           (Moore to Prime/Equator)
- *      gcb n 35.19N97.27W 38.51n77.02W   (Moore to Washington D.C., mixed case)
- *      gcb n 33.56n118.24w 55.45n37.35e  (L.A. to Moscow)
- *	gcb n 35N70W 35N71W		 (No decimal points used, all uppercase)
+ *      gc n 35.19n97.27w 0s0e           (Moore to Prime/Equator)
+ *      gc n 35.19N97.27W 38.51n77.02W   (Moore to Washington D.C., mixed case)
+ *      gc n 33.56n118.24w 55.45n37.35e  (L.A. to Moscow)
+ *	gc n 35N70W 35N71W		 (No decimal points used, all uppercase)
  *
  *	Modified the program to incorporate short and long path information
  *	from the Satellite Handbook.  This version also takes into consideration
@@ -23,7 +23,7 @@
  *	antipodal points, which are easily calculated.  These last points were
  *	made in discussions with John Allison who makes the nice MAPIT program.
  *
- *	Compile GNU C with: cc -O gc.c -o gcb -lm
+ *	Compile GNU C with: cc -O gc.c -o gc -lm
  */
 
 /* Includes */
@@ -101,7 +101,7 @@ void parse(s, lat, lon)
 char    *s;
 double  *lat, *lon;
 {
-        register char   *i, *t=NULL, *e;
+        register char   *i, *t, *e;
 
         e = s + strlen(s);
         for (i = s; i < e; ++i)  {
@@ -148,7 +148,7 @@ double  *lat, *lon;
                 *lat = -89.9;
 }
 
-int main(argc, argv)
+void main(argc, argv)
 int  argc;
 char **argv;
 {
@@ -157,15 +157,17 @@ char **argv;
 	int	units;
 
         if (argc != 4)  {
-            fprintf(stderr, "\nUsage: gcb units station1 station2\n\n" \
-            "This program computes long/short radio path\n" \
+            fprintf(stderr, "\nUsage: gc units station1 station2\n\n" \
+            "This program computes Great Circle Bearing and Range\n" \
             "given the latitude and longitude (degrees and minutes).\n\n" \
             "You must input the lat/long of the two stations.\n" \
             "The output will then be relative from station1 to station2.\n\n" \
             "Input the two station lat/longs using the following format:\n\n" \
             "\tdd.mmHddd.mmG  lead/lagging zeros can be left out.\n\n" \
-            "d = Degrees, m = Minutes, H = Hemisphere (N or S), G = Greenwich (W or E)\n\n" \
-            "units is 'n' for Nautical, 'k' for kilometers, and 's' for Statute.\n\n");
+            "d = Degrees, m = Minutes, H = Hemisphere (N or S), " \
+	    "G = Greenwich (W or E)\n\n" \
+            "units is 'n' for Nautical, 'k' for kilometers, and 's' for " \
+            "Statute.\n\n");
 
                 exit(1);
         }
@@ -259,10 +261,10 @@ char **argv;
 
         /* Computations complete, show answer */
 
-        printf("Short Radio Path is %03.0f Degrees for %.0f %s\n",
+        printf("Short Path Bearing is %03.0f Degrees for %.0f %s\n",
 	        azsp, distsp, Units[units].text);
 
-        printf(" Long Radio Path is %03.0f Degrees for %.0f %s\n",
+        printf(" Long Path Bearing is %03.0f Degrees for %.0f %s\n",
 	        azlp, distlp, Units[units].text);
 
         exit(0);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gcb.git



More information about the pkg-hamradio-commits mailing list