1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
#!/usr/bin/make -f
#
# debian/rules for kernel-image-*-alpha
#
# GNU copyright 1997 to 1999 by Joey Hess.
# Copyright (c) 1999-2001 Herbert Xu <herbert@debian.org>
# Copyright (c) 2000 Ben Collins <bcollins@debian.org>
#
SHELL := sh -e
Version := $(shell \
head -1 debian/changelog | \
sed 's/^kernel-image-\(.*\)-alpha.*$$/\1/' \
)
Subarches := $(shell find config -maxdepth 1 -type f -printf '%f\n')
unpack: unpack-stamp
unpack-stamp:
tar jxf /usr/src/kernel-source-$(Version).tar.bz2
mkdir -p kernel-source-$(Version)/debian
cp debian/changelog kernel-source-$(Version)/debian
cp debian/control kernel-source-$(Version)/debian
> kernel-source-$(Version)/debian/official
for i in $(Subarches); do \
cp -al kernel-source-$(Version) build-$$i; \
cp config/$$i build-$$i/.config; \
done
touch unpack-stamp
build: build-stamp
build-stamp: unpack-stamp
for i in $(Subarches); do \
cd build-$$i; \
make-kpkg build --subarch $$i --arch_in_name build; \
cd ..; \
done
touch build-stamp
clean:
rm -f unpack-stamp build-stamp install-stamp
rm -rf kernel-source-$(Version) build-*
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_clean -k
dh_installdirs
touch install-stamp
# Build architecture-independent files here.
binary-indep:
# Build architecture-dependent files here.
binary-arch: build
cd build-generic; \
make-kpkg kernel-headers
mv build-generic/debian/files debian
for i in $(Subarches); do \
cd build-$$i; \
make-kpkg --subarch $$i kernel-image --arch_in_name; \
cd ..; \
cat build-$$i/debian/files >> debian/files; \
done
mv *.deb ..
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install unpack
|