#!/bin/sh
java.lang.NullPointerException # Copyright 2003 Wichert Akkerman <wichert@wiggy.net>
java.lang.NullPointerException # Simple script to generate a debian/ directory for a Linux kernel.
"${srctree}/scripts/package/gen-diff-patch" debian/patches/diff.patch if [ -s debian/patches/diff.patch ]; then
sed -i "
1iSubject: Add local diff
1iAuthor: ${maintainer}
1i " debian/patches/diff.patch
echo diff.patch >> debian/patches/series else
rm -f debian/patches/diff.patch
fi
}
rm -rf debian
mkdir debian
user=${KBUILD_BUILD_USER:-$(id -nu)}
name=${DEBFULLNAME:-${user}} if [ "${DEBEMAIL:+set}" ]; then
email=${DEBEMAIL} else
buildhost=${KBUILD_BUILD_HOST:-$(hostname -f 2>/dev/null || hostname)}
email="${user}@${buildhost}"
fi
maintainer="${name} <${email}>"
while [ $# -gt 0 ]; do case"$1" in
--need-source)
gen_source
shift
;;
*) break
;;
esac
done
# Some variables and settings used throughout the script if [ "${KDEB_PKGVERSION:+set}" ]; then
packageversion=$KDEB_PKGVERSION else
upstream_version=$("${srctree}/scripts/setlocalversion" --no-local "${srctree}" | sed 's/-\(rc[1-9]\)/~\1/')
debian_revision=$("${srctree}/scripts/build-version")
packageversion=${upstream_version}-${debian_revision}
fi
sourcename=${KDEB_SOURCENAME:-linux-upstream}
if [ "$ARCH" = "um" ] ; then
packagename=user-mode-linux else
packagename=linux-image
fi
debarch=
set_debarch
# Try to determine distribution if [ "${KDEB_CHANGELOG_DIST:+set}" ]; then
distribution=$KDEB_CHANGELOG_DIST # In some cases lsb_release returns the codename as n/a, which breaks dpkg-parsechangelog
elif distribution=$(lsb_release -cs 2>/dev/null) && [ -n "$distribution" ] && [ "$distribution" != "n/a" ]; then
: # nothing to do in thiscase else
distribution="unstable"
echo >&2 "Using default distribution of 'unstable' in the changelog"
echo >&2 "Install lsb-release or set \$KDEB_CHANGELOG_DIST explicitly"
fi
echo $debarch > debian/arch
host_gnu=$(dpkg-architecture -a "${debarch}" -q DEB_HOST_GNU_TYPE | sed 's/_/-/g')
Package: $packagename-${KERNELRELEASE}
Architecture: $debarch
Description: Linux kernel, version ${KERNELRELEASE} This package contains the Linux kernel, modules and corresponding other
files, version: ${KERNELRELEASE}.
EOF
if [ "${SRCARCH}" != um ]; then
cat <<EOF >> debian/control
Package: linux-libc-dev
Section: devel
Provides: linux-kernel-headers
Architecture: $debarch
Description: Linux support headers for userspace development This package provides userspaces headers from the Linux kernel. These headers
are used by the installed headers for GNU glibc and other system libraries.
Multi-Arch: same
EOF
if is_enabled CONFIG_MODULES; then
cat <<EOF >> debian/control
Package: linux-headers-${KERNELRELEASE}
Architecture: $debarch
Build-Profiles: <!pkg.${sourcename}.nokernelheaders>
Description: Linux kernel headers for ${KERNELRELEASE} on $debarch This package provides kernel header files for ${KERNELRELEASE} on $debarch
. This is useful for people who need to build external modules
EOF
fi
fi
if is_enabled CONFIG_DEBUG_INFO; then
cat <<EOF >> debian/control
Package: linux-image-${KERNELRELEASE}-dbg
Section: debug
Architecture: $debarch
Build-Profiles: <!pkg.${sourcename}.nokerneldbg>
Description: Linux kernel debugging symbols for ${KERNELRELEASE} This package will come in handy if you need to debug the kernel. It provides
all the necessary debug symbols for the kernel and its modules.
EOF
fi
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.