generate debian/control completely from debian/templates, instead of using
arch/*/control.in. We can add overrides for individual things later on (i'm thinking specifically of descriptions, here). svn path=/trunk/kernel/source/linux-kernel-2.6.12/; revision=3458
This commit is contained in:
parent
7e7f0c97ca
commit
47109cf6eb
|
@ -218,18 +218,39 @@ binary: binary-indep binary-arch
|
||||||
# Makes the master debian/control file by substituting
|
# Makes the master debian/control file by substituting
|
||||||
# variable values into the template.
|
# variable values into the template.
|
||||||
#
|
#
|
||||||
|
archs := $(shell find debian/arch/ -mindepth 1 -maxdepth 1 -type d ! -name '.svn' -printf '%f\n')
|
||||||
debian/control: debian/templates/control.main.in
|
debian/control: debian/templates/control.main.in
|
||||||
cat debian/templates/control.source.in \
|
rm -f control.tmp 2>/dev/null
|
||||||
debian/templates/control.main.in \
|
substitute() { \
|
||||||
`find debian/arch -name control.in` | \
|
cat debian/templates/control.$$1 | \
|
||||||
sed -e 's/@version@/$(version)/g' \
|
sed -e 's/@version@/$(version)/g' \
|
||||||
-e 's/@major@/$(major)/g' \
|
-e 's/@major@/$(major)/g' \
|
||||||
-e 's/@ltver@/$(ltver)/g' \
|
-e "s/@arch@/$$2/g" \
|
||||||
-e 's/@srcver@/$(srcver)/g' \
|
-e 's/@subarch@//g' \
|
||||||
-e 's/@lt_depends@/$(lt_depends)/g' \
|
-e "s/@flavour@/$$3/g" \
|
||||||
-e 's/@lt_provides@/$(lt_provides)/g' \
|
-e 's/@ltver@/$(ltver)/g' \
|
||||||
-e 's/@abiname@/$(abiname)/g' | \
|
-e 's/@srcver@/$(srcver)/g' \
|
||||||
sed '/^[[:space:]]*$$/d' | \
|
-e 's/@lt_depends@/$(lt_depends)/g' \
|
||||||
sed 's/^Package:/\n&/g' > debian/control
|
-e 's/@lt_provides@/$(lt_provides)/g' \
|
||||||
|
-e 's/@abiname@/$(abiname)/g' | \
|
||||||
|
sed '/^[[:space:]]*$$/d' | \
|
||||||
|
sed 's/^Package:/\n&/g'; \
|
||||||
|
}; \
|
||||||
|
list_flavours() { \
|
||||||
|
find debian/arch/$$1/ -name 'config.*' \
|
||||||
|
! -name '*.svn*' -printf '%f\n' | \
|
||||||
|
sed 's/^config\.//'; \
|
||||||
|
}; \
|
||||||
|
substitute source.in "" "" >> control.tmp; \
|
||||||
|
substitute main.in "" "" >> control.tmp; \
|
||||||
|
substitute headers.in "" "" >> control.tmp; \
|
||||||
|
for a in $(archs); do \
|
||||||
|
substitute headers.arch.in $$a "" >> control.tmp; \
|
||||||
|
for f in $$(list_flavours $$a); do \
|
||||||
|
substitute headers.flavour.in $$a $$f >> control.tmp; \
|
||||||
|
substitute image.in $$a $$f >> control.tmp; \
|
||||||
|
done; \
|
||||||
|
done
|
||||||
|
mv control.tmp debian/control
|
||||||
|
|
||||||
.PHONY: clean build unpack binary-indep binary-arch binary patch unpatch source tree
|
.PHONY: clean build unpack binary-indep binary-arch binary patch unpatch source tree
|
||||||
|
|
Loading…
Reference in New Issue