From f8411709b2ddea1c6ea4dd94e3a88fffc8b5db8e Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Tue, 3 May 2016 13:20:58 +0000
Subject: [PATCH] Don't add '-src' to the name of the tar ball generated by the
 gen-dist target

The package isn't a source distribution but a binary package.

While at it, use a variable for the name to reduce the chances
that the various references get out of sync and fix the gen-upload
target which was looking in the wrong directory.
---
 GNUmakefile.in | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/GNUmakefile.in b/GNUmakefile.in
index 9a2572d8..92bea981 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -1,6 +1,6 @@
 # Note:  GNUmakefile is built automatically from GNUmakefile.in
 #
-# $Id: GNUmakefile.in,v 1.242 2016/04/10 08:08:40 fabiankeil Exp $
+# $Id: GNUmakefile.in,v 1.243 2016/04/10 08:09:07 fabiankeil Exp $
 #
 # Written by and Copyright (C) 2001-2014 members of the
 # Privoxy team. http://www.privoxy.org/
@@ -162,6 +162,7 @@ SOURCE_FORGE_NAME = ''
 #############################################################################
 
 TAR_ARCH = /tmp/privoxy-$(VERSION).tar.gz
+GEN_DIST_TAR_NAME = privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS).tar
 
 #############################################################################
 # We include these files in our distributions
@@ -366,23 +367,23 @@ gen-dist: dist-check
 	$(STRIP_PROG) $(PROGRAM)
 	$(LN) -s current ../privoxy-$(VERSION)-$(CODE_STATUS)
 # add program
-	(cd .. && $(TAR) --exclude "PACKAGERS" -cvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$(PROGRAM))
+	(cd .. && $(TAR) --exclude "PACKAGERS" -cvhf $(GEN_DIST_TAR_NAME) privoxy-$(VERSION)-$(CODE_STATUS)/$(PROGRAM))
 # add config files
 	for foo in $(CONFIG_FILES); do \
-		(cd .. && $(TAR) --exclude "PACKAGERS" -uvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
+		(cd .. && $(TAR) --exclude "PACKAGERS" -uvhf $(GEN_DIST_TAR_NAME) privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
 	done;
 # add documentation
 	for foo in $(DOC_FILES); do \
-		(cd .. && $(TAR) --exclude "PACKAGERS" -uvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
+		(cd .. && $(TAR) --exclude "PACKAGERS" -uvhf $(GEN_DIST_TAR_NAME) privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
 	done;
 # and zip the archive
 	$(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
-	$(GZIP_PROG) ../privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar
+	$(GZIP_PROG) ../$(GEN_DIST_TAR_NAME)
 	@$(ECHO) Distribution with binary created.
 
 # anonymously ncftps the package to sourceforge
 gen-upload:
-	ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming ../privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar.gz
+	ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming ../$(GEN_DIST_TAR_NAME).gz
 	@$(ECHO) -------------------------------------------------------
 	@$(ECHO) Now goto
 	@$(ECHO) https://sourceforge.net/project/admin/editpackages.php?group_id=11118
@@ -391,7 +392,7 @@ gen-upload:
 
 # use with care
 gen-clean:
-	$(RM) privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar*
+	$(RM) ../$(GEN_DIST_TAR_NAME)*
 
 #############################################################################
 # Tarball distribution: No CVS dirs, dotfiles, debian build dir,
-- 
2.49.0