55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
|
#!/usr/bin/make -f
|
||
|
#
|
||
|
version = 2.6.11
|
||
|
abiname = 1
|
||
|
ktver = 2
|
||
|
kbuildver = 2.6-3
|
||
|
#
|
||
|
# Generally nothing needs to be modified below this line
|
||
|
#
|
||
|
debver = $(version)-$(abiname)
|
||
|
debnum = -$(abiname)
|
||
|
appvan = --append_to_version $(debnum)
|
||
|
bpkg = kernel-build-$(debver)
|
||
|
kdir = kernel-source-$(version)
|
||
|
kbpkg = kernel-kbuild-$(kbuildver)
|
||
|
kpatch = /usr/src/kernel-patches/all/$(version)/apply/debian
|
||
|
DEBIAN_SRCTOP = $(CURDIR)/$(kdir)
|
||
|
DEBIAN_UPSTREAM_VERSION = $(version)
|
||
|
ifeq (,$(DEB_HOST_ARCH))
|
||
|
DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||
|
DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||
|
endif
|
||
|
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
|
||
|
CROSS = $(DEB_HOST_ARCH)-linux-
|
||
|
endif
|
||
|
karch = $(DEB_HOST_ARCH)
|
||
|
|
||
|
configs = $(notdir $(wildcard arch/$(karch)/config.*))
|
||
|
ifndef flavours
|
||
|
flavours = $(filter-out common, $(patsubst config.%,%,$(configs)))
|
||
|
endif
|
||
|
-include arch/$(karch)/Makefile.inc
|
||
|
|
||
|
unpack: unpack-stamp
|
||
|
unpack-stamp: debian/control $(kdir)
|
||
|
|
||
|
debian/control:
|
||
|
cat debian/control.in arch/$(karch)/control.in | \
|
||
|
sed -e 's/@karch@/$(karch)/g' \
|
||
|
-e 's/@version@/$(version)/g' \
|
||
|
-e 's/@karch_deps@/$(karch_deps)/g' \
|
||
|
-e 's/@ktver@/$(ktver)/g' \
|
||
|
-e 's/@abiname@/$(abiname)/g' \
|
||
|
-e 's/@kbuild_deps@/$(kbuild_deps)/g' > debian/control
|
||
|
|
||
|
$(kdir):
|
||
|
tar jxf /usr/src/kernel-source-$(version).tar.bz2
|
||
|
cd $(kdir) && $(kpatch) $(version)-$(ktver)
|
||
|
mkdir -p $(kdir)/debian
|
||
|
cp debian/changelog $(kdir)/debian
|
||
|
cp debian/control $(kdir)/debian
|
||
|
cp debian/copyright $(kdir)/debian
|
||
|
touch $(kdir)/debian/official
|
||
|
install post-install $(kdir)/debian
|