Merge tag 's390-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[linux-block.git] / scripts / package / deb-build-option
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0-only
3
4 # Set up CROSS_COMPILE if not defined yet
5 if [ "${CROSS_COMPILE+set}" != "set" -a "${DEB_HOST_ARCH}" != "${DEB_BUILD_ARCH}" ]; then
6         echo CROSS_COMPILE=${DEB_HOST_GNU_TYPE}-
7 fi
8
9 version=$(dpkg-parsechangelog -S Version)
10 debian_revision="${version##*-}"
11
12 if [ "${version}" != "${debian_revision}" ]; then
13         echo KBUILD_BUILD_VERSION=${debian_revision}
14 fi