From: Konrad Rosenbaum Date: Mon, 23 Apr 2012 14:22:13 +0000 (+0200) Subject: correct debian and install routines X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=d30feea1b03ee9e10fee52191e58822630dcac06;p=konrad%2Fip6calc.git correct debian and install routines --- diff --git a/.gitignore b/.gitignore index 323c57f..dc7256d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,8 @@ *.o ip6calc help.h +debian/changelog +.config.make +debian/files +debian/ip6calc.debhelper.log +debian/ip6calc.substvars diff --git a/Makefile b/Makefile index dbb50b5..d17a985 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,9 @@ distclean: clean include .config.make install: + $(INSTALL) -d $(DESTDIR)$(BINDIR) $(INSTALL) -t $(DESTDIR)$(BINDIR) -s ip6calc $(INSTALL) -t $(DESTDIR)$(BINDIR) ip4toip6 + $(INSTALL) -d $(DESTDIR)$(DOCDIR) $(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR) help.txt $(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR) README diff --git a/configure b/configure index df0cb45..01884a5 100755 --- a/configure +++ b/configure @@ -7,7 +7,7 @@ mandir=/share/man prefix=/usr/local docdir=/share/doc/ip6calc -TEMP=$(getopt -l prefix: -l mandir: -l bindir: -- "" "$@") +TEMP=$(getopt -l prefix: -l mandir: -l bindir: -- "" "$@" 2>/dev/null ) eval set -- "$TEMP" while true ; do diff --git a/debian/control b/debian/control index be2a1fb..dff40c5 100644 --- a/debian/control +++ b/debian/control @@ -1,8 +1,8 @@ Source: ip6calc Section: unknown Priority: extra -Maintainer: Konrad Rosenbaum -Build-Depends: debhelper (>= 7.0.50~) +Maintainer: Konrad Rosenbaum +Build-Depends: debhelper (>= 7.0.50~), git2cl, git Standards-Version: 3.8.4 Homepage: http://silmor.de/ipv6.calc.php Vcs-Git: git://git.silmor.de/konrad/ip6calc.git diff --git a/debian/gencl b/debian/gencl new file mode 100755 index 0000000..5f2e197 --- /dev/null +++ b/debian/gencl @@ -0,0 +1,46 @@ +#!/bin/sh + +cl=debian/changelog + +test -x "`which git`" || { + echo 'Warning: cannot find git - do you have package git installed?' 2>&1 + test -f $cl && { + echo cannot find svn, but $cl exists - accepting it + } || { + echo 'Error: cannot find git and' $cl 'does not exist - cannot proceed.' 1>&2 + exit 1 + } +} +test -d .git || { + echo 'Warning: this is not a GIT checkout, building in non-dev mode...' 2>&1 + test -f $cl && { + echo 'Info:' $cl 'does exist, accepting it for now' + } || { + echo 'Error:' $cl 'does not exist, cannot proceed.' 2>&1 + exit 1 + } +} + +echo Generating $cl ... + +REV=`git log -1 --date=short --pretty=format:%ad-%h` + +if test `git status --short -uno |wc -l` -gt 0 ; then + REV="$REV-modified1" +fi + +echo "ip6calc ($REV) unstable; urgency=low" >$cl +echo >>$cl +echo " Package Generated by" `whoami`@`hostname -f` `date -R`>>$cl +echo >>$cl +test -x "`which git2cl`" && { + git2cl | sed 's/^/ /' | sed 's/\t/ /' >>$cl +} || { + echo 'Warning: cannot find git2cl - do you have it installed?' 2>&1 + echo 'Warning:' $cl 'will have an empty body, this may not be what you wanted.' 2>&1 + echo ' ' `date +%Y-%m-%d` `whoami` >>$cl + echo ' * built package without git log info available, sorry.' >>$cl +} +echo >>$cl +echo -n ' -- Konrad Rosenbaum ' >>$cl +date -R >>$cl diff --git a/debian/rules b/debian/rules index b760bee..8be5096 100755 --- a/debian/rules +++ b/debian/rules @@ -11,3 +11,7 @@ %: dh $@ + +binary: + debian/gencl + dh binary