r3469 - trunk/kernel/source/linux-kernel-2.6.12/debian
Andres Salomon
dilinger@costa.debian.org
Tue, 12 Jul 2005 08:57:24 +0000
Author: dilinger
Date: 2005-07-12 08:57:24 +0000 (Tue, 12 Jul 2005)
New Revision: 3469
Modified:
trunk/kernel/source/linux-kernel-2.6.12/debian/Makefile
Log:
commit this horribly untested code that generates debian/control from
templates/control.*.in for generated images. Will start a test build now
and see whether it actually worked after lunch :)
Modified: trunk/kernel/source/linux-kernel-2.6.12/debian/Makefile
===================================================================
--- trunk/kernel/source/linux-kernel-2.6.12/debian/Makefile 2005-07-12 08:36:08 UTC (rev 3468)
+++ trunk/kernel/source/linux-kernel-2.6.12/debian/Makefile 2005-07-12 08:57:24 UTC (rev 3469)
@@ -186,20 +186,38 @@
patches += $(wildcard patches-arch/$(karch).*)
patches += $(wildcard patches-arch/$(karch)_*)
patches := $(strip $(patches))
+# substitute() and friends is duplicated in debian/rules; this should
+# be cleaned up in the long term. watch out for relative paths, as
+# debian/rules runs in the top level directory, while debian/Makefile
+# runs from the debian directory!
$(kdir): post-install-$(subarch) $(wildcard templates/control.*.in)
mkdir -p $(tkdir)
cp -al $(srcfiles) $(tkdir)
mkdir -p $(tkdir)/debian
cp changelog $(tkdir)/debian
cp copyright $(tkdir)/debian
- cat $(controls) | \
- sed -e 's/@version@/$(version)/g' \
- -e 's/@ltver@/$(ltver)/g' \
- -e 's/@major@/$(major)/g' \
- -e 's/@subarch@/$(append)/g' \
- -e 's/@abiname@/$(abiname)/g' | \
- sed '/^[[:space:]]*$$/d' | \
- sed 's/^Package:/\n&/g' > $(tkdir)/debian/control
+ substitute() { \
+ cat templates/control.$$1 | \
+ sed -e 's/@version@/$(version)/g' \
+ -e 's/@major@/$(major)/g' \
+ -e "s/@arch@/$(arch)/g" \
+ -e "s/@subarch@/$(subarch)/g" \
+ -e "s/@flavour@/$$2/g" \
+ -e 's/@ltver@/$(ltver)/g' \
+ -e 's/@srcver@/$(srcver)/g' \
+ -e 's/@lt_depends@/$(lt_depends)/g' \
+ -e 's/@lt_provides@/$(lt_provides)/g' \
+ -e 's/@abiname@/$(abiname)/g' | \
+ sed '/^[[:space:]]*$$/d' | \
+ sed 's/^Package:/\n&/g'; \
+ }; \
+ substitute source.in "" >> $(tkdir)/debian/control; \
+ substitute headers.in "" >> $(tkdir)/debian/control; \
+ substitute headers.arch.in "" >> $(tkdir)/debian/control; \
+ for f in $(flavours); do \
+ substitute headers.flavour.in $$f >> $(tkdir)/debian/control; \
+ substitute image.in $$f >> $(tkdir)/debian/control; \
+ done
touch $(tkdir)/debian/official
if [ -n '$(patches)' ]; then \
cd $(tkdir); \