ccontrol (0.9.1+20071204-2) debian-dir only changes

Summary

 debian/NEWS                                |   15 ++
 debian/README.Debian                       |   11 +
 debian/changelog                           |   61 +++++++++
 debian/compat                              |    1 
 debian/control                             |   25 ++++
 debian/copyright                           |   41 ++++++
 debian/dirs                                |    3 
 debian/docs                                |    4 
 debian/gccontrol.1.xml                     |  103 ++++++++++++++++
 debian/lintian.overrides                   |    3 
 debian/patches/bash-for-testsuite          |   17 ++
 debian/patches/dont-touch-debian-changelog |   21 +++
 debian/patches/find-cmd-by-dir             |  179 +++++++++++++++++++++++++++++
 debian/patches/image-in-datadir            |   91 ++++++++++++++
 debian/patches/no-man-copyright-symbol     |   23 +++
 debian/patches/sbin-route-dirs             |   19 +++
 debian/patches/scan-more-networks          |   19 +++
 debian/patches/selected-test               |   19 +++
 debian/patches/series                      |    9 +
 debian/patches/user-cflags-override        |   19 +++
 debian/pycompat                            |    1 
 debian/rules                               |  156 +++++++++++++++++++++++++
 debian/watch                               |    7 +
 23 files changed, 847 insertions(+)

    
download this patch

Patch contents

