debian/0000755000000000000000000000000011664416261007175 5ustar debian/compat0000644000000000000000000000000211660041354010364 0ustar 7 debian/gccontrol.1.xml0000644000000000000000000000622511660033507012047 0ustar .
will be generated. You may view the manual page with: nroff -man .
| 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. --> Ted"> Percival"> 2006-08-06"> 1"> ted@midg3t.net"> gccontrol"> GNU"> GPL"> ]>
&dhemail;
2006 &dhusername; &dhdate;
&dhucpackage; &dhsection; &dhpackage; GUI for ccontrol The &dhpackage; command takes no arguments. DESCRIPTION &dhpackage; provides a Graphical User Interface for choosing the configuration file for ccontrol to use. It works by switching the  $HOME/.ccontrol/config symlink to point to another configuration file in that directory. SEE ALSO ccontrol(1), ccontrol-init(1). AUTHOR 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. On &debian; systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
debian/control0000644000000000000000000000171011660046413010571 0ustar Source: ccontrol Section: devel Priority: optional Maintainer: Debian QA Group Build-Depends: debhelper (>= 7), dpkg-dev (>= 1.15.7), asciidoc, xmlto, gperf Standards-Version: 3.9.2 Homepage: http://ccontrol.ozlabs.org/ Vcs-Git: git://tedp.id.au/git/ccontrol-debian.git Vcs-Browser: http://tedp.id.au/gitweb/?p=ccontrol-debian.git Package: ccontrol Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, gcc, make, binutils, ccache Recommends: python, python-gtk2, python-eggtrayicon Suggests: distcc 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. debian/patches/0000755000000000000000000000000011664416100010614 5ustar debian/patches/add-missing-includes0000644000000000000000000000050611664416100014543 0ustar Description: Add missing includes. Author: Jakub Wilk Forwarded: no Last-Update: 2011-11-14 --- a/ccontrol.c +++ b/ccontrol.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "stdrusty.h" #include "ccontrol.h" debian/patches/sbin-route-dirs0000644000000000000000000000064111660054550013571 0ustar Description: Ensure that common ‘sbin’ directories are searched for ‘route’. Author: Ted Percival Forwarded: no Last-Update: 2011-11-14 --- a/ccontrol-init +++ b/ccontrol-init @@ -46,6 +46,8 @@ 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) debian/patches/bash-for-testsuite0000644000000000000000000000055511660053170014274 0ustar Description: Use bash for testsuite/test.sh. Use bash for testsuite/test.sh. This is needed for the case match on lines 49 and 50 (dash matches differently). Author: Ted Percival Forwarded: no Last-Update: 2011-11-14 --- a/testsuite/test.sh +++ b/testsuite/test.sh @@ -1,4 +1,4 @@ -#! /bin/sh -e +#! /bin/bash -e TESTDIR=/tmp/ccontrol-test debian/patches/user-cflags-override0000644000000000000000000000065311660055021014570 0ustar Description: Let the user's CFLAGS override ours, so they can change the -O level. Author: Ted Percival Forwarded: no Last-Update: 2011-11-14 --- a/configure +++ b/configure @@ -75,7 +75,7 @@ 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... debian/patches/find-cmd-by-dir0000644000000000000000000001231211660054043013403 0ustar Description: Add support for finding commands by directory rather than being named explicitly. Add 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. Author: Ted Percival Bug-Debian: http://bugs.debian.org/447832 Last-Update: 2011-11-14 --- a/ccontrol.1.txt +++ b/ccontrol.1.txt @@ -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. --- a/ccontrol.c +++ b/ccontrol.c @@ -352,6 +352,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. */ --- a/ccontrol-init +++ b/ccontrol-init @@ -24,7 +24,7 @@ else echo Found "$ANS" >&2 fi - echo $ANS + echo `dirname $ANS` } test_net() --- a/ccontrol.h +++ b/ccontrol.h @@ -72,6 +72,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); --- a/ccontrol-parse.c +++ b/ccontrol-parse.c @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include "stdrusty.h" enum token_type { @@ -228,6 +230,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; +} + /* '=' */ static char *get_path(struct string *data) { @@ -510,6 +550,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); } debian/patches/series0000644000000000000000000000031011662210037012022 0ustar dont-touch-debian-changelog bash-for-testsuite selected-test user-cflags-override scan-more-networks image-in-datadir sbin-route-dirs find-cmd-by-dir configure-cflags-with-commas add-missing-includes debian/patches/configure-cflags-with-commas0000644000000000000000000000077511660053027016215 0ustar Description: Make configure scripts accept CFLAGS with embedded commas. Author: Jakub Wilk Forwarded: no Last-Update: 2011-11-14 --- a/configure +++ b/configure @@ -104,7 +104,7 @@ -e \""s,@DATADIR@,$DATADIR,g\"" \ -e \""s,@XMLTO@,$XMLTO,g\"" \ -e \""s,@ASCIIDOC@,$ASCIIDOC,g\"" \ - -e \""s,@CFLAGS@,$CFLAGS,g\"" \ + -e \""s!@CFLAGS@!$CFLAGS!g\"" \ -e \""s,@VERSION@,$VERSION,g\"" \ -e \""s,@VERSION_NAME@,$VERSION_NAME,g\"" \ -e \""s,@VALGRIND@,$VALGRIND,g\"" > config.status debian/patches/dont-touch-debian-changelog0000644000000000000000000000137511660053277016006 0ustar Description: Don't touch debian/changelog. Forwarded: not-needed Last-Update: 2011-11-14 --- a/configure +++ b/configure @@ -94,17 +94,6 @@ 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\"" \ debian/patches/scan-more-networks0000644000000000000000000000066611660054620014306 0ustar Description: Accept networks ending in ‘.0.0’ when scanning for distcc hosts. Author: Ted Percival Forwarded: no Last-Update: 2011-11-14 --- a/ccontrol-init +++ b/ccontrol-init @@ -48,7 +48,7 @@ { 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$//'` debian/patches/image-in-datadir0000644000000000000000000000506611662210173013642 0ustar Description: Use DATADIR for the PNG image. Author: Ted Percival Forwarded: no Last-Update: 2011-11-14 --- a/Makefile.in +++ b/Makefile.in @@ -6,6 +6,7 @@ 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 @@ 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) --- a/configure +++ b/configure @@ -17,6 +17,7 @@ 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 @@ --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 @@ 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 @@ -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\"" \ --- a/gui/gccontrol.py.in +++ b/gui/gccontrol.py.in @@ -6,7 +6,7 @@ import os import stat -LIBDIR = "@LIBDIR@" +DATADIR = "@DATADIR@" def unexpand_user(path): @@ -160,7 +160,7 @@ 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) debian/patches/selected-test0000644000000000000000000000073111660054674013317 0ustar Description: Only run the selected test if just one is selected. Only run the selected test if just one is selected. Previously the selected test and all that followed would be run. Author: Ted Percival Forwarded: no Last-Update: 2011-11-14 --- a/testsuite/test.sh +++ b/testsuite/test.sh @@ -76,6 +76,7 @@ MATCH=${1:-"*"} for f in testsuite/[0-9]*.test; do + RUN= case `basename $f` in $MATCH) RUN=1;; esac [ -n "$RUN" ] || continue debian/copyright0000644000000000000000000000313611660040437011125 0ustar This package was debianized by Michael Neuling on Sat, 31 Dec 2005 13:16:39 +1030. It has been maintained by Ted Percival since Sat, 5 Aug 2006 13:22:21 +1000. It was downloaded from http://ozlabs.org/~rusty/ccontrol/ Upstream Author: Rusty Russell Copyright: 2005, 2006 Rusty Russell 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 © 2005 Michael Neuling and © 2007, Ted Percival . The following files contain code copyright 2002, 2003, 2004, Martin Pool . 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 . debian/dirs0000644000000000000000000000004411660036207010051 0ustar usr/lib/ccontrol usr/share/man/man1 debian/watch0000644000000000000000000000027111660033507010220 0ustar # 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 debian/docs0000644000000000000000000000005711660033507010044 0ustar ccontrol.1.txt ccontrol-init.1.txt README TODO debian/changelog0000644000000000000000000001035411664416261011052 0ustar ccontrol (1.0-1) unstable; urgency=low * QA upload. + Set maintainer to Debian QA Group (see #574013). * New upstream release. * Don't use python-central; it was needed only to generate dependency on python (closes: #616774). Thanks to Matthias Klose for the bug report. + Remove python-central from Build-Depends. + Remove dh_pycentral call from debian/rules. + Use explicit ‘python’ dependency instead of ${python:Depends}. + Remove X{S,B}-Python-Version fields. * Move python to Recommends. Add python-gtk2 and python-eggtrayicon to Recommends, as they are needed to run GUI (closes: #645054). Thanks to David Gibson for the bug report. * Convert to source format 3.0 (quilt). + Add debian/source/format. + Remove explicit patching code from debian/rules. + Remove quilt from Build-Depends. + Refresh patches so that they apply without fuzz. * Remove unused lintian overrides. * Strip XS- prefix from Vcs-* fields. + Bump standards version to 3.9.2. + Use filter (not findstring) to parse DEB_BUILD_OPTIONS. * Replace ‘(C)’ with ‘©’ in the copyright file. * Improve debian/rules: + Add build-arch and build-indep targets. + Add ‘set -e’ to for loops. + Use $() construct instead of backticks. + Remove unused variables. + Drop work-around for a bug in DocBook XSL that was fixed long ago. + Write a policy-compliant get-orig-source target. * Bump debhelper compatibility level to 7. + Update debian/compat. + Update Build-Depends. + Use dh_prep instead of dh_clean -k. * Pass CFLAGS, CPPFLAGS and LDFLAGS (acquired from dpkg-buildflags) to the build system. + Build depend on dpkg-dev (>= 1.15.7). + Update debian/rules. + Patch configure stript to allow CFLAGS with embedded commas. * Remove unused dependency on autotools-dev. * Remove code to build orig tarballs from the VCS. * Write DEP-3 patch headers. * Add patch to add missing includes. * Drop the no-man-copyright-symbol patch, no longer needed. * Update GCC version numbers; use 4.4, 4.5, 4.6. -- Jakub Wilk Sun, 27 Nov 2011 12:19:11 +0100 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 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 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 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 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 Fri, 13 Oct 2006 02:38:24 +1000 ccontrol (0.9.1+20060806-1) unstable; urgency=low * Initial release (Closes: #379126) -- Ted Percival Tue, 04 Dec 2007 11:07:44 +0000 debian/README.Debian0000644000000000000000000000055611660033507011236 0ustar 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 , Sat, 31 Dec 2005 13:16:39 +1030 debian/get-orig-source.sh0000644000000000000000000000121411660237240012534 0ustar #!/bin/sh set -e export TAR_OPTIONS='--owner root --group root --mode a+rX' export GZIP='-9n' pwd=$(pwd) version="$1" if [ -z "$version" ] then printf 'Usage: %s \n' "$0" exit 1 fi cd "$(dirname "$0")/../" tmpdir=$(mktemp -t -d get-orig-source.XXXXXX) set -x uscan --noconf --force-download --rename --download-version="$version" --destdir="$tmpdir" cd "$tmpdir" tar -xjf ccontrol_*.orig.tar.bz2 rm *.tar.bz2 # Remove unwanted files: rm -rf ccontrol-*/debian rm -rf ccontrol-*/.hg* mv ccontrol-*/ "ccontrol-$version.orig" tar -czf "$pwd/ccontrol_$version.orig.tar.gz" ccontrol-*.orig/ set +x cd .. rm -rf "$tmpdir" # vim:ts=4 sw=4 et debian/NEWS0000644000000000000000000000111611660033507007665 0ustar 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 Wed, 05 Dec 2007 11:50:13 +0000 debian/pycompat0000644000000000000000000000000211660033507010736 0ustar 2 debian/source/0000755000000000000000000000000011660034610010463 5ustar debian/source/format0000644000000000000000000000001411660034610011671 0ustar 3.0 (quilt) debian/rules0000755000000000000000000000617711663760763010300 0ustar #!/usr/bin/make -f DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl XP = xsltproc XPFLAGS = --nonet VERSION = 1.0 UPSTREAM_TGZ = http://ccontrol.ozlabs.org/releases/ccontrol-$(VERSION).tar.bz2 CFLAGS = -Wall \ $(shell dpkg-buildflags --get CFLAGS) \ $(shell dpkg-buildflags --get CPPFLAGS) \ $(shell dpkg-buildflags --get LDFLAGS) # build, build-arch, build-indep targets # ====================================== CONFIGURE_ARGS += --disable-dietlibc configure: config.status: configure dh_testdir CFLAGS="$(CFLAGS)" ./configure \ --bindir=/usr/bin \ --libdir=/usr/lib/ccontrol \ --datadir=/usr/share/ccontrol \ --mandir=/usr/share/man \ $(CONFIGURE_ARGS) .PHONY: build-indep build-indep: ; .PHONY: build-arch build-arch: build-stamp build-stamp: config.status gui/gccontrol.1 dh_testdir $(MAKE) touch build-stamp .PHONY: build build: build-arch build-indep # clean target # ============ .PHONY: clean clean: config.status dh_testdir dh_testroot rm -f build-stamp $(MAKE) distclean rm -f gui/gccontrol.1 set -e; for f in $$(find . -name '*.in'); do \ rm -f $$(echo $$f | sed 's/\.in$$//'); \ done set -e; for f in $$(find . -name '*.gperf'); do \ rm -f $$(echo $$f | sed 's/\.gperf$$/.c/'); \ done dh_clean # binary, binary-arch, binary-indep # ================================= .PHONY: install install: build dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) install prefix=$(CURDIR)/debian/ccontrol cp $(CURDIR)/gui/gccontrol.1 $(CURDIR)/debian/ccontrol/usr/share/man/man1 # Massive compiler linkage copied almost verbatim from ccache packaging, # Copyright 2002 Paul Russell 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 4.4 4.5 4.6; 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 .PHONY: binary-indep binary-indep: ; .PHONY: binary-arch 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_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb gui/gccontrol.1: debian/gccontrol.1.xml dh_testdir $(XP) -o $@ $(XPFLAGS) $(DB2MAN) $< .PHONY: binary binary: binary-indep binary-arch # get-orig-source target # ====================== here = $(dir $(firstword $(MAKEFILE_LIST)))/.. upstream_version = $(shell cd $(here) && dpkg-parsechangelog | sed -n -r -e '/^Version: ([0-9.]+).*/ { s//\1/; p; q; }') .PHONY: get-orig-source get-orig-source: sh $(here)/debian/get-orig-source.sh $(upstream_version)