Index: debian/rules =================================================================== --- debian/rules (.../anbe-278-new-orig-tar-gz) (revision 2233) +++ debian/rules (.../anbe-280-legacy-support-1) (revision 2233) @@ -7,6 +7,7 @@ include debian/rules.defs version = $(NVIDIA_RELEASE) +legacy = $(NVIDIA_LEGACY) url_x86 = $(NVIDIA_URL_X86) url_x86_64 = $(NVIDIA_URL_X86_64) filename_x86 = $(NVIDIA_FILENAME_X86) @@ -15,7 +16,9 @@ dirname_x86_64 = $(NVIDIA_DIRNAME_X86_64) TEMPLATES := $(wildcard debian/*.in) +LEGACYTEMPLATES := $(wildcard debian/*-LEGACY*) AUTOGEN += $(patsubst %.in,%,$(TEMPLATES)) +AUTOGEN += $(subst -LEGACY,$(legacy),$(LEGACYTEMPLATES)) AUTOGEN += debian/libcuda1-ia32.symbols AUTOGEN += debian/nvidia-libvdpau1-ia32.symbols AUTOGEN += debian/module/debian/control.template @@ -106,7 +109,8 @@ dh_bugfiles -A override_dh_gencontrol: - dh_gencontrol -- -V'nvidia:Version=$(version)' + dh_gencontrol -- -V'nvidia:Version=$(version)' -V'nvidia:Legacy=$(legacy)' \ + -V'nvidia:LegacyDesc=$(if $(legacy), ($(subst -legacy-,,$(legacy)) legacy version))' # Do not run dh_strip here. The NVIDIA license says: # @@ -124,13 +128,24 @@ # Generating control files -%: %.in debian/rules.defs +define substitute_placeholders perl -p \ -e 's{#VERSION#}{$(version)}g;' \ + -e 's{#LEGACY#}{$(legacy)}g;' \ -e 's{#URL_X86#}{$(url_x86)}g;' \ -e 's{#URL_X86_64#}{$(url_x86_64)}g;' \ < $< > $@ +endef +nvidia-glx$(legacy)%: nvidia-glx-LEGACY% debian/rules.defs + $(substitute_placeholders) + +nvidia-kernel$(legacy)%: nvidia-kernel-LEGACY% debian/rules.defs + $(substitute_placeholders) + +%: %.in debian/rules.defs + $(substitute_placeholders) + debian/module/debian/changelog: debian/changelog sed 's/^nvidia-graphics-drivers/nvidia-kernel/g' $< > $@ Index: debian/rules.defs =================================================================== --- debian/rules.defs (.../anbe-278-new-orig-tar-gz) (revision 2233) +++ debian/rules.defs (.../anbe-280-legacy-support-1) (revision 2233) @@ -1,5 +1,6 @@ NVIDIA_RELEASE = 190.53 +NVIDIA_LEGACY = NVIDIA_DIRNAME_X86 = NVIDIA-Linux-x86-${NVIDIA_RELEASE}-pkg0 NVIDIA_DIRNAME_X86_64 = NVIDIA-Linux-x86_64-${NVIDIA_RELEASE}-pkg2 Index: debian/changelog =================================================================== --- debian/changelog (.../anbe-278-new-orig-tar-gz) (revision 2233) +++ debian/changelog (.../anbe-280-legacy-support-1) (revision 2233) @@ -110,6 +110,10 @@ * debian/rules, debian/README.source: add new target get-orig-source and simplify instructions for tarball creation: uscan --report && dch -v && debian/rules get-orig-source + * debian/rules.defs, debian/rules: add variable/placeholder LEGACY + and new subst vars nvidia:Legacy and nvidia:LegacyDesc + * debian/rules: add support for control file templates with the LEGACY + placeholder in their name -- Russ Allbery Sat, 24 Apr 2010 20:35:20 -0700