|
@@ -5,46 +5,54 @@ set -e
|
|
|
version="1.10.10"; # This line modified by Makefile
|
|
|
|
|
|
progname="`basename \"$0\"`"
|
|
|
-usageversion () {
|
|
|
- cat >&2 <<END
|
|
|
-Debian dpkg-buildpackage $version.
|
|
|
+
|
|
|
+showversion () {
|
|
|
+ echo "Debian $progname version $version."
|
|
|
+
|
|
|
+ echo "
|
|
|
Copyright (C) 1996 Ian Jackson.
|
|
|
Copyright (C) 2000 Wichert Akkerman
|
|
|
-This is free software; see the GNU General Public Licence version 2
|
|
|
-or later for copying conditions. There is NO warranty.
|
|
|
+This is free software; see the GNU General Public Licence version 2 or
|
|
|
+later for copying conditions. There is NO warranty."
|
|
|
+}
|
|
|
+
|
|
|
+usage () {
|
|
|
+ cat <<END
|
|
|
+Usage: $progname [<options> ...]
|
|
|
|
|
|
-Usage: dpkg-buildpackage [options]
|
|
|
-Options: -r<gain-root-command>
|
|
|
- -p<sign-command>
|
|
|
- -d do not check build dependencies and conflicts
|
|
|
- -D check build dependencies and conflicts
|
|
|
- -k<keyid> the key to use for signing
|
|
|
- -sgpg the sign-command is called like GPG
|
|
|
- -spgp the sign-command is called like PGP
|
|
|
- -us unsigned source
|
|
|
- -uc unsigned changes
|
|
|
- -a<arch> Debian architecture we build for (implies -d)
|
|
|
- -b binary-only, do not build source } also passed to
|
|
|
- -B binary-only, no arch-indep files } dpkg-genchanges
|
|
|
- -S source only, no binary files }
|
|
|
- -t<system> set GNU system type } passed to dpkg-architecture
|
|
|
- -v<version> changes since version <version> }
|
|
|
- -m<maint> maintainer for package is <maint> }
|
|
|
- -e<maint> maintainer for release is <maint> } only passed
|
|
|
- -C<descfile> changes are described in <descfile> } to dpkg-
|
|
|
- -si (default) src includes orig for rev. 0 or 1 } genchanges
|
|
|
- -sa uploaded src always includes orig }
|
|
|
- -sd uploaded src is diff and .dsc only }
|
|
|
- -sn force Debian native source format } only passed
|
|
|
- -s[sAkurKUR] see dpkg-source for explanation } to dpkg-source
|
|
|
- -nc do not clean source tree (implies -b)
|
|
|
- -tc clean source tree when finished
|
|
|
- -ap add pause before starting signature process
|
|
|
- -h print this message
|
|
|
- -W Turn certain errors into warnings. } passed to
|
|
|
- -E When -W is turned on, -E turned it off. } dpkg-source
|
|
|
- -i[<regex>] ignore diffs of files matching regex } only passed
|
|
|
- -I<filename> filter out files when building tarballs } to dpkg-source
|
|
|
+Options:
|
|
|
+ -r<gain-root-command>
|
|
|
+ -p<sign-command>
|
|
|
+ -d do not check build dependencies and conflicts.
|
|
|
+ -D check build dependencies and conflicts.
|
|
|
+ -k<keyid> the key to use for signing.
|
|
|
+ -sgpg the sign-command is called like GPG.
|
|
|
+ -spgp the sign-command is called like PGP.
|
|
|
+ -us unsigned source.
|
|
|
+ -uc unsigned changes.
|
|
|
+ -a<arch> Debian architecture we build for (implies -d).
|
|
|
+ -b binary-only, do not build source. } also passed to
|
|
|
+ -B binary-only, no arch-indep files. } dpkg-genchanges
|
|
|
+ -S source only, no binary files. }
|
|
|
+ -t<system> set GNU system type. } passed to dpkg-architecture
|
|
|
+ -v<version> changes since version <version>. }
|
|
|
+ -m<maint> maintainer for package is <maint>. }
|
|
|
+ -e<maint> maintainer for release is <maint>. } only passed
|
|
|
+ -C<descfile> changes are described in <descfile>. } to dpkg-genchangs
|
|
|
+ -si (default) src includes orig for rev. 0 or 1. }
|
|
|
+ -sa uploaded src always includes orig. }
|
|
|
+ -sd uploaded src is diff and .dsc only. }
|
|
|
+ -sn force Debian native source format. } only passed
|
|
|
+ -s[sAkurKUR] see dpkg-source for explanation. } to dpkg-source
|
|
|
+ -nc do not clean source tree (implies -b).
|
|
|
+ -tc clean source tree when finished.
|
|
|
+ -ap add pause before starting signature process.
|
|
|
+ -W turn certain errors into warnings. } passed to
|
|
|
+ -E when -W is turned on, -E turned it off. } dpkg-source
|
|
|
+ -i[<regex>] ignore diffs of files matching regex. } only passed
|
|
|
+ -I<filename> filter out files when building tarballs. } to dpkg-source
|
|
|
+ -h, --help show this help message.
|
|
|
+ --version show the version.
|
|
|
END
|
|
|
}
|
|
|
|
|
@@ -64,7 +72,7 @@ checkbuilddep=true
|
|
|
checkbuilddep_args=''
|
|
|
binarytarget=binary
|
|
|
sourcestyle=''
|
|
|
-version=''
|
|
|
+changesversion=''
|
|
|
since=''
|
|
|
maint=''
|
|
|
desc=''
|
|
@@ -77,7 +85,10 @@ while [ $# != 0 ]
|
|
|
do
|
|
|
value="`echo x\"$1\" | sed -e 's/^x-.//'`"
|
|
|
case "$1" in
|
|
|
- -h) usageversion; exit 0 ;;
|
|
|
+ -h|--help)
|
|
|
+ usage; exit 0 ;;
|
|
|
+ --version)
|
|
|
+ showversion; exit 0 ;;
|
|
|
-r*) rootcommand="$value" ;;
|
|
|
-p*) signcommand="$value" ;;
|
|
|
-k*) signkey="$value" ;;
|
|
@@ -111,7 +122,7 @@ do
|
|
|
-W) warnable_error=1; passopts="$passopts -W";;
|
|
|
-E) warnable_error=0; passopts="$passopts -E";;
|
|
|
*) echo >&2 "$progname: unknown option or argument $1"
|
|
|
- usageversion; exit 2 ;;
|
|
|
+ usage; exit 2 ;;
|
|
|
esac
|
|
|
shift
|
|
|
done
|
|
@@ -145,7 +156,7 @@ mustsetvar () {
|
|
|
curd="`pwd`"
|
|
|
dirn="`basename \"$curd\"`"
|
|
|
mustsetvar package "`dpkg-parsechangelog | sed -n 's/^Source: //p'`" "source package is"
|
|
|
-mustsetvar version "`dpkg-parsechangelog | sed -n 's/^Version: //p'`" "source version is"
|
|
|
+mustsetvar changesversion "`dpkg-parsechangelog | sed -n 's/^Version: //p'`" "source version is"
|
|
|
if [ -n "$changedby" ]; then maintainer="$changedby";
|
|
|
elif [ -n "$maint" ]; then maintainer="$maint";
|
|
|
else mustsetvar maintainer "`dpkg-parsechangelog | sed -n 's/^Maintainer: //p'`" "source changed by"; fi
|
|
@@ -156,7 +167,7 @@ if [ x$sourceonly = x ]; then
|
|
|
else
|
|
|
arch=source
|
|
|
fi
|
|
|
-mustsetvar sversion "`echo \"$version\" | perl -pe 's/^\d+://'`" "source version without epoch"
|
|
|
+mustsetvar sversion "`echo \"$changesversion\" | perl -pe 's/^\d+://'`" "source version without epoch"
|
|
|
pv="${package}_${sversion}"
|
|
|
pva="${package}_${sversion}_${arch}"
|
|
|
|