#!/bin/sh # this script builds a linux-kbuild-2.6 package per instructions on # http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage # execute it with the first argument '-clean' to clean up the various # files generated by the build (but not the built package) and then exit # without -clean, arguments will be passed to 'dch' (i.e., put into the # changelog) set -ex VERSION=2.6.36 DEBIAN_VERSION=${VERSION}-1~experimental.1 CHANGELOG_MESSAGE=${VERSION} [ -e linux-${VERSION}.tar.bz2 ] cleanme="orig linux-kbuild-2.6 linux-kbuild-2.6-${VERSION}" if [ "$1" = -clean ]; then for f in $cleanme; do if [ -e "$f" ]; then rm -rf "$f"; fi done exit fi if [ $# -gt 0 ]; then CHANGELOG_MESSAGE=$* fi svn co svn://svn.debian.org/kernel/dists/trunk/linux-kbuild-2.6 cd linux-kbuild-2.6 dch -v ${DEBIAN_VERSION} ${CHANGELOG_MESSAGE} ./debian/bin/genorig.py ../linux-${VERSION}.tar.bz2 cd .. tar -xzf orig/linux-kbuild-2.6_${VERSION}.orig.tar.gz cd linux-kbuild-2.6-${VERSION} cp -a ../linux-kbuild-2.6/* ./ ./debian/bin/gencontrol.py make -f debian/rules clean dpkg-checkbuilddeps cp -av ../orig/linux-kbuild-2.6_${VERSION}.orig.tar.gz ../ dpkg-buildpackage -us -uc