[Pkg-electronics-commits] [pcb-rnd] 02/26: initial debianization

Dima Kogan dima at secretsauce.net
Mon Jan 16 22:31:51 UTC 2017


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

dkogan pushed a commit to branch master
in repository pcb-rnd.

commit 0ced829049237caaf792bb65cd5a857f9ca850de
Author: Dima Kogan <dima at secretsauce.net>
Date:   Sat Dec 17 20:19:40 2016 -0800

    initial debianization
---
 debian/README.source                               |    3 +
 debian/changelog                                   |    5 +
 debian/compat                                      |    1 +
 debian/control                                     |   29 +
 debian/copyright                                   |   90 ++
 ...es-recurse-with-MAKE-to-allow-parallelism.patch | 1320 ++++++++++++++++++++
 .../0003-renamed-install_root-DESTDIR.patch        |  112 ++
 ...-I-use-the-CFLAGS-from-.-configure-CFLAGS.patch |   20 +
 ...-uses-the-CFLAGS-LDFLAGS-from-.-configure.patch |   27 +
 debian/patches/0006-not-trying-to-build-gts.patch  |   76 ++
 debian/patches/series                              |    5 +
 debian/pcb-rnd-gsch2pcb.install                    |    4 +
 debian/pcb-rnd.install                             |    9 +
 debian/pcb-rnd.menu                                |    5 +
 debian/pcb-rnd.xpm                                 |  295 +++++
 debian/rules                                       |   83 ++
 debian/source/format                               |    1 +
 debian/watch                                       |    3 +
 18 files changed, 2088 insertions(+)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..fb6c62b
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,3 @@
+The source was repacked to remove the debian/ directory in the upstream tarball
+
+ -- Dima Kogan <dkogan at debian.org>, Sat, 17 Dec 2016 18:41:10 -0800
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..e5c926b
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+pcb-rnd (1.1.3+repack1-1) unstable; urgency=low
+
+  * New upstream release (Closes: #843839)
+
+ -- Dima Kogan <dkogan at debian.org>  Sat, 17 Dec 2016 13:39:19 -0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..3a9c2ce
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,29 @@
+Source: pcb-rnd
+Section: electronics
+Priority: optional
+Maintainer: Debian Electronics Team <pkg-electronics-devel at lists.alioth.debian.org>
+Uploaders: Dima Kogan <dkogan at debian.org>, Bdale Garbee <bdale at gag.com>
+Build-Depends: debhelper (>= 9), libgd-dev, libgtkglext1-dev, libdbus-1-dev, libstroke0-dev
+Standards-Version: 3.9.8
+Homepage: http://repo.hu/projects/pcb-rnd
+Vcs-Git: git://anonscm.debian.org/pkg-electronics/pcb-rnd.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-electronics/pcb-rnd.git
+
+Package: pcb-rnd
+Architecture: any
+Replaces: pcb
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: printed circuit board (pcb) design program
+ pcb-rnd is an interactive printed circuit board editor for the X11 window 
+ system. pcb-rnd includes a rats nest feature, design rule checking, and can 
+ provide industry standard RS-274-X (Gerber), NC drill, and centroid data 
+ (X-Y data) output for use in the board fabrication and assembly process. 
+
+Package: pcb-rnd-gsch2pcb
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: printed circuit board (pcb) design program - vendor maps
+ pcb-rnd is a modular, interactive printed circuit board editor.
+ .
+ This package provides the external tool gsch2pcb-rnd that can convert
+ a gschem schematics to files that can be imported in pcb-rnd.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..f513fc3
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,90 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0
+Upstream-Name: pcb-rnd
+Upstream-Contact: Tibor Palinkas <pcb-rnd at igor2.repo.hu>
+Source: http://repo.hu/projects/pcb-rnd
+
+Files: *
+Copyright: 1994-1997,2010 Thomas Nau <Thomas.Nau at rz.uni-ulm.de>
+           1998-2007,2009 harry eaton <haceaton at aplcomm.jhuapl.edu>
+           2001 C. Scott Ananian
+           2003-2008 DJ Delorie <djdelorie at users.sourceforge.net>
+           2009-2011 PCB Contributors (See Changelog for details)
+           2009 Anthony Blake <anthonix at anthonix.resnet.scms.waikato.ac.nz>
+           2011 Andrew Poelstra <apoelstra at wpsoftware.net>
+           2010 Alberto Maccioni <alberto.maccioni at gmail.com>
+           2003-2010 Dan McMahill <danmc at users.sourceforge.net>
+           2013-2016 Tibor Palinkas <pcb-rnd at igor2.repo.hu>
+License: GPL-2+
+
+Files: src_3rd/genlist/*
+Copyright: 2016 Tibor Palinkas <pcb-rnd at igor2.repo.hu>
+License: BSD
+
+Files: src_3rd/gensexpr/*
+Copyright: 2016 Tibor Palinkas <pcb-rnd at igor2.repo.hu>
+License: BSD
+
+Files: src_3rd/genvector/*
+Copyright: 2016 Tibor Palinkas <pcb-rnd at igor2.repo.hu>
+License: BSD
+
+Files: src_3rd/liblihata/*
+Copyright: 2013,2016 Tibor Palinkas <pcb-rnd at igor2.repo.hu>
+           2013 Gabor Horvath
+License: GPL-2+
+
+Files: src_3rd/qparse/*
+Copyright: 2006-2007 Tibor Palinkas <pcb-rnd at igor2.repo.hu>
+License: GPL-2+
+
+Files: src_3rd/sphash/*
+Copyright: 2008,2011,2013,2014,2016 Tibor Palinkas <pcb-rnd at igor2.repo.hu>
+License: GPL-2+
+
+Files: debian/*
+Copyright: 2016 Dima Kogan <dkogan at debian.org>
+License: GPL-2+
+
+License: GPL-2+
+ 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 Street, Fifth Floor, Boston, MA  02110-1301,
+ USA.
+ .
+ On Debian systems, the complete text of the GNU GPL2 licenses can be found at
+ `/usr/share/common-licenses/GPL-2'.
+
+License: BSD
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the Author nor the names of contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
diff --git a/debian/patches/0001-Makefiles-recurse-with-MAKE-to-allow-parallelism.patch b/debian/patches/0001-Makefiles-recurse-with-MAKE-to-allow-parallelism.patch
new file mode 100644
index 0000000..2d0a1f5
--- /dev/null
+++ b/debian/patches/0001-Makefiles-recurse-with-MAKE-to-allow-parallelism.patch
@@ -0,0 +1,1320 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sat, 17 Dec 2016 15:30:27 -0800
+Subject: Makefiles: recurse with $(MAKE) to allow parallelism
+
+The child 'make' processes now know about and can use the jobserver
+---
+ Makefile                                       | 60 +++++++++++++-------------
+ data/Makefile                                  |  4 +-
+ doc-orig/tutorial/Makefile                     |  4 +-
+ doc-rnd/Makefile                               | 10 ++---
+ doc-rnd/djopt/Makefile                         | 10 ++---
+ doc-rnd/gpmi/Makefile                          |  2 +-
+ doc-rnd/man/Makefile                           |  4 +-
+ pcblib/Makefile                                |  4 +-
+ scconfig/src/tmpasm/Makefile                   |  2 +-
+ src/Makefile.in                                |  8 ++--
+ src_3rd/genregex/Makefile                      |  2 +-
+ src_3rd/genvector/Makefile                     |  4 +-
+ src_3rd/liblhtpers/tests/Makefile              |  2 +-
+ src_3rd/liblihata/Makefile                     |  6 +--
+ src_3rd/liblihata/Makefile.module              |  2 +-
+ src_3rd/liblihata/genht/Makefile               |  4 +-
+ src_3rd/liblihata/regression/Makefile          | 12 +++---
+ src_3rd/liblihata/regression/Makefile.test     |  2 +-
+ src_3rd/sphash/Makefile                        |  4 +-
+ src_plugins/autocrop/Makefile                  |  2 +-
+ src_plugins/autoplace/Makefile                 |  2 +-
+ src_plugins/autoroute/Makefile                 |  2 +-
+ src_plugins/boardflip/Makefile                 |  2 +-
+ src_plugins/dbus/Makefile                      |  2 +-
+ src_plugins/diag/Makefile                      |  2 +-
+ src_plugins/distalign/Makefile                 |  2 +-
+ src_plugins/distaligntext/Makefile             |  2 +-
+ src_plugins/djopt/Makefile                     |  2 +-
+ src_plugins/export_bboard/Makefile             |  2 +-
+ src_plugins/export_bom/Makefile                |  2 +-
+ src_plugins/export_dsn/Makefile                |  2 +-
+ src_plugins/export_dxf/Makefile                |  2 +-
+ src_plugins/export_gcode/Makefile              |  2 +-
+ src_plugins/export_gerber/Makefile             |  2 +-
+ src_plugins/export_ipcd356/Makefile            |  2 +-
+ src_plugins/export_lpr/Makefile                |  2 +-
+ src_plugins/export_nelma/Makefile              |  2 +-
+ src_plugins/export_openscad/Makefile           |  2 +-
+ src_plugins/export_png/Makefile                |  2 +-
+ src_plugins/export_ps/Makefile                 |  2 +-
+ src_plugins/export_svg/Makefile                |  2 +-
+ src_plugins/export_test/Makefile               |  2 +-
+ src_plugins/export_xy/Makefile                 |  2 +-
+ src_plugins/fontmode/Makefile                  |  2 +-
+ src_plugins/fp_fs/Makefile                     |  2 +-
+ src_plugins/fp_wget/Makefile                   |  2 +-
+ src_plugins/gpmi/Makefile                      |  2 +-
+ src_plugins/gpmi/pcb-gpmi/Makefile             |  4 +-
+ src_plugins/gpmi/pcb-gpmi/gpmi_plugin/Makefile |  8 ++--
+ src_plugins/hid_batch/Makefile                 |  2 +-
+ src_plugins/hid_gtk/Makefile                   |  2 +-
+ src_plugins/hid_lesstif/Makefile               |  2 +-
+ src_plugins/import_dsn/Makefile                |  2 +-
+ src_plugins/import_edif/Makefile               |  2 +-
+ src_plugins/import_netlist/Makefile            |  2 +-
+ src_plugins/import_sch/Makefile                |  2 +-
+ src_plugins/io_kicad/Makefile                  |  2 +-
+ src_plugins/io_kicad_legacy/Makefile           |  2 +-
+ src_plugins/io_lihata/Makefile                 |  2 +-
+ src_plugins/io_pcb/Makefile                    |  2 +-
+ src_plugins/jostle/Makefile                    |  2 +-
+ src_plugins/lib_gensexpr/Makefile              |  2 +-
+ src_plugins/lib_legacy_func/Makefile           |  2 +-
+ src_plugins/loghid/Makefile                    |  2 +-
+ src_plugins/mincut/Makefile                    |  2 +-
+ src_plugins/mincut/pcb-mincut/Makefile         |  2 +-
+ src_plugins/oldactions/Makefile                |  2 +-
+ src_plugins/polycombine/Makefile               |  2 +-
+ src_plugins/polystitch/Makefile                |  2 +-
+ src_plugins/propedit/Makefile                  |  2 +-
+ src_plugins/puller/Makefile                    |  2 +-
+ src_plugins/query/Makefile                     |  2 +-
+ src_plugins/renumber/Makefile                  |  2 +-
+ src_plugins/report/Makefile                    |  2 +-
+ src_plugins/shand_cmd/Makefile                 |  2 +-
+ src_plugins/smartdisperse/Makefile             |  2 +-
+ src_plugins/stroke/Makefile                    |  2 +-
+ src_plugins/teardrops/Makefile                 |  2 +-
+ src_plugins/toporouter/Makefile                |  2 +-
+ src_plugins/vendordrill/Makefile               |  2 +-
+ tests/Makefile                                 | 12 +++---
+ tests/conf/Makefile                            |  4 +-
+ util/Makefile                                  | 12 +++---
+ util/gsch2pcb-rnd/Makefile.in                  | 10 ++---
+ 84 files changed, 157 insertions(+), 157 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9b94591..2012124 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,44 +1,44 @@
+ all: FORCE
+-	cd src && make
+-	cd util && make
+-	cd pcblib && make
+-#	cd doc-rnd && make
++	cd src && $(MAKE)
++	cd util && $(MAKE)
++	cd pcblib && $(MAKE)
++#	cd doc-rnd && $(MAKE)
+ 
+ clean: FORCE
+-	cd src && make clean
+-	cd util && make clean
+-	cd pcblib && make clean
+-	cd doc-rnd && make clean
++	cd src && $(MAKE) clean
++	cd util && $(MAKE) clean
++	cd pcblib && $(MAKE) clean
++	cd doc-rnd && $(MAKE) clean
+ 
+ distclean: FORCE
+-	make clean ; true
+-	cd doc-rnd && make distclean
+-	cd scconfig && make clean ; true
+-	cd src_3rd/genlist && make clean ; true
+-	cd src_3rd/genregex && make clean ; true
+-	cd src_3rd/genvector && make clean ; true
+-	cd src_3rd/gts && make clean ; true
+-	cd src_3rd/liblihata && make clean ; true
+-	cd src_3rd/liblihata/genht && make clean ; true
+-	cd src_3rd/qparse && make clean ; true
++	$(MAKE) clean ; true
++	cd doc-rnd && $(MAKE) distclean
++	cd scconfig && $(MAKE) clean ; true
++	cd src_3rd/genlist && $(MAKE) clean ; true
++	cd src_3rd/genregex && $(MAKE) clean ; true
++	cd src_3rd/genvector && $(MAKE) clean ; true
++	cd src_3rd/gts && $(MAKE) clean ; true
++	cd src_3rd/liblihata && $(MAKE) clean ; true
++	cd src_3rd/liblihata/genht && $(MAKE) clean ; true
++	cd src_3rd/qparse && $(MAKE) clean ; true
+ 
+ install: FORCE
+-	cd src && make install
+-	cd util && make install
+-	cd pcblib && make install
+-	cd doc-rnd && make install
++	cd src && $(MAKE) install
++	cd util && $(MAKE) install
++	cd pcblib && $(MAKE) install
++	cd doc-rnd && $(MAKE) install
+ 
+ linstall: FORCE
+-	cd src && make linstall
+-	cd util && make linstall
+-	cd pcblib && make linstall
+-	cd doc-rnd && make linstall
++	cd src && $(MAKE) linstall
++	cd util && $(MAKE) linstall
++	cd pcblib && $(MAKE) linstall
++	cd doc-rnd && $(MAKE) linstall
+ 
+ uninstall: FORCE
+-	cd src && make uninstall
+-	cd util && make uninstall
+-	cd pcblib && make uninstall
+-	cd doc-rnd && make uninstall
++	cd src && $(MAKE) uninstall
++	cd util && $(MAKE) uninstall
++	cd pcblib && $(MAKE) uninstall
++	cd doc-rnd && $(MAKE) uninstall
+ 
+ deb: FORCE
+ 	fakeroot debian/rules clean
+diff --git a/data/Makefile b/data/Makefile
+index 3cefb09..7ca473d 100644
+--- a/data/Makefile
++++ b/data/Makefile
+@@ -51,10 +51,10 @@ install_:
+ 		-i $(theme_icons)
+ 
+ install:
+-	make install_ CPC="$(CP)"
++	$(MAKE) install_ CPC="$(CP)"
+ 
+ linstall:
+-	make install_ CPC="$(LN)"
++	$(MAKE) install_ CPC="$(LN)"
+ 
+ uninstall:
+ 	$(RM) $(DOCDIR)/examples/tut1.pcb
+diff --git a/doc-orig/tutorial/Makefile b/doc-orig/tutorial/Makefile
+index be4f806..d282f72 100644
+--- a/doc-orig/tutorial/Makefile
++++ b/doc-orig/tutorial/Makefile
+@@ -8,10 +8,10 @@ install_:
+ 	$(CPC) "`pwd`/tut1.pcb" "$(DOCDIR)/examples/tut1.pcb"
+ 
+ install:
+-	make install_ CPC="$(CP)"
++	$(MAKE) install_ CPC="$(CP)"
+ 
+ linstall:
+-	make install_ CPC="$(LN)"
++	$(MAKE) install_ CPC="$(LN)"
+ 
+ uninstall:
+ 	$(RM) "$(DOCDIR)/examples/tut1.pcb"
+diff --git a/doc-rnd/Makefile b/doc-rnd/Makefile
+index 9db603d..938a752 100644
+--- a/doc-rnd/Makefile
++++ b/doc-rnd/Makefile
+@@ -17,16 +17,16 @@ features/debian_list.html: ../debian/control
+ 	./Autostyle.sh features/debian_list.html
+ 
+ install:
+-	cd man && make install
++	cd man && $(MAKE) install
+ 
+ linstall:
+-	cd man && make linstall
++	cd man && $(MAKE) linstall
+ 
+ uninstall:
+-	cd man && make uninstall
++	cd man && $(MAKE) uninstall
+ 
+ clean:
+-	cd man && make clean
++	cd man && $(MAKE) clean
+ 
+ distclean:
+-	cd man && make distclean
++	cd man && $(MAKE) distclean
+diff --git a/doc-rnd/djopt/Makefile b/doc-rnd/djopt/Makefile
+index c6af240..e414f98 100644
+--- a/doc-rnd/djopt/Makefile
++++ b/doc-rnd/djopt/Makefile
+@@ -9,16 +9,16 @@ CASES = \
+  viatrim.$(TARGET)
+ 
+ all:
+-	make conv TARGET=out.png
+-	make conv TARGET=png
+-	make index
++	$(MAKE) conv TARGET=out.png
++	$(MAKE) conv TARGET=png
++	$(MAKE) index
+ 
+ index:
+-	make index.html TARGET=txt
++	$(MAKE) index.html TARGET=txt
+ 
+ index.html: Pre.html Post.html $(CASES) Makefile
+ 	cat Pre.html > $(HTML)
+-	make conv TARGET=tbl
++	$(MAKE) conv TARGET=tbl
+ 	cat Post.html >>$(HTML)
+ 
+ conv: $(CASES)
+diff --git a/doc-rnd/gpmi/Makefile b/doc-rnd/gpmi/Makefile
+index 6406e2f..7c0f0ac 100644
+--- a/doc-rnd/gpmi/Makefile
++++ b/doc-rnd/gpmi/Makefile
+@@ -2,7 +2,7 @@ DPI_BIG=-Gsize=8,8 -Gdpi=166
+ DPI=-Gsize=8,8 -Gdpi=100
+ 
+ all:  gpmi_flow.png gpmi_flow_load.png gpmi_flow_reg.png gpmi_flow_menu.png gpmi_flow_exp.png
+-	cd rosetta && make
++	cd rosetta && $(MAKE)
+ 
+ gpmi_flow.png: gpmi_flow.dot Makefile
+ 	dot $(DPI_BIG) -Tpng gpmi_flow.dot >$@
+diff --git a/doc-rnd/man/Makefile b/doc-rnd/man/Makefile
+index 4364dbb..4a88b1c 100644
+--- a/doc-rnd/man/Makefile
++++ b/doc-rnd/man/Makefile
+@@ -49,10 +49,10 @@ uninstall:
+ 	$(RM) "$(MAN1DIR)/gsch2pcb-rnd.1"
+ 
+ install:
+-	make install_ CPC="$(CP)"
++	$(MAKE) install_ CPC="$(CP)"
+ 
+ linstall:
+-	make install_ CPC="$(LN)"
++	$(MAKE) install_ CPC="$(LN)"
+ 
+ include ../../Makefile.conf
+ 
+diff --git a/pcblib/Makefile b/pcblib/Makefile
+index a850c03..eb72121 100644
+--- a/pcblib/Makefile
++++ b/pcblib/Makefile
+@@ -16,12 +16,12 @@ install_:
+ 	$(CPC) "`pwd`/tru-hole"/* "$(DATADIR)/pcblib/tru-hole"
+ 
+ install:
+-	make install_ CPC="$(CP)"
++	$(MAKE) install_ CPC="$(CP)"
+ 
+ # hack: pcb's chdir() based approach gets fooled on symlinks because of "cd .."
+ # returns to the wrong dir - rather symlink the whole dir
+ linstall:
+-	make uninstall
++	$(MAKE) uninstall
+ 	$(MKDIR) "$(DATADIR)"
+ 	$(LN) "`pwd`" "$(DATADIR)/pcblib"
+ 
+diff --git a/scconfig/src/tmpasm/Makefile b/scconfig/src/tmpasm/Makefile
+index 068e0f7..1d1ec24 100644
+--- a/scconfig/src/tmpasm/Makefile
++++ b/scconfig/src/tmpasm/Makefile
+@@ -9,7 +9,7 @@ tester: tester.o tmpasm.o debug.o tmpasm_scconfig.o \
+ tmpasm.o: tmpasm.c tmpasm.h
+ 
+ test: regression/Makefile
+-	cd regression && make
++	cd regression && $(MAKE)
+ 
+ regression/Makefile: regression/Makefile.in tester
+ 	./tester -e < regression/Makefile.in > regression/Makefile
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 800e417..96b2634 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -234,8 +234,8 @@ SPHASH_PATH=../src_3rd/sphash
+ SPHASH=$(SPHASH_PATH)/sphash
+ 
+ all:
+-	make revcheck
+-	make all_exe
++	$(MAKE) revcheck
++	$(MAKE) all_exe
+ 
+ include ../Makefile.conf
+ 
+@@ -304,10 +304,10 @@ install_:
+ 
+ 
+ install:
+-	make install_ CPC="$(CP)"@/local/pcb/rules/install@
++	$(MAKE) install_ CPC="$(CP)"@/local/pcb/rules/install@
+ 
+ linstall:
+-	make install_ CPC="$(LN)"@/local/pcb/rules/linstall@
++	$(MAKE) install_ CPC="$(LN)"@/local/pcb/rules/linstall@
+ 
+ 
+ uninstall:
+diff --git a/src_3rd/genregex/Makefile b/src_3rd/genregex/Makefile
+index 858e67d..8b3964b 100644
+--- a/src_3rd/genregex/Makefile
++++ b/src_3rd/genregex/Makefile
+@@ -28,7 +28,7 @@ regex_bt.o: regex_bt.c regex_bt.h   regex_templ.c regex_templ.h regex.h
+ regex_bti.o: regex_bti.c regex_bti.h   regex_templ.c regex_templ.h regex.h
+ 
+ test:
+-	cd ../regression; make all
++	cd ../regression; $(MAKE) all
+ 
+ clean:
+ 	rm $(OBJS) tester 2>/dev/null ; true
+diff --git a/src_3rd/genvector/Makefile b/src_3rd/genvector/Makefile
+index e77fc2e..4de9ca4 100644
+--- a/src_3rd/genvector/Makefile
++++ b/src_3rd/genvector/Makefile
+@@ -46,8 +46,8 @@ uninstall:
+ 	rm $(INCDIR)/gds_*.h $(INCDIR)/genvector*.h $(INCDIR)/vt*.h
+ 
+ install:
+-	make install_ CP="cp" PWD=`pwd`
++	$(MAKE) install_ CP="cp" PWD=`pwd`
+ 
+ linstall:
+-	make install_ CP="ln -s" PWD=`pwd`
++	$(MAKE) install_ CP="ln -s" PWD=`pwd`
+ 
+diff --git a/src_3rd/liblhtpers/tests/Makefile b/src_3rd/liblhtpers/tests/Makefile
+index 3c99e4a..0c1c5ae 100644
+--- a/src_3rd/liblhtpers/tests/Makefile
++++ b/src_3rd/liblhtpers/tests/Makefile
+@@ -14,7 +14,7 @@ include Makefile.dep
+ perstest: $(OBJS)
+ 
+ test:
+-	@cd roundtrip && make test
++	@cd roundtrip && $(MAKE) test
+ 
+ depend:
+ 	@echo "# Generated by \"make depend\"" > Makefile.dep
+diff --git a/src_3rd/liblihata/Makefile b/src_3rd/liblihata/Makefile
+index 2441678..04c223b 100644
+--- a/src_3rd/liblihata/Makefile
++++ b/src_3rd/liblihata/Makefile
+@@ -40,7 +40,7 @@ ns: liblihata.a
+ 	@nm liblihata.a | awk '/ [ABCDGNRSTVW] / { if (($$(NF) ~ "^lht_") || ($$(NF) ~ "^hts._")) next; print $$0}'
+ 
+ test:
+-	cd regression && make
++	cd regression && $(MAKE)
+ 
+ clean:
+ 	-rm $(OBJS) $(TESTERS) $(LIBS) 2>/dev/null
+@@ -61,9 +61,9 @@ uninstall:
+ 	rm -rf $(INCDIR)
+ 
+ install:
+-	make install_ CP="cp" PWD=`pwd`
++	$(MAKE) install_ CP="cp" PWD=`pwd`
+ 
+ linstall:
+-	make install_ CP="ln -sf" PWD=`pwd`
++	$(MAKE) install_ CP="ln -sf" PWD=`pwd`
+ 
+ include $(ROOT)/Makefile.common
+diff --git a/src_3rd/liblihata/Makefile.module b/src_3rd/liblihata/Makefile.module
+index 7f7daa1..6936efe 100644
+--- a/src_3rd/liblihata/Makefile.module
++++ b/src_3rd/liblihata/Makefile.module
+@@ -1,4 +1,4 @@
+ # module Makefile
+ 
+ $(ROOT)/liblihata/liblihata.a:
+-	cd $(ROOT)/liblihata && make all
++	cd $(ROOT)/liblihata && $(MAKE) all
+diff --git a/src_3rd/liblihata/genht/Makefile b/src_3rd/liblihata/genht/Makefile
+index ae0a095..8a30926 100644
+--- a/src_3rd/liblihata/genht/Makefile
++++ b/src_3rd/liblihata/genht/Makefile
+@@ -41,7 +41,7 @@ uninstall:
+ 	rm $(LIBDIR)/genht_std.so  $(LIBDIR)/genht_std.a
+ 
+ install:
+-	make install_ CP="cp"
++	$(MAKE) install_ CP="cp"
+ 
+ linstall:
+-	make install_ CP="ln -s"
++	$(MAKE) install_ CP="ln -s"
+diff --git a/src_3rd/liblihata/regression/Makefile b/src_3rd/liblihata/regression/Makefile
+index 173833a..ec64ad8 100644
+--- a/src_3rd/liblihata/regression/Makefile
++++ b/src_3rd/liblihata/regression/Makefile
+@@ -5,7 +5,7 @@ LOG=Tests.log
+ 
+ all: Makefile.test
+ 	@echo "Normal" > $(LOG)
+-	@make -f Makefile.test ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
++	@$(MAKE) -f Makefile.test ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
+ 
+ # This rule will work only on modern UNIX systems (GNU/Linux)
+ # but this is not a big loss: it's for developers to check
+@@ -13,12 +13,12 @@ all: Makefile.test
+ # too many systems anyway.
+ valg: Makefile.test
+ 	@echo "Valgrind" > $(LOG)
+-	@make -f Makefile.test valg ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
++	@$(MAKE) -f Makefile.test valg ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
+ 	@echo "*** Valgrind result summary (only leaky tests listed): ***"
+ 	@grep -H "ERROR SUMMARY:" *.evalg *.dvalg | grep -v  "ERROR SUMMARY: 0 errors" ; true
+ 
+ force:
+-	@make clean && make all
++	@$(MAKE) clean && $(MAKE) all
+ 
+ Makefile.test: Makefile Makegen.sh *.tts *.lht Tests.exclude
+ 	./Makegen.sh Tests.exclude > Makefile.test
+@@ -27,18 +27,18 @@ Makefile.test: Makefile Makegen.sh *.tts *.lht Tests.exclude
+ 
+ .lht.REF: Makefile.test
+ 	@echo "" > $(LOG)
+-	@make -f Makefile.test $@ ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
++	@$(MAKE) -f Makefile.test $@ ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
+ 
+ .tts.REF: Makefile.test
+ 	@echo "" > $(LOG)
+-	@make -f Makefile.test $@ ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
++	@$(MAKE) -f Makefile.test $@ ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
+ 
+ leak:
+ 	grep -i lost *valg | awk -F '[:]' '{ print $$1 }' | uniq
+ 
+ 
+ clean: Makefile.test
+-	@make -f Makefile.test $@ ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
++	@$(MAKE) -f Makefile.test $@ ETESTER=$(ETESTER) DTESTER=$(DTESTER) TTESTER=$(TTESTER) LOG=$(LOG)
+ 
+ Tests.exclude:
+ 	echo "" > Tests.exclude
+diff --git a/src_3rd/liblihata/regression/Makefile.test b/src_3rd/liblihata/regression/Makefile.test
+index f702b0e..7ee0c4d 100644
+--- a/src_3rd/liblihata/regression/Makefile.test
++++ b/src_3rd/liblihata/regression/Makefile.test
+@@ -1477,4 +1477,4 @@ out/tree_unlink.valg: $(ETESTER)
+ 
+ ############## build testers ##############
+ $(ETESTER) $(DTESTER) $(TTESTER):
+-	cd .. && make
++	cd .. && $(MAKE)
+diff --git a/src_3rd/sphash/Makefile b/src_3rd/sphash/Makefile
+index 91d3633..4a51819 100644
+--- a/src_3rd/sphash/Makefile
++++ b/src_3rd/sphash/Makefile
+@@ -29,10 +29,10 @@ install_: sphash
+ 	$(CP) `pwd`/sphash $(install_root)/usr/bin/sphash
+ 
+ install:
+-	make install_ CP=cp
++	$(MAKE) install_ CP=cp
+ 
+ linstall:
+-	make install_ CP="ln -s"
++	$(MAKE) install_ CP="ln -s"
+ 
+ uninstall:
+ 	rm $(install_root)/usr/bin/sphash
+diff --git a/src_plugins/autocrop/Makefile b/src_plugins/autocrop/Makefile
+index a41e18e..60e9e38 100644
+--- a/src_plugins/autocrop/Makefile
++++ b/src_plugins/autocrop/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_autocrop
++	cd ../../src && $(MAKE) mod_autocrop
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/autoplace/Makefile b/src_plugins/autoplace/Makefile
+index dfcba41..f7c508f 100644
+--- a/src_plugins/autoplace/Makefile
++++ b/src_plugins/autoplace/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_autoplace
++	cd ../../src && $(MAKE) mod_autoplace
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/autoroute/Makefile b/src_plugins/autoroute/Makefile
+index 380ab39..e12353d 100644
+--- a/src_plugins/autoroute/Makefile
++++ b/src_plugins/autoroute/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_autoroute
++	cd ../../src && $(MAKE) mod_autoroute
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/boardflip/Makefile b/src_plugins/boardflip/Makefile
+index 03c3cbd..da1ec3a 100644
+--- a/src_plugins/boardflip/Makefile
++++ b/src_plugins/boardflip/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_boardflip
++	cd ../../src && $(MAKE) mod_boardflip
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/dbus/Makefile b/src_plugins/dbus/Makefile
+index 61529b2..9dc4e57 100644
+--- a/src_plugins/dbus/Makefile
++++ b/src_plugins/dbus/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_dbus
++	cd ../../src && $(MAKE) mod_dbus
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/diag/Makefile b/src_plugins/diag/Makefile
+index 91238a7..391b937 100644
+--- a/src_plugins/diag/Makefile
++++ b/src_plugins/diag/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_diag
++	cd ../../src && $(MAKE) mod_diag
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/distalign/Makefile b/src_plugins/distalign/Makefile
+index d547c2a..811c2b6 100644
+--- a/src_plugins/distalign/Makefile
++++ b/src_plugins/distalign/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_distalign
++	cd ../../src && $(MAKE) mod_distalign
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/distaligntext/Makefile b/src_plugins/distaligntext/Makefile
+index c76b4db..e133e1b 100644
+--- a/src_plugins/distaligntext/Makefile
++++ b/src_plugins/distaligntext/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_distaligntext
++	cd ../../src && $(MAKE) mod_distaligntext
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/djopt/Makefile b/src_plugins/djopt/Makefile
+index 5751c57..3e14264 100644
+--- a/src_plugins/djopt/Makefile
++++ b/src_plugins/djopt/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_djopt
++	cd ../../src && $(MAKE) mod_djopt
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_bboard/Makefile b/src_plugins/export_bboard/Makefile
+index 9fc5059..1f56325 100644
+--- a/src_plugins/export_bboard/Makefile
++++ b/src_plugins/export_bboard/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_bboard
++	cd ../../src && $(MAKE) mod_export_bboard
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_bom/Makefile b/src_plugins/export_bom/Makefile
+index cafd8e5..cb2252e 100644
+--- a/src_plugins/export_bom/Makefile
++++ b/src_plugins/export_bom/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_bom
++	cd ../../src && $(MAKE) mod_export_bom
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_dsn/Makefile b/src_plugins/export_dsn/Makefile
+index 484a0ad..ad9ac5c 100644
+--- a/src_plugins/export_dsn/Makefile
++++ b/src_plugins/export_dsn/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_dsn
++	cd ../../src && $(MAKE) mod_export_dsn
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_dxf/Makefile b/src_plugins/export_dxf/Makefile
+index c6da93f..34aaaf2 100644
+--- a/src_plugins/export_dxf/Makefile
++++ b/src_plugins/export_dxf/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_dxf
++	cd ../../src && $(MAKE) mod_export_dxf
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_gcode/Makefile b/src_plugins/export_gcode/Makefile
+index 2c43ef0..0fbc7e6 100644
+--- a/src_plugins/export_gcode/Makefile
++++ b/src_plugins/export_gcode/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_gcode
++	cd ../../src && $(MAKE) mod_export_gcode
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_gerber/Makefile b/src_plugins/export_gerber/Makefile
+index 14bcdf0..730f76a 100644
+--- a/src_plugins/export_gerber/Makefile
++++ b/src_plugins/export_gerber/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_gerber
++	cd ../../src && $(MAKE) mod_export_gerber
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_ipcd356/Makefile b/src_plugins/export_ipcd356/Makefile
+index f816b9f..e69e6b9 100644
+--- a/src_plugins/export_ipcd356/Makefile
++++ b/src_plugins/export_ipcd356/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_ipcd356
++	cd ../../src && $(MAKE) mod_export_ipcd356
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_lpr/Makefile b/src_plugins/export_lpr/Makefile
+index bbf5342..6d7ba00 100644
+--- a/src_plugins/export_lpr/Makefile
++++ b/src_plugins/export_lpr/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_lpr
++	cd ../../src && $(MAKE) mod_export_lpr
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_nelma/Makefile b/src_plugins/export_nelma/Makefile
+index 3b6a322..f9afca3 100644
+--- a/src_plugins/export_nelma/Makefile
++++ b/src_plugins/export_nelma/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_nelma
++	cd ../../src && $(MAKE) mod_export_nelma
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_openscad/Makefile b/src_plugins/export_openscad/Makefile
+index c77f26b..0708b15 100644
+--- a/src_plugins/export_openscad/Makefile
++++ b/src_plugins/export_openscad/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_openscad
++	cd ../../src && $(MAKE) mod_export_openscad
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_png/Makefile b/src_plugins/export_png/Makefile
+index 8b4cfea..ae86881 100644
+--- a/src_plugins/export_png/Makefile
++++ b/src_plugins/export_png/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_png
++	cd ../../src && $(MAKE) mod_export_png
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_ps/Makefile b/src_plugins/export_ps/Makefile
+index c1dd95c..f8ee0a4 100644
+--- a/src_plugins/export_ps/Makefile
++++ b/src_plugins/export_ps/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_ps
++	cd ../../src && $(MAKE) mod_export_ps
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_svg/Makefile b/src_plugins/export_svg/Makefile
+index 90a3a2d..063150c 100644
+--- a/src_plugins/export_svg/Makefile
++++ b/src_plugins/export_svg/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_svg
++	cd ../../src && $(MAKE) mod_export_svg
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/export_test/Makefile b/src_plugins/export_test/Makefile
+index 2213a7f..58f3c4b 100644
+--- a/src_plugins/export_test/Makefile
++++ b/src_plugins/export_test/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_test
++	cd ../../src && $(MAKE) mod_export_test
+ 	
+ 
+ clean:
+diff --git a/src_plugins/export_xy/Makefile b/src_plugins/export_xy/Makefile
+index 52b1a8f..ab66147 100644
+--- a/src_plugins/export_xy/Makefile
++++ b/src_plugins/export_xy/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_export_xy
++	cd ../../src && $(MAKE) mod_export_xy
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/fontmode/Makefile b/src_plugins/fontmode/Makefile
+index 0692e77..1a1edd5 100644
+--- a/src_plugins/fontmode/Makefile
++++ b/src_plugins/fontmode/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_fontmode
++	cd ../../src && $(MAKE) mod_fontmode
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/fp_fs/Makefile b/src_plugins/fp_fs/Makefile
+index eed8033..431bedb 100644
+--- a/src_plugins/fp_fs/Makefile
++++ b/src_plugins/fp_fs/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_fp_fs
++	cd ../../src && $(MAKE) mod_fp_fs
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/fp_wget/Makefile b/src_plugins/fp_wget/Makefile
+index 3c17ed4..5e4e166 100644
+--- a/src_plugins/fp_wget/Makefile
++++ b/src_plugins/fp_wget/Makefile
+@@ -1,5 +1,5 @@
+ all: tester
+-	cd ../../src && make mod_fp_wget
++	cd ../../src && $(MAKE) mod_fp_wget
+ 
+ CFLAGS = -Wall -g -I../../src -I../.. -I../../src_3rd -I../../src_3rd/liblihata
+ 
+diff --git a/src_plugins/gpmi/Makefile b/src_plugins/gpmi/Makefile
+index b2da266..e835b18 100644
+--- a/src_plugins/gpmi/Makefile
++++ b/src_plugins/gpmi/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_pcb_gpmi
++	cd ../../src && $(MAKE) mod_pcb_gpmi
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/gpmi/pcb-gpmi/Makefile b/src_plugins/gpmi/pcb-gpmi/Makefile
+index 7dfe4e4..83a8b58 100644
+--- a/src_plugins/gpmi/pcb-gpmi/Makefile
++++ b/src_plugins/gpmi/pcb-gpmi/Makefile
+@@ -1,13 +1,13 @@
+ PCB_GPMI_ROOT=.
+ 
+ all:
+-	cd gpmi_plugin; make all
++	cd gpmi_plugin; $(MAKE) all
+ 
+ include ../../../Makefile.conf
+ PLUGIN_DIR=$(LIBDIR)/plugins
+ 
+ clean:
+-	cd gpmi_plugin; make clean
++	cd gpmi_plugin; $(MAKE) clean
+ 
+ test: all
+ 	cd host_lib; ./test.sh
+diff --git a/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/Makefile b/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/Makefile
+index de0d2d5..2d5f9d8 100644
+--- a/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/Makefile
++++ b/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/Makefile
+@@ -9,13 +9,13 @@ BUILDIN_OBJS = gpmi_buildin.o $(COMMON_OBJS)
+ PLUGIN_OBJS = gpmi_plugin.o $(COMMON_OBJS)
+ 
+ all: gpmi_plugin.so gpmi_buildin.a
+-	cd gpmi_pkg; make
++	cd gpmi_pkg; $(MAKE)
+ 
+ all_plugin: gpmi_plugin.so
+-	cd gpmi_pkg; make
++	cd gpmi_pkg; $(MAKE)
+ 
+ all_buildin: gpmi_buildin.a
+-	cd gpmi_pkg; make
++	cd gpmi_pkg; $(MAKE)
+ 
+ gpmi_buildin.a: $(BUILDIN_OBJS)
+ 	ar rvu gpmi_buildin.a $(BUILDIN_OBJS)
+@@ -34,4 +34,4 @@ manage_scripts.o: manage_scripts.c
+ 
+ clean:
+ 	rm gpmi_plugin.o gpmi_plugin.so gpmi_buildin.a gpmi_buildin.o $(COMMON_OBJS) 2>/dev/null ; true
+-	cd gpmi_pkg; make clean
++	cd gpmi_pkg; $(MAKE) clean
+diff --git a/src_plugins/hid_batch/Makefile b/src_plugins/hid_batch/Makefile
+index 3477d42..c1effe6 100644
+--- a/src_plugins/hid_batch/Makefile
++++ b/src_plugins/hid_batch/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_hid_batch
++	cd ../../src && $(MAKE) mod_hid_batch
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/hid_gtk/Makefile b/src_plugins/hid_gtk/Makefile
+index 84cf1c9..9be8e31 100644
+--- a/src_plugins/hid_gtk/Makefile
++++ b/src_plugins/hid_gtk/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_hid_gtk
++	cd ../../src && $(MAKE) mod_hid_gtk
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/hid_lesstif/Makefile b/src_plugins/hid_lesstif/Makefile
+index ba83ecf..4e6247f 100644
+--- a/src_plugins/hid_lesstif/Makefile
++++ b/src_plugins/hid_lesstif/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_hid_lesstif
++	cd ../../src && $(MAKE) mod_hid_lesstif
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/import_dsn/Makefile b/src_plugins/import_dsn/Makefile
+index f061554..efde4a3 100644
+--- a/src_plugins/import_dsn/Makefile
++++ b/src_plugins/import_dsn/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_import_dsn
++	cd ../../src && $(MAKE) mod_import_dsn
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/import_edif/Makefile b/src_plugins/import_edif/Makefile
+index 0fb3a2e..3ae9958 100644
+--- a/src_plugins/import_edif/Makefile
++++ b/src_plugins/import_edif/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_import_edif
++	cd ../../src && $(MAKE) mod_import_edif
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/import_netlist/Makefile b/src_plugins/import_netlist/Makefile
+index e5bb6ae..8ef4348 100644
+--- a/src_plugins/import_netlist/Makefile
++++ b/src_plugins/import_netlist/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_import_netlist
++	cd ../../src && $(MAKE) mod_import_netlist
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/import_sch/Makefile b/src_plugins/import_sch/Makefile
+index dfcba41..f7c508f 100644
+--- a/src_plugins/import_sch/Makefile
++++ b/src_plugins/import_sch/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_autoplace
++	cd ../../src && $(MAKE) mod_autoplace
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/io_kicad/Makefile b/src_plugins/io_kicad/Makefile
+index 27e6cf9..24ca0ab 100644
+--- a/src_plugins/io_kicad/Makefile
++++ b/src_plugins/io_kicad/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_io_kicad
++	cd ../../src && $(MAKE) mod_io_kicad
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/io_kicad_legacy/Makefile b/src_plugins/io_kicad_legacy/Makefile
+index f44b79c..4879992 100644
+--- a/src_plugins/io_kicad_legacy/Makefile
++++ b/src_plugins/io_kicad_legacy/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_io_kicad_legacy
++	cd ../../src && $(MAKE) mod_io_kicad_legacy
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/io_lihata/Makefile b/src_plugins/io_lihata/Makefile
+index c37de74..cb659bf 100644
+--- a/src_plugins/io_lihata/Makefile
++++ b/src_plugins/io_lihata/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_io_lihata
++	cd ../../src && $(MAKE) mod_io_lihata
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/io_pcb/Makefile b/src_plugins/io_pcb/Makefile
+index 1023b1a..654cc91 100644
+--- a/src_plugins/io_pcb/Makefile
++++ b/src_plugins/io_pcb/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_io_pcb
++	cd ../../src && $(MAKE) mod_io_pcb
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/jostle/Makefile b/src_plugins/jostle/Makefile
+index ebdadff..d1be51f 100644
+--- a/src_plugins/jostle/Makefile
++++ b/src_plugins/jostle/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_jostle
++	cd ../../src && $(MAKE) mod_jostle
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/lib_gensexpr/Makefile b/src_plugins/lib_gensexpr/Makefile
+index deeabca..d14361d 100644
+--- a/src_plugins/lib_gensexpr/Makefile
++++ b/src_plugins/lib_gensexpr/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_lib_gensexpr
++	cd ../../src && $(MAKE) mod_lib_gensexpr
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/lib_legacy_func/Makefile b/src_plugins/lib_legacy_func/Makefile
+index 87807f6..ff403e4 100644
+--- a/src_plugins/lib_legacy_func/Makefile
++++ b/src_plugins/lib_legacy_func/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_lib_legacy_func
++	cd ../../src && $(MAKE) mod_lib_legacy_func
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/loghid/Makefile b/src_plugins/loghid/Makefile
+index 42f703a..3010e07 100644
+--- a/src_plugins/loghid/Makefile
++++ b/src_plugins/loghid/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_loghid
++	cd ../../src && $(MAKE) mod_loghid
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/mincut/Makefile b/src_plugins/mincut/Makefile
+index ff909df..33c93d4 100644
+--- a/src_plugins/mincut/Makefile
++++ b/src_plugins/mincut/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_mincut
++	cd ../../src && $(MAKE) mod_mincut
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/mincut/pcb-mincut/Makefile b/src_plugins/mincut/pcb-mincut/Makefile
+index 74f91e5..2f995b9 100644
+--- a/src_plugins/mincut/pcb-mincut/Makefile
++++ b/src_plugins/mincut/pcb-mincut/Makefile
+@@ -7,7 +7,7 @@ all: main
+ main: $(OBJS)
+ 
+ test:
+-	cd test_cases && make
++	cd test_cases && $(MAKE)
+ 
+ 
+ clean:
+diff --git a/src_plugins/oldactions/Makefile b/src_plugins/oldactions/Makefile
+index 7b0bb22..a49eac8 100644
+--- a/src_plugins/oldactions/Makefile
++++ b/src_plugins/oldactions/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_oldactions
++	cd ../../src && $(MAKE) mod_oldactions
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/polycombine/Makefile b/src_plugins/polycombine/Makefile
+index ba21c31..5957e0f 100644
+--- a/src_plugins/polycombine/Makefile
++++ b/src_plugins/polycombine/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_polycombine
++	cd ../../src && $(MAKE) mod_polycombine
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/polystitch/Makefile b/src_plugins/polystitch/Makefile
+index 051fc9b..1267449 100644
+--- a/src_plugins/polystitch/Makefile
++++ b/src_plugins/polystitch/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_polystitch
++	cd ../../src && $(MAKE) mod_polystitch
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/propedit/Makefile b/src_plugins/propedit/Makefile
+index 55f3aa9..33f9736 100644
+--- a/src_plugins/propedit/Makefile
++++ b/src_plugins/propedit/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_propedit
++	cd ../../src && $(MAKE) mod_propedit
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/puller/Makefile b/src_plugins/puller/Makefile
+index e389405..efa23f8 100644
+--- a/src_plugins/puller/Makefile
++++ b/src_plugins/puller/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_puller
++	cd ../../src && $(MAKE) mod_puller
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/query/Makefile b/src_plugins/query/Makefile
+index 1ab3e10..2c6d897 100644
+--- a/src_plugins/query/Makefile
++++ b/src_plugins/query/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_query
++	cd ../../src && $(MAKE) mod_query
+ 	
+ 
+ clean:
+diff --git a/src_plugins/renumber/Makefile b/src_plugins/renumber/Makefile
+index a0c409d..1d16307 100644
+--- a/src_plugins/renumber/Makefile
++++ b/src_plugins/renumber/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_renumber
++	cd ../../src && $(MAKE) mod_renumber
+ 	
+ 
+ clean:
+diff --git a/src_plugins/report/Makefile b/src_plugins/report/Makefile
+index 61be1b8..3d52bc3 100644
+--- a/src_plugins/report/Makefile
++++ b/src_plugins/report/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_report
++	cd ../../src && $(MAKE) mod_report
+ 	
+ 
+ clean:
+diff --git a/src_plugins/shand_cmd/Makefile b/src_plugins/shand_cmd/Makefile
+index 35dccf5..794ac30 100644
+--- a/src_plugins/shand_cmd/Makefile
++++ b/src_plugins/shand_cmd/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_shand_cmd
++	cd ../../src && $(MAKE) mod_shand_cmd
+ 	
+ 
+ clean:
+diff --git a/src_plugins/smartdisperse/Makefile b/src_plugins/smartdisperse/Makefile
+index 869ea87..f22fe0f 100644
+--- a/src_plugins/smartdisperse/Makefile
++++ b/src_plugins/smartdisperse/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_smartdisperse
++	cd ../../src && $(MAKE) mod_smartdisperse
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/stroke/Makefile b/src_plugins/stroke/Makefile
+index 07b7c21..6fe9ed3 100644
+--- a/src_plugins/stroke/Makefile
++++ b/src_plugins/stroke/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_stroke
++	cd ../../src && $(MAKE) mod_stroke
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/teardrops/Makefile b/src_plugins/teardrops/Makefile
+index f934ca0..54d36e0 100644
+--- a/src_plugins/teardrops/Makefile
++++ b/src_plugins/teardrops/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_teardrops
++	cd ../../src && $(MAKE) mod_teardrops
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/toporouter/Makefile b/src_plugins/toporouter/Makefile
+index 4d838d9..aee1245 100644
+--- a/src_plugins/toporouter/Makefile
++++ b/src_plugins/toporouter/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_toporouter
++	cd ../../src && $(MAKE) mod_toporouter
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/src_plugins/vendordrill/Makefile b/src_plugins/vendordrill/Makefile
+index 402f804..4bc1979 100644
+--- a/src_plugins/vendordrill/Makefile
++++ b/src_plugins/vendordrill/Makefile
+@@ -1,5 +1,5 @@
+ all:
+-	cd ../../src && make mod_vendordrill
++	cd ../../src && $(MAKE) mod_vendordrill
+ 
+ clean:
+ 	rm *.o *.so 2>/dev/null ; true
+diff --git a/tests/Makefile b/tests/Makefile
+index a6098e9..923badd 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -1,7 +1,7 @@
+ test:
+-	cd pcbflags && make all && make test
+-	cd conf && make all && make test
+-	cd strflags && make all && make test
+-	cd pcb-printf && make all && make test
+-	cd uniq_name && make all && make test
+-	cd propedit && make all && make test
++	cd pcbflags && $(MAKE) all && $(MAKE) test
++	cd conf && $(MAKE) all && $(MAKE) test
++	cd strflags && $(MAKE) all && $(MAKE) test
++	cd pcb-printf && $(MAKE) all && $(MAKE) test
++	cd uniq_name && $(MAKE) all && $(MAKE) test
++	cd propedit && $(MAKE) all && $(MAKE) test
+diff --git a/tests/conf/Makefile b/tests/conf/Makefile
+index 3663b61..2b7e079 100644
+--- a/tests/conf/Makefile
++++ b/tests/conf/Makefile
+@@ -49,7 +49,7 @@ conftest.o: conftest.c
+ help.o: help.c
+ 
+ $(LIB_3RD_OBJS) $(LIB_PCB_OBJS):
+-	cd ../../src && make
++	cd ../../src && $(MAKE)
+ 
+ test:
+-	cd tests && make all
++	cd tests && $(MAKE) all
+diff --git a/util/Makefile b/util/Makefile
+index 772f210..de1f950 100644
+--- a/util/Makefile
++++ b/util/Makefile
+@@ -3,28 +3,28 @@
+ SCMDIR=$(DATADIR)/../gEDA/scheme
+ 
+ all:
+-	cd gsch2pcb-rnd && make all
++	cd gsch2pcb-rnd && $(MAKE) all
+ 
+ include ../Makefile.conf
+ 
+ clean:
+-	cd gsch2pcb-rnd && make clean
++	cd gsch2pcb-rnd && $(MAKE) clean
+ 
+ install_:
+ 	$(MKDIR) "$(BINDIR)" "$(LIBDIR)" "$(SCMDIR)"
+ 	$(CPC) "`pwd`/fp2anim" "$(BINDIR)/fp2anim"
+ 	$(CPC) "`pwd`/pcb-strip" "$(BINDIR)/pcb-strip"
+ 	$(CPC) "`pwd`/gnet-pcbrndfwd.scm" "$(SCMDIR)/gnet-pcbrndfwd.scm"
+-	cd gsch2pcb-rnd && make install_ CPC="$(CPC)"
++	cd gsch2pcb-rnd && $(MAKE) install_ CPC="$(CPC)"
+ 
+ install:
+-	make install_ CPC="$(CP)"
++	$(MAKE) install_ CPC="$(CP)"
+ 
+ linstall:
+-	make install_ CPC="$(LN)"
++	$(MAKE) install_ CPC="$(LN)"
+ 
+ uninstall:
+ 	$(RM) "$(BINDIR)/fp2anim"
+ 	$(RM) "$(BINDIR)/pcb-strip"
+ 	$(RM) "$(SCMDIR)/gnet-pcbrndfwd.scm"
+-	cd gsch2pcb-rnd && make uninstall
++	cd gsch2pcb-rnd && $(MAKE) uninstall
+diff --git a/util/gsch2pcb-rnd/Makefile.in b/util/gsch2pcb-rnd/Makefile.in
+index cd240bc..1b4fcc6 100644
+--- a/util/gsch2pcb-rnd/Makefile.in
++++ b/util/gsch2pcb-rnd/Makefile.in
+@@ -50,8 +50,8 @@ FP_CFLAGS  = @/local/pcb/CFLAGS@
+ OBJS=gsch2pcb.o help.o
+ 
+ all:
+-	make revcheck
+-	make gsch2pcb-rnd$(EXE)
++	$(MAKE) revcheck
++	$(MAKE) gsch2pcb-rnd$(EXE)
+ 
+ revcheck:
+ 	cd ../../scconfig && ./revtest Rev.stamp < Rev.tab
+@@ -63,7 +63,7 @@ gsch2pcb.o: gsch2pcb.c ../../config.h
+ 	$(CC) -c $(CFLAGS) $(FP_CFLAGS) gsch2pcb.c -o gsch2pcb.o
+ 
+ ../../src/pcb-rnd:
+-	cd ../../src && make
++	cd ../../src && $(MAKE)
+ 
+ $(HASHOBJ): ../../src/pcb-rnd
+ 
+@@ -109,10 +109,10 @@ install_:
+ 	$(CPC) "`pwd`/gnet-gsch2pcb-rnd.scm" "$(LIBDIR)/gnet-gsch2pcb-rnd.scm"
+ 
+ install:
+-	make install_ CPC="$(CP)"
++	$(MAKE) install_ CPC="$(CP)"
+ 
+ linstall:
+-	make install_ CPC="$(LN)"
++	$(MAKE) install_ CPC="$(LN)"
+ 
+ uninstall:
+ 	$(RM) "$(BINDIR)/gsch2pcb-rnd$(EXE)"
diff --git a/debian/patches/0003-renamed-install_root-DESTDIR.patch b/debian/patches/0003-renamed-install_root-DESTDIR.patch
new file mode 100644
index 0000000..cb8bdfe
--- /dev/null
+++ b/debian/patches/0003-renamed-install_root-DESTDIR.patch
@@ -0,0 +1,112 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sat, 17 Dec 2016 16:12:37 -0800
+Subject: renamed install_root -> DESTDIR
+
+This is more standard, and simplifies the packaging
+---
+ Makefile.conf.in                 | 12 ++++++------
+ doc-rnd/gpmi_temp_inst.txt       |  4 ++--
+ doc-rnd/packaging.txt            |  4 ++--
+ src_3rd/liblihata/genht/Makefile |  4 ++--
+ src_3rd/sphash/Makefile          |  6 +++---
+ 5 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/Makefile.conf.in b/Makefile.conf.in
+index 66a8f95..30be5fd 100644
+--- a/Makefile.conf.in
++++ b/Makefile.conf.in
+@@ -1,11 +1,11 @@
+ print [@# generated by ./configure, do not modify
+ # prefix is @/local/prefix@
+-DOCDIR=$(install_root)@/local/prefix@/share/doc/pcb-rnd
+-LIBDIR=$(install_root)@/local/prefix@/lib/pcb-rnd
+-BINDIR=$(install_root)@/local/prefix@/bin
+-ETCDIR=$(install_root)/etc
+-DATADIR=$(install_root)@/local/prefix@/share/pcb-rnd
+-MAN1DIR=$(install_root)@/local/prefix@/share/man/man1
++DOCDIR=$(DESTDIR)@/local/prefix@/share/doc/pcb-rnd
++LIBDIR=$(DESTDIR)@/local/prefix@/lib/pcb-rnd
++BINDIR=$(DESTDIR)@/local/prefix@/bin
++ETCDIR=$(DESTDIR)/etc
++DATADIR=$(DESTDIR)@/local/prefix@/share/pcb-rnd
++MAN1DIR=$(DESTDIR)@/local/prefix@/share/man/man1
+ RM=@/host/fstools/rm@
+ CP=@/host/fstools/cp@
+ LN=@/host/fstools/ln@
+diff --git a/doc-rnd/gpmi_temp_inst.txt b/doc-rnd/gpmi_temp_inst.txt
+index 68d1387..d99ca5e 100644
+--- a/doc-rnd/gpmi_temp_inst.txt
++++ b/doc-rnd/gpmi_temp_inst.txt
+@@ -22,7 +22,7 @@ There are options to step 6:
+ 
+ - if you want to check what it'd do, you could run this:
+ 
+-   install_root=/tmp/foo make install
++   DESTDIR=/tmp/foo make install
+ 
+    it's like DESTDIR for autotools: it will do everything but will use
+    /tmp/foo instead of / so you see what it'd do without using root or
+@@ -61,5 +61,5 @@ modifications (assuming you want to install gpmi in ~/usr):
+ A/3. ./configure --prefix=~/usr
+ B/2. ./configure --gpmi-prefix=~/usr
+ 
+-NOTE: you don't need to use install_root; gpmi will install under ~/usr as
++NOTE: you don't need to use DESTDIR; gpmi will install under ~/usr as
+ if it was /usr. 
+diff --git a/doc-rnd/packaging.txt b/doc-rnd/packaging.txt
+index 3df60c3..f86dd0e 100644
+--- a/doc-rnd/packaging.txt
++++ b/doc-rnd/packaging.txt
+@@ -48,13 +48,13 @@ by ./configure.
+ 
+ 3. typical ./configure options - scconfig vs. auto*
+ 
+-./configurfe --prefix works as expected. DESTDIR is called install_root.
++./configurfe --prefix works as expected. DESTDIR is called "DESTDIR".
+ 
+ Typical commands for configuring pcb-rnd for packaging would be:
+ 
+   ./configure --all=plugin --prefix=/usr
+   make all
+-  install_root=/tmp/pkg_tmp make install
++  DESTDIR=/tmp/pkg_tmp make install
+ 
+ We are happy with scconfig. Please don't write about how much better
+ autoconf or cmake would be, we won't switch.
+diff --git a/src_3rd/liblihata/genht/Makefile b/src_3rd/liblihata/genht/Makefile
+index 8a30926..8be3c2f 100644
+--- a/src_3rd/liblihata/genht/Makefile
++++ b/src_3rd/liblihata/genht/Makefile
+@@ -1,6 +1,6 @@
+ # use -Dinline if compiling with c89
+-INCDIR=$(install_root)/usr/include/genht
+-LIBDIR=$(install_root)/usr/lib
++INCDIR=$(DESTDIR)/usr/include/genht
++LIBDIR=$(DESTDIR)/usr/lib
+ 
+ CFLAGS=-Wall -pedantic -g
+ 
+diff --git a/src_3rd/sphash/Makefile b/src_3rd/sphash/Makefile
+index 4a51819..5601aba 100644
+--- a/src_3rd/sphash/Makefile
++++ b/src_3rd/sphash/Makefile
+@@ -25,8 +25,8 @@ sphash: sphash.c
+ 	$(CC) $(CFLAGS) $(LDFLAGS) sphash.c -o sphash
+ 
+ install_: sphash
+-	mkdir -p $(install_root)/usr/bin/
+-	$(CP) `pwd`/sphash $(install_root)/usr/bin/sphash
++	mkdir -p $(DESTDIR)/usr/bin/
++	$(CP) `pwd`/sphash $(DESTDIR)/usr/bin/sphash
+ 
+ install:
+ 	$(MAKE) install_ CP=cp
+@@ -35,7 +35,7 @@ linstall:
+ 	$(MAKE) install_ CP="ln -s"
+ 
+ uninstall:
+-	rm $(install_root)/usr/bin/sphash
++	rm $(DESTDIR)/usr/bin/sphash
+ 
+ deb:
+ 	fakeroot debian/rules binary
diff --git a/debian/patches/0004-I-use-the-CFLAGS-from-.-configure-CFLAGS.patch b/debian/patches/0004-I-use-the-CFLAGS-from-.-configure-CFLAGS.patch
new file mode 100644
index 0000000..4a138d6
--- /dev/null
+++ b/debian/patches/0004-I-use-the-CFLAGS-from-.-configure-CFLAGS.patch
@@ -0,0 +1,20 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sat, 17 Dec 2016 19:27:16 -0800
+Subject: I use the CFLAGS from './configure --CFLAGS=...'
+
+---
+ scconfig/src/default/find_cc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/scconfig/src/default/find_cc.c b/scconfig/src/default/find_cc.c
+index eda2991..2ae1e89 100644
+--- a/scconfig/src/default/find_cc.c
++++ b/scconfig/src/default/find_cc.c
+@@ -145,6 +145,7 @@ int find_cc(int logdepth, int fatal)
+ 	}
+ 	else {
+ 		logprintf(logdepth+1, "using user supplied cflags '%s' (will test later)\n", cflags);
++		put("cc/cflags", cflags);
+ 	}
+ 	if (get("cc/cflags") == NULL)
+ 		put("cc/cflags", "");
diff --git a/debian/patches/0005-gsch2pcb-uses-the-CFLAGS-LDFLAGS-from-.-configure.patch b/debian/patches/0005-gsch2pcb-uses-the-CFLAGS-LDFLAGS-from-.-configure.patch
new file mode 100644
index 0000000..99d2d41
--- /dev/null
+++ b/debian/patches/0005-gsch2pcb-uses-the-CFLAGS-LDFLAGS-from-.-configure.patch
@@ -0,0 +1,27 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sat, 17 Dec 2016 19:35:23 -0800
+Subject: gsch2pcb uses the CFLAGS, LDFLAGS from ./configure
+
+---
+ util/gsch2pcb-rnd/Makefile.in | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/util/gsch2pcb-rnd/Makefile.in b/util/gsch2pcb-rnd/Makefile.in
+index 1b4fcc6..4a6415a 100644
+--- a/util/gsch2pcb-rnd/Makefile.in
++++ b/util/gsch2pcb-rnd/Makefile.in
+@@ -1,10 +1,12 @@
+-put /local/pcb/CFLAGS {-I../.. -I../../src_3rd -I../../src_3rd/liblihata -DSCMDIR="\\"$(LIBDIR)\\""}
++put /local/pcb/CFLAGS cc/cflags
++append /local/pcb/CFLAGS {-I../.. -I../../src_3rd -I../../src_3rd/liblihata -DSCMDIR="\\"$(LIBDIR)\\""}
++append /local/pcb/LDFLAGS cc/ldflags
+ include {../scconfig/template/debug.tmpasm}
+ 
+ print [@
+ PLUGDIR=../../src_plugins
+ CFLAGS=@/local/pcb/c89flags@ @/local/pcb/CFLAGS@
+-LDFLAGS=-lm
++LDFLAGS=-lm @/local/pcb/LDFLAGS@
+ CC=@cc/cc@
+ 
+ HASHOBJ=../../src_3rd/liblihata/genht/hash.o ../../src_3rd/liblihata/genht/htsp.o ../../src_3rd/liblihata/genht/htpp.o
diff --git a/debian/patches/0006-not-trying-to-build-gts.patch b/debian/patches/0006-not-trying-to-build-gts.patch
new file mode 100644
index 0000000..06fb341
--- /dev/null
+++ b/debian/patches/0006-not-trying-to-build-gts.patch
@@ -0,0 +1,76 @@
+From: Dima Kogan <dima at secretsauce.net>
+Date: Sat, 17 Dec 2016 20:21:18 -0800
+Subject: not trying to build gts
+
+---
+ Makefile                           |  1 -
+ scconfig/hooks.c                   |  1 -
+ src_plugins/Common_enabled.tmpasm  |  2 +-
+ src_plugins/toporouter/Plug.tmpasm | 10 ----------
+ 4 files changed, 1 insertion(+), 13 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2012124..f80a28d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -17,7 +17,6 @@ distclean: FORCE
+ 	cd src_3rd/genlist && $(MAKE) clean ; true
+ 	cd src_3rd/genregex && $(MAKE) clean ; true
+ 	cd src_3rd/genvector && $(MAKE) clean ; true
+-	cd src_3rd/gts && $(MAKE) clean ; true
+ 	cd src_3rd/liblihata && $(MAKE) clean ; true
+ 	cd src_3rd/liblihata/genht && $(MAKE) clean ; true
+ 	cd src_3rd/qparse && $(MAKE) clean ; true
+diff --git a/scconfig/hooks.c b/scconfig/hooks.c
+index c911e04..ad6cd0c 100644
+--- a/scconfig/hooks.c
++++ b/scconfig/hooks.c
+@@ -665,7 +665,6 @@ int hook_generate()
+ 
+ 	printf("Generating Makefile.conf (%d)\n", generr |= tmpasm("..", "Makefile.conf.in", "Makefile.conf"));
+ 
+-	printf("Generating gts/Makefile (%d)\n", generr |= tmpasm("../src_3rd/gts", "Makefile.in", "Makefile"));
+ 	printf("Generating pcb/Makefile (%d)\n", generr |= tmpasm("../src", "Makefile.in", "Makefile"));
+ 
+ 	/* Has to be after pcb/Makefile so that all the modules are loaded. */
+diff --git a/src_plugins/Common_enabled.tmpasm b/src_plugins/Common_enabled.tmpasm
+index 25f4d15..144e9cd 100644
+--- a/src_plugins/Common_enabled.tmpasm
++++ b/src_plugins/Common_enabled.tmpasm
+@@ -63,7 +63,7 @@ switch /local/pcb/mod/CONF
+ 	default
+ 		put /local/pcb/mod/CONFOUT /local/pcb/mod/CONF
+ 		sub {/local/pcb/mod/CONFOUT} {.h$} {_fields.h}
+-		append /local/pcb/CLEANFILES /local/pcb/mod/CONFOUT
++		append /local/pcb/CLEANFILES [@ @] /local/pcb/mod/CONFOUT
+ 		append /local/pcb/RULES [@
+ # conf generation for @/local/pcb/mod@ '@/local/pcb/mod/CONF@'
+ @/local/pcb/mod/CONFOUT@: @/local/pcb/mod/CONF@
+diff --git a/src_plugins/toporouter/Plug.tmpasm b/src_plugins/toporouter/Plug.tmpasm
+index 2afd67e..32e6379 100644
+--- a/src_plugins/toporouter/Plug.tmpasm
++++ b/src_plugins/toporouter/Plug.tmpasm
+@@ -1,23 +1,13 @@
+ put /local/pcb/mod {toporouter}
+ put /local/pcb/mod/OBJS [@ $(PLUGDIR)/toporouter/toporouter.o @]
+ 
+-append /local/pcb/CFLAGS  {-I../src_3rd/gts}
+-
+-put /local/pcb/toporouter_rules [@
+-../src_3rd/gts/libgts.a:
+-	cd ../src_3rd/gts && make
+-@]
+-
+ switch /local/pcb/toporouter/controls
+ 	case {buildin}
+ 		append /local/pcb/RULES           /local/pcb/toporouter_rules
+-		append /local/pcb/LIBS            { ../src_3rd/gts/libgts.a }
+-		append /local/pcb/EXEDEPS         { ../src_3rd/gts/libgts.a }
+ 		include /local/pcb/tmpasm/buildin
+ 		end;
+ 	case {plugin}
+ 		append /local/pcb/RULES           /local/pcb/toporouter_rules
+-		append /local/pcb/toporouter/OBJS { ../src_3rd/gts/libgts.a }
+ 		include /local/pcb/tmpasm/plugin
+ 		end
+ 	case {disable}   include /local/pcb/tmpasm/disable; end;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..aad8887
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+0001-Makefiles-recurse-with-MAKE-to-allow-parallelism.patch
+0003-renamed-install_root-DESTDIR.patch
+0004-I-use-the-CFLAGS-from-.-configure-CFLAGS.patch
+0005-gsch2pcb-uses-the-CFLAGS-LDFLAGS-from-.-configure.patch
+0006-not-trying-to-build-gts.patch
diff --git a/debian/pcb-rnd-gsch2pcb.install b/debian/pcb-rnd-gsch2pcb.install
new file mode 100644
index 0000000..58ab735
--- /dev/null
+++ b/debian/pcb-rnd-gsch2pcb.install
@@ -0,0 +1,4 @@
+usr/bin/gsch2pcb-rnd
+usr/lib/pcb-rnd/gnet-gsch2pcb-rnd.scm
+usr/share/man/man1/gsch2pcb-rnd.1
+
diff --git a/debian/pcb-rnd.install b/debian/pcb-rnd.install
new file mode 100644
index 0000000..6fd2064
--- /dev/null
+++ b/debian/pcb-rnd.install
@@ -0,0 +1,9 @@
+usr/bin/pcb-rnd
+usr/share/pcb-rnd/default.pcb
+usr/share/pcb-rnd/default_font
+usr/share/pcb-rnd/pcb-conf.lht
+usr/share/pcb-rnd/pcb-menu*
+usr/share/pcb-rnd/pcblib
+usr/share/man/man1/pcb-rnd.1
+usr/share/gEDA/scheme/gnet-pcbrndfwd.scm
+debian/pcb-rnd.xpm usr/share/pixmaps
diff --git a/debian/pcb-rnd.menu b/debian/pcb-rnd.menu
new file mode 100644
index 0000000..f457eed
--- /dev/null
+++ b/debian/pcb-rnd.menu
@@ -0,0 +1,5 @@
+?package(pcb-rnd):needs="x11" section="Applications/Science/Electronics" \
+	title="pcb-rnd"                                       \
+	longtitle="Printed Circuit Board Design Program"      \
+	hotkey="P" icon="/usr/share/pixmaps/pcb-rnd.xpm"      \
+	command="/usr/bin/pcb-rnd"
diff --git a/debian/pcb-rnd.xpm b/debian/pcb-rnd.xpm
new file mode 100644
index 0000000..fddccb8
--- /dev/null
+++ b/debian/pcb-rnd.xpm
@@ -0,0 +1,295 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 256 2",
+/* colors */
+"   c #000000",
+" . c #838D91",
+" X c #365938",
+" o c #5F6767",
+" O c #E2E0E1",
+" + c #799A7D",
+" @ c #9FA9B3",
+" # c #2F5331",
+" $ c #B1C3B4",
+" % c #2B552D",
+" & c #2D512F",
+" * c #6B6F76",
+" = c #DBDADA",
+" - c #2A532C",
+" ; c #2B512D",
+" : c #99A3AD",
+" > c #AEBFB1",
+" , c #2A4F2C",
+" < c #729276",
+" 1 c #294F2B",
+" 2 c #859396",
+" 3 c #284F2A",
+" 4 c #709274",
+" 5 c #6C9870",
+" 6 c #274F29",
+" 7 c #264F28",
+" 8 c #254F27",
+" 9 c #264D28",
+" 0 c #254D27",
+" q c #244D26",
+" w c #234D25",
+" e c #939DA7",
+" r c #244B26",
+" t c #6A8C6E",
+" y c #8F99A3",
+" u c #8F97A3",
+" i c #6E737C",
+" p c #8D97A1",
+" a c #1B451D",
+" s c #8B959F",
+" d c #608C64",
+" f c #9FAFA2",
+" g c #89939D",
+" h c #9DAFA0",
+" j c #5D8861",
+" k c #87919B",
+" l c #708E77",
+" z c #96AB99",
+" x c #727B83",
+" c c #113D13",
+" v c #58785C",
+" b c #547458",
+" n c #537457",
+" m c #57645B",
+" M c #4B6C4F",
+" N c #101112",
+" B c #747C7E",
+" V c #7D9D80",
+" C c #73787D",
+" Z c #7B9288",
+" A c #B1C2B3",
+" S c #879497",
+" D c #55625C",
+" F c #636A6D",
+" G c #274828",
+" H c #244C25",
+" J c #9FB6A1",
+" K c #A0B0A2",
+" L c #9DAE9F",
+" P c #709376",
+" I c #87909A",
+" U c #5B855E",
+" Y c #858E98",
+" T c #558558",
+" R c #7E9987",
+" E c #678B6D",
+" W c #CAD3CB",
+" Q c #4E7B51",
+" ! c #49794C",
+" ~ c #728D7B",
+" ^ c #4C6D4F",
+" / c #496F4C",
+" ( c #B8C1B9",
+" ) c #6E7577",
+" _ c #465749",
+" ` c #B3BBB4",
+" ' c #37693A",
+" ] c #3B5D3E",
+" [ c #646D6D",
+" { c #E7E6E7",
+" } c #E2E4E2",
+" | c #38513B",
+".  c #E1E2E1",
+".. c #9099A2",
+".X c #384D3B",
+".o c #7D858C",
+".O c #6C6F78",
+".+ c #DBDCDB",
+".@ c #729877",
+".# c #2C512F",
+".$ c #879399",
+".% c #719476",
+".& c #709475",
+".* c #D8D8D8",
+".= c #719276",
+".- c #709275",
+".; c #6F9274",
+".: c #6E9073",
+".> c #949FA9",
+"., c #6D9072",
+".< c #6D8E72",
+".1 c #6A8E6F",
+".2 c #6B8C70",
+".3 c #67926C",
+".4 c #303133",
+".5 c #909BA5",
+".6 c #678C6C",
+".7 c #8E99A3",
+".8 c #68886D",
+".9 c #8D97A2",
+".0 c #CDCECD",
+".q c #517A53",
+".w c #8EA18F",
+".e c #9BB39F",
+".r c #686F77",
+".t c #517053",
+".y c #2C2F32",
+".u c #F3EDF2",
+".i c #456047",
+".p c #426444",
+".a c #3C6A3E",
+".s c #58645D",
+".d c #161719",
+".f c #39683B",
+".g c #969EA7",
+".h c #39543B",
+".j c #7B9B7F",
+".k c #2D562F",
+".l c #B1C2B4",
+".z c #2D522F",
+".x c #6B7076",
+".c c #677F68",
+".v c #658166",
+".b c #677B68",
+".n c #89909A",
+".m c #6F9773",
+".M c #2E4830",
+".N c #98A2AC",
+".B c #565E5E",
+".V c #265028",
+".C c #274E29",
+".Z c #6F9173",
+".A c #264E28",
+".S c #254E27",
+".D c #6E8F72",
+".F c #244E26",
+".G c #254C27",
+".H c #274829",
+".J c #244C26",
+".K c #234C25",
+".L c #234A25",
+".P c #214A23",
+".I c #909AA4",
+".U c #69896D",
+".Y c #6F747D",
+".T c #8E98A2",
+".R c #577758",
+".E c #68876C",
+".W c #8C96A0",
+".Q c #658769",
+".! c #7B828C",
+".~ c #5E8D62",
+".^ c #9EB0A1",
+"./ c #9DAEA0",
+".( c #7F9789",
+".) c #456746",
+"._ c #C2CFC4",
+".` c #859E88",
+".' c #1D2022",
+".] c #315732",
+".[ c #426746",
+".{ c #7C927F",
+".} c #B1C1B3",
+".| c #8B919B",
+"X  c #2E4D2F",
+"X. c #2A512B",
+"XX c #264F27",
+"Xo c #224B23",
+"XO c #7F878F",
+"X+ c #8D97A0",
+"X@ c #74947A",
+"X# c #88919B",
+"X$ c #6B9071",
+"X% c #62696F",
+"X& c #57845A",
+"X* c #6B8C71",
+"X= c #698E6F",
+"X- c #678C6D",
+"X; c #638A69",
+"X: c #1A1B1B",
+"X> c #697179",
+"X, c #477A4A",
+"X< c #5E7E64",
+"X1 c #467649",
+"X2 c #2F3336",
+"X3 c #F6F1F6",
+"X4 c #416A44",
+"X5 c #6D7876",
+"X6 c #436446",
+"X7 c #8E949D",
+"X8 c #060707",
+"X9 c #415644",
+"X0 c #385C3B",
+"Xq c #3E5241",
+"Xw c #355A38",
+"Xe c #355838",
+"Xr c #E2E3E2",
+"Xt c #7B9B80",
+"Xy c #7A997F",
+"Xu c #8E9AA0",
+"Xi c #E0DFE0",
+"Xp c #DFDFDF",
+"Xa c #315434",
+"Xs c #DDDFDD",
+"Xd c #739B78",
+"Xf c #729577",
+"Xg c #739378",
+"Xh c #D9D9D9",
+"Xj c #D8D9D8",
+"Xk c #709375",
+"Xl c #6F9374",
+"Xz c #6F9174",
+"Xx c #6E9173",
+"Xc c #6B9570",
+"Xv c #6D8F72",
+"Xb c #919CA6",
+"Xn c #698D6E",
+"Xm c #909AA5",
+"XM c #8F9AA4",
+"XN c #69896E",
+"XB c #8E98A3",
+"XV c #8D96A2",
+"XC c #8C96A1",
+"XZ c #7C848E",
+"XA c #8B96A0",
+"XS c #65856A",
+"XD c #CACDCA",
+"XF c #5F7F64",
+"XG c #879E88",
+"XH c #899A8A",
+"XJ c #889889",
+"XK c #2B2E31",
+"XL c #446546",
+"XP c #EDE8EC",
+"XI c #546359",
+"XU c None",
+/* pixels */
+"XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXxXxXxXxXkXf.<.<Xk.&.;XxXxXxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXxXx.< n ] & 1 3.# X ^.UXxXxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXx.2.z.A 6 6 6 6 6 6 7 9 tXxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXx v.S 6 6 6 6 6 6 6 6 6 Q.:XxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXxXS H 7.H.XXI mXqX .F.L.~XxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXx.;X<X5X7 :XM.9.>.n BX;XlXxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXv.8XvXx ~XC s s p s.W p pXA u.(.,.;XSXNXxXxXxXxXxXx",
+"XxXxXxXxXx.2 #.KXw lXC p.W.W.W p.W.W p p pXV RX6 q 9.QXxXxXxXxXx",
+"XxXxXxXx.; M 7 6Xo ..W.W p.W p y y p.W.W p.W IX. 6 6X4XzXxXxXxXx",
+"XxXxXxXx PXa 6 6.M.g p.W.W.T xX2XKX> y p.W.WX#X9 7 6 7. at XxXxXxXx",
+"XxXxXxXxX*.C 6 7.s y p.W p.r        X%.W.W.WXM o.F 6 r.3XxXxXxXx",
+"XxXxXxXx.E H 6XX ).W.W.W.5.d         N e p p.T * - 6.G jXxXxXxXx",
+"XxXxXxXxXF 0 6 8 C s p p pX8           @ p.W p.O.k 6 9X&.:XxXxXx",
+"XxXxXxXxXN.K 6 7 [ p.W.W.I.y        .4.I.W p p.x.V 6.G dXxXxXxXx",
+"XxXxXxXxXv , 6 6 _Xm s.W p k.'    X:...W.W p y D.S 6.L 5XxXxXxXx",
+"XxXxXxXx.%Xe 6 6 G.| s.W.W.WXbXO.o.N.W p.W p Y.h 6 6 %XdXxXxXxXx",
+"XxXxXxXxXx b.S 6.P Z p p.W.W p.W p.W.W p p.W S q 6.C !.:XxXxXxXx",
+"XxXxXxXxXx.Z /.f T.,.$.W p.W.W p.W.W.W p.TX+.e.{.aX1.mXxXxXxXxXx",
+"XxXxXxXxXxXxXz.-XxXx.: 2 sXB.W p.W.W.7 gXuX at .l h.-XzXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXxXzXL |.B i.!XZ.Y FX9X0.D $./XxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXt.6.`.R.] w.p.i.b ;.V q.) V._ hXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXn.+ W.0 `.c.t.*XsXDXH.K.vXp (Xi.^XxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXx.j =X$.[.F.J.wXJ aX3 cXr.qXc.} hXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXx.jXj.1.;Xl U JXG '.uX, }XyX- A LXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXx +XhX=XxXxXx > f EXP.6 z O.  { KXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXx.,.-XxXxXxXx.,.-XxXzXx.,.=Xg < 4XxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx",
+"XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx"
+};
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..d26256e
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,83 @@
+#!/usr/bin/make -f
+
+export DH_VERBOSE=1
+
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+%:
+	dh $@ --parallel
+
+# --symbols is to build with -g
+#
+# I link everything into the main program (--buildin-...) including the
+# user-interface: gtk. At some point I may add lesstif as an option. Then
+# shipping those as separate plugins would make sense.
+#
+# Currently turning on the toporouter produces compilation errors, so I turn it
+# off. Turning on bison fails to ./configure, so I turn THAT off as well. bboard
+# triggers a bug in the build system: cairo.h is not found; I turn that off.
+override_dh_auto_configure:
+	./configure				\
+           --symbols				\
+           --all=buildin			\
+           --prefix=/usr			\
+           --buildin-hid_batch			\
+           --buildin-fp_fs			\
+           --buildin-import_netlist		\
+           --buildin-import_sch			\
+           --buildin-io_pcb			\
+           --buildin-io_lihata			\
+           --buildin-io_kicad			\
+           --buildin-gpmi			\
+           --buildin-boardflip			\
+           --buildin-polystitch			\
+           --buildin-import_dsn			\
+           --buildin-export_dxf			\
+           --buildin-export_openscad		\
+           --buildin-export_dsn			\
+           --buildin-export_ipcd356		\
+           --disable-toporouter			\
+           --disable-bison			\
+           --disable-export_bboard		\
+           --buildin-hid_gtk			\
+           --disable-hid_lesstif		\
+						\
+           --LDFLAGS='$(LDFLAGS)'		\
+           --CFLAGS='$(CFLAGS) $(CPPFLAGS)'
+
+# Needed to retain src_plugins/export_dxf/README.orig
+override_dh_clean:
+	dh_clean -XREADME.orig
+
+override_dh_auto_clean:
+        # 'make clean' and 'make distclean' currently fail after an incomplete
+        # clean, so I do this myself
+	find . \( -name *.o -o -name *.so -o -name *_conf_fields.h \) -delete
+	rm -f Makefile.conf
+	rm -f config.h
+	rm -f scconfig/Rev.stamp
+	rm -f scconfig/config.cache
+	rm -f scconfig/config.log
+	rm -f scconfig/configure
+	rm -f scconfig/core
+	rm -f scconfig/cquote
+	rm -f scconfig/revtest
+	rm -f src/Makefile
+	rm -f src/buildin.c
+	rm -f src/compat_inc.h
+	rm -f util/gsch2pcb-rnd/Makefile
+	rm -f util/gsch2pcb-rnd/fp_init.c
+	rm -f util/gsch2pcb-rnd/fp_init.h
+	rm -f doc-rnd/conf/tree/appearance_loglevels.html
+	rm -f src/conf_core_fields.h
+	rm -f src/conf_internal.c
+	rm -f src/generated_lists.h
+	rm -f src/pcb-rnd
+	rm -f src_3rd/sphash/sphash
+	rm -f src_plugins/dbus/dbus-introspect.h
+	rm -f src_plugins/hid_gtk/menu_lht.c
+	rm -f src_plugins/hid_lesstif/menu_lht.c
+	rm -f src_plugins/query/fields_sphash.c
+	rm -f src_plugins/query/fields_sphash.h
+	rm -f util/gsch2pcb-rnd/gsch2pcb-rnd
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..b2d3aaa
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\+repack.*$// \
+  http://repo.hu/projects/pcb-rnd/releases/pcb-rnd-(.*)\.tar\.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/pcb-rnd.git



More information about the Pkg-electronics-commits mailing list