summaryrefslogtreecommitdiffstats
path: root/scripts/dpkg-genbuilddeps.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:01:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:01:11 +0000
commit3be121a05dcd170854a8dac6437b29f297a6ff4e (patch)
tree05cf57183f5a23394eca11b00f97a74a5dfdf79d /scripts/dpkg-genbuilddeps.sh
parentInitial commit. (diff)
downloaddevscripts-3a98d889d2feba317256ec6900f4b56124c3ec28.tar.xz
devscripts-3a98d889d2feba317256ec6900f4b56124c3ec28.zip
Adding upstream version 2.23.4+deb12u1.upstream/2.23.4+deb12u1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/dpkg-genbuilddeps.sh')
-rwxr-xr-xscripts/dpkg-genbuilddeps.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/scripts/dpkg-genbuilddeps.sh b/scripts/dpkg-genbuilddeps.sh
new file mode 100755
index 0000000..5e50e26
--- /dev/null
+++ b/scripts/dpkg-genbuilddeps.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+set -e
+
+PROGNAME=${0##*/}
+
+if [ $# -gt 0 ]; then
+ case $1 in
+ -h|--help)
+ cat <<EOF
+Usage: $PROGNAME [options] [<arg> ...]
+Build package and generate build dependencies.
+All args are passed to dpkg-buildpackage.
+Options:
+ -h, --help This help
+ -v, --version Report version and exit
+EOF
+ exit 1
+ ;;
+ -v|--version)
+ echo "$PROGNAME wrapper for dpkg-depcheck:"
+ dpkg-depcheck --version
+ exit 1
+ ;;
+ esac
+fi
+
+if ! [ -x debian/rules ]; then
+ echo "$PROGNAME must be run in the source package directory" >&2
+ exit 1
+fi
+
+if ! dpkg -L build-essential > /dev/null 2>&1
+then
+ echo "You must have the build-essential package installed to use $PROGNAME" >&2
+ echo "You can try running the dpkg-depcheck program directly as:" >&2
+ echo "dpkg-depcheck --all dpkg-buildpackage -us -uc -b -rfakeroot $*" >&2
+ exit 1
+fi
+
+echo "Warning: if this program hangs, kill it and read the manpage!" >&2
+dpkg-depcheck -b dpkg-buildpackage -us -uc -b "$@"