--- ccontrol-0.9.1+20071204.orig/debian/docs
+++ ccontrol-0.9.1+20071204/debian/docs
@@ -0,0 +1,4 @@
+ccontrol.1.txt
+ccontrol-init.1.txt
+README
+TODO
--- ccontrol-0.9.1+20071204.orig/debian/copyright
+++ ccontrol-0.9.1+20071204/debian/copyright
@@ -0,0 +1,41 @@
+This package was debianized by Michael Neuling <mikey@neuling.org> on
+Sat, 31 Dec 2005 13:16:39 +1030.
+It has been maintained by Ted Percival <ted@midg3t.net> since
+Sat,  5 Aug 2006 13:22:21 +1000.
+
+It was downloaded from http://ozlabs.org/~rusty/ccontrol/
+
+Upstream Author: Rusty Russell <rusty@rustcorp.com.au>
+
+Copyright: 2005, 2006 Rusty Russell <rusty@rustcorp.com.au>
+
+License:
+
+   This package 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 package 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 package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License (version 2) can be found in `/usr/share/common-licenses/GPL-2'.
+
+The Debian packaging is (C) 2005 Michael Neuling <mikey@neuling.org> and
+(C) 2007, Ted Percival <ted@midg3t.net>.
+
+The following files contain code copyright 2002, 2003, 2004,
+Martin Pool <mbp@samba.org>.
+  ccontrol-identify.c
+  extensions.c
+  extensions.gperf
+
+The Debian package's compiler symlinking code is based on that from the
+ccache package, copyright 2002 Paul Russell <prussell@debian.org>.
--- ccontrol-0.9.1+20071204.orig/debian/patches/find-cmd-by-dir
+++ ccontrol-0.9.1+20071204/debian/patches/find-cmd-by-dir
@@ -0,0 +1,179 @@
+Adds the ability to specify that a command shall be found in a directory
+and let ccontrol choose the actual program to execute depending on its
+invocation.
+
+This means having multiple versions of tools such as the compiler can
+exist under different names, and ccontrol will execute the right one.
+
+It also updates ccontrol-init to specify enclosing directories by default
+because otherwise no-one will find this functionality.
+
+See http://bugs.debian.org/447832
+
+--- ccontrol-0.9.1+20060806/ccontrol.1.txt	2006-08-06 14:19:40.000000000 +1000
++++ ccontrol-0.9.1+20060806-new/ccontrol.1.txt	2007-11-04 13:10:53.000000000 +1000
+@@ -74,37 +74,38 @@
+ will end in a "*" to include all subdirectories.
+ 
+ All paths beginning with "~" are relative to the user's home
+-directory.
++directory. A path may be specified as a directory, in which case
++ccontrol will append the program name to the directory.
+ 
+ The following settings are available:
+ 
+ cc::
+-  Followed by '=' specifies the full path of the compiler to be
++  Followed by '=' specifies the path of the compiler to be
+   invoked when ccontrol is invoked as "cc" or "gcc".  ccontrol will
+   fail to compile C programs if this is not set.
+ 
+ c++::
+-  Followed by '=' specifies the full path of the compiler to be
++  Followed by '=' specifies the path of the compiler to be
+   invoked when ccontrol is invoked as "c++" or "g++".  ccontrol will
+   fail to compile C++ programs if this is not set.
+ 
+ ld::
+-  Followed by '=' specifies the full path of the linker to be invoked
++  Followed by '=' specifies the path of the linker to be invoked
+   when ccontrol is invoked as "ld".  ccontrol will fail to link
+   programs if this is not set.
+ 
+ make::
+-  Followed by '=' specifies the full path of the binary to be invoked
++  Followed by '=' specifies the path of the binary to be invoked
+   when ccontrol is invoked as "make".  ccontrol will fail to make if
+   this is not set.
+ 
+ ccache::
+-  Followed by '=' specifies the full path of "ccache", and indicates
++  Followed by '=' specifies the path of "ccache", and indicates
+   that ccache is to be used where appropriate.  If followed by
+   'disable', or not set, ccache will not be used.
+ 
+ distcc::
+-  Followed by '=' specifies the full path of "distcc", and indicates
++  Followed by '=' specifies the path of "distcc", and indicates
+   that distcc is to be used where appropriate.  If followed by
+   'disable', or not set, or distcc-hosts is not set, distcc will not
+   be used.
+diff -u ccontrol-0.9.1+20071204/ccontrol.c ccontrol-0.9.1+20071204-new/ccontrol.c
+--- ccontrol-0.9.1+20071204/ccontrol.c	2007-12-05 21:32:15.000000000 +1000
++++ ccontrol-0.9.1+20071204-new/ccontrol.c	2008-01-20 21:35:45.000000000 +1000
+@@ -330,6 +330,14 @@
+ 
+ 	/* This handles open failure if fd < 0. */
+ 	sec = read_config(configname, dirname, fd);
++
++    /* Ensure we exec the right command */
++    {
++        char *cmd = resolve_path(sec.names[type], argv[0]);
++        free(sec.names[type]);
++        sec.names[type] = cmd;
++    }
++
+ 	fstat(fd, &st);
+ 
+ 	/* Run low priority; people like to use apps while compiling. */
+diff -ru ccontrol-0.9.1+20060806/ccontrol-init ccontrol-0.9.1+20060806-new/ccontrol-init
+--- ccontrol-0.9.1+20060806/ccontrol-init	2007-11-04 12:58:10.000000000 +1000
++++ ccontrol-0.9.1+20060806-new/ccontrol-init	2007-11-04 13:33:59.000000000 +1000
+@@ -24,7 +24,7 @@
+     else
+ 	echo Found "$ANS" >&2
+     fi
+-    echo $ANS
++    echo `dirname $ANS`
+ }
+ 
+ test_net()
+diff -u ccontrol-0.9.1+20071204/ccontrol.h ccontrol-0.9.1+20071204-new/ccontrol.h
+--- ccontrol-0.9.1+20071204/ccontrol.h	2007-12-05 21:32:15.000000000 +1000
++++ ccontrol-0.9.1+20071204-new/ccontrol.h	2008-01-20 21:12:28.000000000 +1000
+@@ -70,6 +70,7 @@
+ 
+ /* ccontrol-parse.c */
+ struct section read_config(const char *configname, const char *dir, int fd);
++char *resolve_path(const char *configured_path, const char *cmdname);
+ 
+ /* ccontrol-lock.c */
+ typedef void (*undofn_t)(void);
+diff -u ccontrol-0.9.1+20071204/ccontrol-parse.c ccontrol-0.9.1+20071204-new/ccontrol-parse.c
+--- ccontrol-0.9.1+20071204/ccontrol-parse.c	2007-12-05 21:32:15.000000000 +1000
++++ ccontrol-0.9.1+20071204-new/ccontrol-parse.c	2008-01-20 21:34:46.000000000 +1000
+@@ -5,6 +5,8 @@
+ #include <fnmatch.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <sys/types.h>
++#include <sys/stat.h>
+ #include "stdrusty.h"
+ 
+ enum token_type {
+@@ -229,6 +231,44 @@
+ 	return num;
+ }
+ 
++/**
++ * Given a path and command name, returns the name of the file that
++ * should be 'exec'ed. If the path is a directory, the command name
++ * is appended. If it is an executable file, that is returned. If
++ * the path is not absolute, it is returned as-is.
++ *
++ * All return values are 'malloc'ed strings.
++ * On error, a copy of the configured_path is returned.
++ */
++char *resolve_path(const char *configured_path, const char *cmdname)
++{
++    struct stat st;
++    const char *basename;
++    char *execcmd;
++
++    if (configured_path[0] != '/'
++            || stat(configured_path, &st) == -1
++            || !S_ISDIR(st.st_mode))
++        return strdup(configured_path);
++
++    basename = strrchr(cmdname, '/');
++    if (basename)
++        ++basename;
++    else
++        basename = cmdname;
++
++    execcmd = malloc(strlen(configured_path) + strlen(basename) + 2);
++    if (!execcmd)
++        fatal("Cannot allocate memory for command", errno);
++
++    /* +1 to include the NUL byte */
++    memcpy(execcmd, configured_path, strlen(configured_path) + 1);
++    strcat(execcmd, "/");
++    strcat(execcmd, basename);
++
++    return execcmd;
++}
++
+ /* '=' <path> */
+ static char *get_path(struct string *data)
+ {
+@@ -511,6 +551,20 @@
+ 		}
+ 	}
+ 
++    /* Resolve ccache */
++    if (result->ccache) {
++        char *rawccache = result->ccache;
++        result->ccache = resolve_path(result->ccache, "ccache");
++        free(rawccache);
++    }
++
++    /* Resolve distcc */
++    if (result->distcc) {
++        char *rawdistcc = result->distcc;
++        result->distcc = resolve_path(result->distcc, "distcc");
++        free(rawdistcc);
++    }
++
+ 	free(data.start_of_file);
+ }
+ 
--- ccontrol-0.9.1+20071204.orig/debian/patches/bash-for-testsuite
+++ ccontrol-0.9.1+20071204/debian/patches/bash-for-testsuite
@@ -0,0 +1,17 @@
+# HG changeset patch
+# User Ted Percival <ted@midg3t.net>
+# Date 1158580088 -36000
+# Node ID 5d91557ebfe8c7e2d3620c719bc19184f009c117
+# Parent  ebb32604b21721a5cda4a1617c27aa1beef3b946
+Use bash for testsuite/test.sh.
+Needed for the case match on lines 49 & 50. (dash matches differently)
+
+diff --git a/testsuite/test.sh b/testsuite/test.sh
+--- a/testsuite/test.sh
++++ b/testsuite/test.sh
+@@ -1,4 +1,4 @@
+-#! /bin/sh -e
++#! /bin/bash -e
+ 
+ TESTDIR=/tmp/ccontrol-test
+ 
--- ccontrol-0.9.1+20071204.orig/debian/patches/image-in-datadir
+++ ccontrol-0.9.1+20071204/debian/patches/image-in-datadir
@@ -0,0 +1,91 @@
+# HG changeset patch
+# User ted@midg3t.net
+# Date 1154794378 -36000
+# Node ID 25e5276fcbdda795557caf39d618d549591d24c9
+# Parent  73aeac69e8d27d872d222bfef07c9b71c2f2668b
+Use DATADIR for PNG image
+"read-only architecture-independent data"
+
+diff --git a/Makefile.in b/Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -6,6 +6,7 @@ ALLFILES=$(C_FILES) $(GPERF_C_FILES) Mak
+ ALLFILES=$(C_FILES) $(GPERF_C_FILES) Makefile stdrusty.h ccontrol.h
+ BINDIR=@BINDIR@
+ LIBDIR=@LIBDIR@
++DATADIR=@DATADIR@
+ MANDIR=@MANDIR@
+ XMLTO=@XMLTO@
+ ASCIIDOC=@ASCIIDOC@
+@@ -31,12 +32,12 @@ ccontrol_test: $(ALLFILES)
+ 
+ install: installbin installlib installman installgui
+ 
+-$(prefix)$(BINDIR) $(prefix)$(MANDIR)/man1 $(prefix)$(LIBDIR):
++$(prefix)$(BINDIR) $(prefix)$(MANDIR)/man1 $(prefix)$(LIBDIR) $(prefix)$(DATADIR):
+ 	mkdir -p $@
+ 
+-installgui: $(prefix)$(LIBDIR)/ccontrol-key.png $(prefix)$(BINDIR)/gccontrol.py
++installgui: $(prefix)$(DATADIR)/ccontrol-key.png $(prefix)$(BINDIR)/gccontrol.py
+ 
+-$(prefix)$(LIBDIR)/ccontrol-key.png: gui/ccontrol-key.png $(prefix)$(LIBDIR) 
++$(prefix)$(DATADIR)/ccontrol-key.png: gui/ccontrol-key.png $(prefix)$(DATADIR) 
+ 	cp $< $@
+ 
+ $(prefix)$(BINDIR)/gccontrol.py: gui/gccontrol.py $(prefix)$(BINDIR) 
+diff --git a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -17,6 +17,7 @@ BINDIR=/usr/local/bin
+ BINDIR=/usr/local/bin
+ LIBDIR=/usr/local/lib/ccontrol
+ MANDIR=/usr/local/share/man
++DATADIR=/usr/local/share/ccontrol
+ XMLTO=`which xmlto`
+ ASCIIDOC=`which asciidoc`
+ OPTFLAGS=-O3
+@@ -28,6 +29,7 @@ while [ $# -gt 0 ]; do
+ 	--bindir=*) BINDIR=`echo $1 | cut -d= -f2-`;;
+ 	--libdir=*) LIBDIR=`echo $1 | cut -d= -f2-`;;
+ 	--mandir=*) MANDIR=`echo $1 | cut -d= -f2-`;;
++	--datadir=*) DATADIR=`echo $1 | cut -d= -f2-`;;
+ 	--xmlto=*) XMLTO=`echo $1 | cut -d= -f2-`;;
+ 	--asciidoc=*) ASCIIDOC=`echo $1 | cut -d= -f2-`;;
+ 	--enable-debug) OPTFLAGS=-g; DEBUG=1; NODIET=1;;
+@@ -39,6 +41,7 @@ while [ $# -gt 0 ]; do
+ 	    echo "  --bindir=$BINDIR" >&2
+ 	    echo "  --libdir=$LIBDIR" >&2
+ 	    echo "  --mandir=$MANDIR" >&2
++	    echo "  --datadir=$DATADIR" >&2
+ 	    echo "  --xmlto=$XMLTO" >&2
+ 	    echo "  --asciidoc=$ASCIIDOC" >&2
+ 	    echo "  --enable-debug" >&2
+@@ -98,6 +101,7 @@ echo sed -e \""s,@CC@,$CC,g\"" \
+ 	-e \""s,@BINDIR@,$BINDIR,g\"" \
+ 	-e \""s,@LIBDIR@,$LIBDIR,g\"" \
+ 	-e \""s,@MANDIR@,$MANDIR,g\"" \
++	-e \""s,@DATADIR@,$DATADIR,g\"" \
+ 	-e \""s,@XMLTO@,$XMLTO,g\"" \
+ 	-e \""s,@ASCIIDOC@,$ASCIIDOC,g\"" \
+ 	-e \""s,@CFLAGS@,$CFLAGS,g\"" \
+diff --git a/gui/gccontrol.py.in b/gui/gccontrol.py.in
+--- a/gui/gccontrol.py.in
++++ b/gui/gccontrol.py.in
+@@ -6,7 +6,7 @@ import os
+ import os
+ import stat
+ 
+-LIBDIR = "@LIBDIR@"
++DATADIR = "@DATADIR@"
+ 
+ 
+ def unexpand_user(path):
+@@ -160,7 +160,7 @@ class TrayIcon(egg.trayicon.TrayIcon):
+         self._gui = ConfigEditor()
+ 
+         img = gtk.Image()
+-        img.set_from_file("%s/ccontrol-key.png" % LIBDIR)
++        img.set_from_file("%s/ccontrol-key.png" % DATADIR)
+         eventbox = gtk.EventBox()
+         eventbox.add(img)
+         eventbox.set_events(gtk.gdk.BUTTON_PRESS_MASK)
--- ccontrol-0.9.1+20071204.orig/debian/patches/series
+++ ccontrol-0.9.1+20071204/debian/patches/series
@@ -0,0 +1,9 @@
+dont-touch-debian-changelog
+bash-for-testsuite
+selected-test
+user-cflags-override
+scan-more-networks
+no-man-copyright-symbol
+image-in-datadir
+sbin-route-dirs
+find-cmd-by-dir
--- ccontrol-0.9.1+20071204.orig/debian/patches/scan-more-networks
+++ ccontrol-0.9.1+20071204/debian/patches/scan-more-networks
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Ted Percival <ted@midg3t.net>
+# Date 1154795371 -36000
+# Node ID 5c2c4b47d962f71a9278d0abdf11ca7e6986396c
+# Parent  34f3e9fb97395d302a4ccf988b81c3dd5a4b1b58
+Accept networks ending in ".0.0" when scanning for distcc hosts
+
+diff --git a/ccontrol-init b/ccontrol-init
+--- a/ccontrol-init
++++ b/ccontrol-init
+@@ -50,7 +50,7 @@ scan_for_distcc()
+     PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
+     NET=`route -n | grep '^[123456789]' | awk '{print $1}' | head -1`
+     case "$NET" in
+-	*[123456789].0)
++	[123456789]*.0)
+ 	    echo -n scanning network $NET...
+ 	    set +e
+ 	    NET=`echo $NET | sed 's/\.0$//'`
--- ccontrol-0.9.1+20071204.orig/debian/patches/user-cflags-override
+++ ccontrol-0.9.1+20071204/debian/patches/user-cflags-override
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Ted Percival <ted@midg3t.net>
+# Date 1154795717 -36000
+# Node ID 5b40f9700b9970c17c0d09ae7db147c64f2d5617
+# Parent  5c2c4b47d962f71a9278d0abdf11ca7e6986396c
+Let the user's CFLAGS override ours, so they can change the -O level
+
+diff --git a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -67,7 +67,7 @@ echo $CC
+ echo $CC
+ 
+ echo -n Looking for compiler flags...
+-CFLAGS="${CFLAGS:--Wall -Wmissing-declarations} $OPTFLAGS"
++CFLAGS="$OPTFLAGS ${CFLAGS:--Wall -Wmissing-declarations}"
+ echo $CFLAGS
+ 
+ echo -n Looking for xmlto...
--- ccontrol-0.9.1+20071204.orig/debian/patches/selected-test
+++ ccontrol-0.9.1+20071204/debian/patches/selected-test
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User Ted Percival <ted@midg3t.net>
+# Date 1158579981 -36000
+# Node ID ebb32604b21721a5cda4a1617c27aa1beef3b946
+# Parent  ef6e6294074e3dc6dfa0b0539c7c050a868ce217
+Only run the selected test if just one is selected.
+Previously the selected test and all that followed would be run.
+
+diff --git a/testsuite/test.sh b/testsuite/test.sh
+--- a/testsuite/test.sh
++++ b/testsuite/test.sh
+@@ -76,6 +76,7 @@ unset CCONTROL_NO_PARALLEL
+ 
+ MATCH=${1:-"*"}
+ for f in testsuite/[0-9]*.test; do
++    RUN=
+     case `basename $f` in $MATCH) RUN=1;; esac
+     [ -n "$RUN" ] || continue
+ 
--- ccontrol-0.9.1+20071204.orig/debian/patches/sbin-route-dirs
+++ ccontrol-0.9.1+20071204/debian/patches/sbin-route-dirs
@@ -0,0 +1,19 @@
+# HG changeset patch
+# User ted@midg3t.net
+# Date 1154793394 -36000
+# Node ID 73aeac69e8d27d872d222bfef07c9b71c2f2668b
+# Parent  65acde90ef753f74266f11831b2cd074badc9207
+Ensure common 'sbin' directories are searched for 'route'
+
+diff --git a/ccontrol-init b/ccontrol-init
+--- a/ccontrol-init
++++ b/ccontrol-init
+@@ -46,6 +46,8 @@ ping_network()
+ 
+ scan_for_distcc()
+ {
++    local PATH
++    PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
+     NET=`route -n | grep '^[123456789]' | awk '{print $1}' | head -1`
+     case "$NET" in
+ 	*[123456789].0)
--- ccontrol-0.9.1+20071204.orig/debian/patches/dont-touch-debian-changelog
+++ ccontrol-0.9.1+20071204/debian/patches/dont-touch-debian-changelog
@@ -0,0 +1,21 @@
+diff --git a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -86,17 +86,6 @@ else
+     echo $ASCIIDOC
+ fi
+ 
+-DEBVERSION=`head -n1 debian/changelog | sed -e 's/^ccontrol (\([0-9.]\+\)-[0-9]\+) .*$/\1/'`
+-
+-if [ "$DEBVERSION" != "$VERSION" ]; then
+-       echo "Fixing up debian/changelog as the version was changed."
+-       # FIXME: -R is GNU date specific
+-       DATE=`date -R`
+-       cp debian/changelog debian/changelog.old
+-       (sed -e "s/@VERSION@/$VERSION/" -e "s/@DATE@/$DATE/" debian/changelog.template.in ; cat debian/changelog.old) > debian/changelog
+-       rm debian/changelog.old
+-fi
+-
+ echo sed -e \""s,@CC@,$CC,g\"" \
+ 	-e \""s,@BINDIR@,$BINDIR,g\"" \
+ 	-e \""s,@LIBDIR@,$LIBDIR,g\"" \
--- ccontrol-0.9.1+20071204.orig/debian/patches/no-man-copyright-symbol
+++ ccontrol-0.9.1+20071204/debian/patches/no-man-copyright-symbol
@@ -0,0 +1,23 @@
+# HG changeset patch
+# User ted@midg3t.net
+# Date 1154794639 -36000
+# Node ID 34f3e9fb97395d302a4ccf988b81c3dd5a4b1b58
+# Parent  333e2cd2ca84844ea03c5cf8daa3a1b7cf917b6b
+Replace copyright symbol with "(c)" in manpages - man doesn't like ©
+
+diff --git a/Makefile.in b/Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -59,10 +59,10 @@ installlib: $(LINKS)
+ 	ln -sf $(BINDIR)/ccontrol $@
+ 
+ $(prefix)$(MANDIR)/man1/ccontrol.1: ccontrol.1
+-	cp $< $@
++	sed -e 's,©,(c),g' < $< > $@
+ 
+ $(prefix)$(MANDIR)/man1/ccontrol-init.1: ccontrol-init.1
+-	cp $< $@
++	sed -e 's,©,(c),g' < $< > $@
+ 
+ uninstall:
+ 	rm -f $(prefix)$(BINDIR)/ccontrol $(prefix)$(BINDIR)/ccontrol-init $(LINKS) $(prefix)$(MANDIR)/man1/ccontrol.1 $(prefix)$(MANDIR)/man1/ccontrol-init.1
--- ccontrol-0.9.1+20071204.orig/debian/gccontrol.1.xml
+++ ccontrol-0.9.1+20071204/debian/gccontrol.1.xml
@@ -0,0 +1,103 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+        $(XP) $(DB2MAN) $<
+    
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!ENTITY dhfirstname "<firstname>Ted</firstname>">
+  <!ENTITY dhsurname   "<surname>Percival</surname>">
+  <!ENTITY dhdate      "<date>2006-08-06</date>">
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>ted@midg3t.net</email>">
+  <!ENTITY dhusername  "&dhfirstname; &dhsurname;">
+  <!ENTITY dhucpackage "<refentrytitle>gccontrol</refentrytitle>">
+  <!ENTITY dhpackage   "gccontrol">
+
+<!-- Commented out until "&#8482;" turns into something sensible in a manpage
+  <!ENTITY debian      "<productname>Debian</productname>">-->
+  <!ENTITY debian      "Debian">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <copyright>
+      <year>2006</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>GUI for ccontrol</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <para>The <command>&dhpackage;</command> command takes no arguments.</para>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para><command>&dhpackage;</command> provides a Graphical User Interface 
+		for choosing the configuration file for <command>ccontrol</command>
+		to use. It works by switching the&nbsp;
+		<filename><envar>$HOME</envar>/.ccontrol/config</filename> symlink
+		to point to another configuration file in that directory.
+	</para>
+
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+	<para>ccontrol(1), ccontrol-init(1).</para>
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any 
+    later version published by the Free Software Foundation.
+    </para>
+	<para>
+      On &debian; systems, the complete text of the GNU General Public
+      License can be found in /usr/share/common-licenses/GPL.
+    </para>
+
+  </refsect1>
+</refentry>
+<!-- vim:
+ts=2:et=2:sw=2 -->
--- ccontrol-0.9.1+20071204.orig/debian/README.Debian
+++ ccontrol-0.9.1+20071204/debian/README.Debian
@@ -0,0 +1,11 @@
+ccontrol for Debian
+-------------------
+
+By default the ccontrol[-init] programs will placed in /usr/bin and
+the links (gcc, cc, ld etc.) will be placed in /usr/lib/ccontrol.
+Hence users need to add /usr/lib/ccontrol to their path to work with
+ccontrol.
+
+	export PATH=/usr/lib/ccontrol:$PATH
+
+ -- Michael Neuling <mikey@neuling.org>, Sat, 31 Dec 2005 13:16:39 +1030
--- ccontrol-0.9.1+20071204.orig/debian/dirs
+++ ccontrol-0.9.1+20071204/debian/dirs
@@ -0,0 +1,3 @@
+usr/lib/ccontrol
+usr/share/man/man1
+usr/share/lintian/overrides
--- ccontrol-0.9.1+20071204.orig/debian/lintian.overrides
+++ ccontrol-0.9.1+20071204/debian/lintian.overrides
@@ -0,0 +1,3 @@
+# ccontrol aims to be very small and fast, so it statically compiles
+# dietlibc into the binary, making it smaller than a shared binary.
+ccontrol binary: statically-linked-binary ./usr/bin/ccontrol
--- ccontrol-0.9.1+20071204.orig/debian/control
+++ ccontrol-0.9.1+20071204/debian/control
@@ -0,0 +1,25 @@
+Source: ccontrol
+Section: devel
+Priority: optional
+Maintainer: Ted Percival <ted@midg3t.net>
+Build-Depends: debhelper (>= 5.0.37.2), autotools-dev, asciidoc, xmlto,
+  gperf, python-central(>= 0.5), quilt
+Standards-Version: 3.7.3.0
+Homepage: http://ccontrol.ozlabs.org/
+XS-Vcs-Git: git://tedp.id.au/git/ccontrol-debian.git
+XS-Vcs-Browser: http://tedp.id.au/gitweb/?p=ccontrol-debian.git
+XS-Python-Version: current
+
+Package: ccontrol
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends},
+ gcc, make, binutils, ccache
+Suggests: distcc
+XB-Python-Version: ${python:Versions}
+Description: Compilation controller
+ The ccontrol program takes over the roles of the compiler, linker and
+ make, and reads a configuration file to decide what to do before
+ invoking them. This is particularly useful for centralized control over
+ commands and options, such as enabling distcc and ccache. It is also
+ great for controlling parallelism and which compiler versions to use,
+ based on the directory and make targets.
--- ccontrol-0.9.1+20071204.orig/debian/compat
+++ ccontrol-0.9.1+20071204/debian/compat
@@ -0,0 +1 @@
+5
--- ccontrol-0.9.1+20071204.orig/debian/NEWS
+++ ccontrol-0.9.1+20071204/debian/NEWS
@@ -0,0 +1,15 @@
+ccontrol (0.9.1+20071204-1) unstable; urgency=low
+
+  The symlinks provided in /usr/lib/ccontrol for alternate compiler versions
+  don't actually execute the alternate compiler unless ccontrol config files
+  are updated to point to the enclosing directory, eg.
+    cc = /usr/bin
+  instead of
+    cc = /usr/bin/gcc
+
+  The ccontrol-init(1) program will now generate config files pointing to the
+  enclosing directory so the correct program will be found.
+
+  This is currently a Debian extension. See bug #447832 for details.
+
+ -- Ted Percival <ted@midg3t.net>  Wed, 05 Dec 2007 11:50:13 +0000
--- ccontrol-0.9.1+20071204.orig/debian/rules
+++ ccontrol-0.9.1+20071204/debian/rules
@@ -0,0 +1,156 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# This file was originally written by Joey Hess and Craig Small.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/quilt/quilt.make
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
+XP=xsltproc
+XPFLAGS=-''-nonet
+# Version is everything before the first hyphen, taken from changelog
+#VERSION=$(shell dpkg-parsechangelog | grep ^Version | sed 's,^Version: \([^-]*\).*,\1,')
+VERSION=0.9.1
+UPSTREAM_TGZ=http://ccontrol.ozlabs.org/releases/ccontrol-$(VERSION).tar.bz2
+DATE:=$(shell date +%Y%m%d)
+
+CFLAGS = -Wall -g -DNDEBUG -fno-stack-protector
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O3
+endif
+
+CONFIGURE_ARGS += --disable-dietlibc
+
+configure: patch
+config.status: configure
+	dh_testdir
+	# Commands to configure the package.
+	CFLAGS="$(CFLAGS)" ./configure \
+		--bindir=/usr/bin \
+		--libdir=/usr/lib/ccontrol \
+		--datadir=/usr/share/ccontrol \
+		--mandir=/usr/share/man \
+		$(CONFIGURE_ARGS)
+
+
+build: build-stamp
+
+build-stamp: config.status gui/gccontrol.1
+	dh_testdir
+	# Commands to compile the package.
+	$(MAKE)
+	touch build-stamp
+
+clean: clean-patched unpatch
+clean-patched: config.status
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	# Commands to clean up after the build process.
+	$(MAKE) distclean
+	rm -f gui/gccontrol.1
+	for f in `find . -name '*.in'`; do \
+		rm -f `echo $$f | sed 's/\.in$$//'`; \
+	done
+	for f in `find . -name '*.gperf'`; do \
+		rm -f `echo $$f | sed 's/\.gperf$$/.c/'`; \
+	done
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	# Commands to install the package into debian/ccontrol.
+	$(MAKE) install prefix=$(CURDIR)/debian/ccontrol
+	cp $(CURDIR)/gui/gccontrol.1 $(CURDIR)/debian/ccontrol/usr/share/man/man1
+	cp $(CURDIR)/debian/lintian.overrides $(CURDIR)/debian/ccontrol/usr/share/lintian/overrides/ccontrol
+	:
+	# Work around DocBook bug #1576016: ".sp" in manpages instead of paragraph separator
+	# http://sourceforge.net/tracker/index.php?func=detail&aid=1576016&group_id=21935&atid=373747
+	# This sed script is idempotent
+	sed -i -e 's,\([^^]\)\.sp,\1\n.sp,' `find debian/*/usr/share/man -name '*.[123456789]'`
+	:
+	# Massive compiler linkage copied almost verbatim from ccache packaging,
+	# Copyright 2002 Paul Russell <prussell@debian.org>
+	ln -s ../../bin/ccontrol $(CURDIR)/debian/ccontrol/usr/lib/ccontrol/$(DEB_HOST_GNU_TYPE)-gcc
+	ln -s ../../bin/ccontrol $(CURDIR)/debian/ccontrol/usr/lib/ccontrol/$(DEB_HOST_GNU_TYPE)-g++
+	set -e; for ver in 3.3 3.4 4.1 4.2 4.3; do \
+		ln -s ../../bin/ccontrol $(CURDIR)/debian/ccontrol/usr/lib/ccontrol/$(DEB_HOST_GNU_TYPE)-gcc-$$ver; \
+		ln -s ../../bin/ccontrol $(CURDIR)/debian/ccontrol/usr/lib/ccontrol/gcc-$$ver; \
+		ln -s ../../bin/ccontrol $(CURDIR)/debian/ccontrol/usr/lib/ccontrol/$(DEB_HOST_GNU_TYPE)-g++-$$ver; \
+		ln -s ../../bin/ccontrol $(CURDIR)/debian/ccontrol/usr/lib/ccontrol/g++-$$ver; \
+	done
+	mv debian/ccontrol/usr/bin/gccontrol.py debian/ccontrol/usr/bin/gccontrol
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# Nothing to do for binary-indep
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs CHANGES
+	dh_installdocs
+	dh_installexamples
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_pycentral
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+gui/gccontrol.1: debian/gccontrol.1.xml
+	dh_testdir
+	$(XP) -o $@ $(XPFLAGS) $(DB2MAN) $<
+
+binary: binary-indep binary-arch
+
+## Maintainer commands ##
+
+get-orig-source: get-orig-source-hg
+	dh_testdir
+	# Remove existing files that would get in the way
+	rm  -rf  ccontrol-$(VERSION)+$(DATE)
+	hg clone http://ccontrol.ozlabs.org/hgweb.cgi ccontrol-$(VERSION)+$(DATE)
+	# Remove unwanted files
+	rm  -rf  ccontrol-$(VERSION)+$(DATE)/debian ccontrol-$(VERSION)+$(DATE)/.hg*
+	# Build archive
+	tar -czf ccontrol_$(VERSION)+$(DATE).orig.tar.gz ccontrol-$(VERSION)+$(DATE)
+	rm  -rf  ccontrol-$(VERSION)+$(DATE)
+
+get-orig-source-hg:
+
+get-orig-source-release:
+	dh_testdir
+	# Remove existing files that would get in the way
+	rm  -rf  ccontrol-$(VERSION)
+	wget     $(UPSTREAM_TGZ)
+	tar -xjf ccontrol-$(VERSION).tar.bz2
+	rm  -f   ccontrol-$(VERSION).tar.bz2
+	# Remove unwanted files
+	rm  -rf  ccontrol-$(VERSION)/debian ccontrol-$(VERSION)/.hg*
+	# Rebuild archive
+	tar -czf ccontrol_$(VERSION).orig.tar.gz ccontrol-$(VERSION)
+	rm  -rf  ccontrol-$(VERSION)
+
+.PHONY: build clean binary-indep binary-arch binary install get-orig-source \
+	get-orig-source-release get-orig-source-hg
--- ccontrol-0.9.1+20071204.orig/debian/watch
+++ ccontrol-0.9.1+20071204/debian/watch
@@ -0,0 +1,7 @@
+# You can run the "uscan" command to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory
+version=3
+
+http://ccontrol.ozlabs.org/releases/ccontrol-(.*)\.tar\.bz2
--- ccontrol-0.9.1+20071204.orig/debian/pycompat
+++ ccontrol-0.9.1+20071204/debian/pycompat
@@ -0,0 +1 @@
+2
--- ccontrol-0.9.1+20071204.orig/debian/changelog
+++ ccontrol-0.9.1+20071204/debian/changelog
@@ -0,0 +1,61 @@
+ccontrol (0.9.1+20071204-2) unstable; urgency=low
+
+  * Fix execution of commands with absolute paths (closes: #455446).
+  * Break a dependency loop between config.status and configure in
+    debian/rules.
+
+ -- Ted Percival <ted@midg3t.net>  Sun, 20 Jan 2008 12:04:39 +0000
+
+ccontrol (0.9.1+20071204-1) unstable; urgency=low
+
+  * New upstream snapshot.
+  * Separate all changes into patch files.
+  * Add support for finding commands by directory rather than being named
+    explicitly (Closes: #447832)
+  * Dynamically link glibc instead of statically linking dietlibc to ease
+    security support.
+  * Remove symlink for gcc-2.95 and add symlink for gcc-4.3.
+  * Moved package Homepage into its own header.
+  * Update to Standards-Version 3.7.3.0.
+  * Clarify GPL version in copyright file.
+
+ -- Ted Percival <ted@midg3t.net>  Fri, 07 Dec 2007 13:18:23 +0000
+
+ccontrol (0.9.1+20060806-4) unstable; urgency=low
+
+  * Force-disable GCC stack protection as it is incompatible with the
+    current dietlibc (Ubuntu #109157).
+  * Don't ignore errors in $(MAKE) distclean.
+
+ -- Ted Percival <ted@midg3t.net>  Sun, 26 Aug 2007 12:28:30 +1000
+
+ccontrol (0.9.1+20060806-3) unstable; urgency=low
+
+  [debian/control]
+  * Update Standards-Version to 3.7.2.2. No changes.
+  * Move distcc from Recommends to Suggests.
+  * Use proper indentation of Homepage pseudo-field.
+  * Use official VCS headers.
+  * Update VCS location.
+
+  [debian/rules]
+  * Don't create symlinks for gcc-4.0 as it is no longer available.
+
+ -- Ted Percival <ted@midg3t.net>  Sat, 04 Aug 2007 17:15:56 +1000
+
+ccontrol (0.9.1+20060806-2) unstable; urgency=low
+
+  * Create correct symlinks for cross-compiled packages.
+  * Change distcc from "Depends" to "Recommends".
+  * Only use dietlibc on architectures where it is available. Fixes FTBFS on
+    m68k.
+  * Update to Debian Python Policy 0.4.1.0.
+  * Fix ".sp" showing up in manpages instead of paragraph breaks.
+
+ -- Ted Percival <ted@midg3t.net>  Fri, 13 Oct 2006 02:38:24 +1000
+
+ccontrol (0.9.1+20060806-1) unstable; urgency=low
+
+  * Initial release (Closes: #379126)
+
+ -- Ted Percival <ted@midg3t.net>  Tue, 04 Dec 2007 11:07:44 +0000