--- /dev/null
+# -*- mode: makefile; coding: utf-8 -*-
+# Copyright © 2007-2008 Anders Kaseorg <andersk@mit.edu> and
+# Tim Abbott <tabbott@mit.edu>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+ifndef _cdbs_rules_config_package
+_cdbs_rules_config_package = 1
+
+include /usr/share/cdbs/1/rules/transform-files.mk
+
+endif
+config-package-dev (4.5) unstable; urgency=low
+
+ * Rename DEB_REPLACE_FILES to DEB_TRANSFORM_FILES
+ * Create new config-package.mk as the outward-facing makefile fragment.
+ * Replace DEB_{UNREMOVE,UNDIVERT}_FILES_VERSION_file with
+ DEB_$1_VERSION_file
+
+ -- Tim Abbott <tabbott@mit.edu> Mon, 21 Apr 2008 18:39:40 -0400
+
+config-package-dev (4.4.1) unstable; urgency=low
+
+ * Version bump, since 4.4~ << 4.4 causes build failures on Debathena.
+
+ -- Tim Abbott <tabbott@mit.edu> Mon, 21 Apr 2008 17:51:02 -0400
+
config-package-dev (4.4) unstable; urgency=low
* Add new DEB_REMOVE_FILES_$package variable designed for removing
divert.mk usr/share/cdbs/1/rules/
debconf-divert.mk usr/share/cdbs/1/rules/
check-files.mk usr/share/cdbs/1/rules/
-replace-files.mk usr/share/cdbs/1/rules/
+config-package.mk usr/share/cdbs/1/rules/
+transform-files.mk usr/share/cdbs/1/rules/
encode usr/share/config-package-dev/
divert.sh.in usr/share/config-package-dev/
debconf-hack.sh usr/share/config-package-dev/
ifndef _cdbs_rules_divert
_cdbs_rules_divert = 1
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), config-package-dev (>= 4.4)
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), config-package-dev (>= 4.5~)
DEB_DIVERT_SCRIPT = /usr/share/config-package-dev/divert.sh.in
DEB_DIVERT_PACKAGES += $(foreach package,$(DEB_ALL_PACKAGES), \
- $(if $(DEB_REPLACE_FILES_$(package)),$(package), \
+ $(if $(DEB_TRANSFORM_FILES_$(package)),$(package), \
$(if $(DEB_REMOVE_FILES_$(package)),$(package), \
$(if $(DEB_UNREMOVE_FILES_$(package)),$(package), \
$(if $(DEB_UNDIVERT_FILES_$(package)),$(package), \
divert_files_replace_name = $(shell echo $(1) | perl -pe 's/(.*)\Q$(DEB_DIVERT_EXTENSION)\E/$$1$(2)/')
debian-divert/%: package = $(subst debian-divert/,,$@)
-debian-divert/%: divert_files = $(DEB_DIVERT_FILES_$(package)) $(DEB_REPLACE_FILES_$(package))
+debian-divert/%: divert_files = $(DEB_DIVERT_FILES_$(package)) $(DEB_TRANSFORM_FILES_$(package))
debian-divert/%: divert_remove_files = $(DEB_REMOVE_FILES_$(package))
debian-divert/%: divert_undivert_files = $(DEB_UNDIVERT_FILES_$(package))
debian-divert/%: divert_unremove_files = $(DEB_UNREMOVE_FILES_$(package))
$(if $(divert_files_all), \
echo 'if [ "$$1" = "configure" ]; then'; \
$(foreach file,$(divert_undivert_files), \
- $(if $(DEB_UNDIVERT_FILES_VERSION_$(file)),,\
+ $(if $(DEB_UNDIVERT_VERSION_$(file)),,\
echo "ERROR! Missing undivert version for $(file)!">&2; exit 1;) \
echo -n " if [ -n \"\$$2\" ] && dpkg --compare-versions \"\$$2\" '<<' "; \
- echo "'$(DEB_UNDIVERT_FILES_VERSION_$(file))'; then"; \
+ echo "'$(DEB_UNDIVERT_VERSION_$(file))'; then"; \
echo " undivert_unlink $(call divert_files_replace_name,$(file), )"; \
echo " fi";) \
$(foreach file,$(divert_unremove_files), \
- $(if $(DEB_UNREMOVE_FILES_VERSION_$(file)),,\
+ $(if $(DEB_UNREMOVE_VERSION_$(file)),,\
echo "ERROR! Missing unremove version for $(file)!">&2; exit 1;) \
echo -n " if [ -n \"\$$2\" ] && dpkg --compare-versions \"\$$2\" '<<' "; \
- echo "'$(DEB_UNREMOVE_FILES_VERSION_$(file))'; then"; \
+ echo "'$(DEB_UNREMOVE_VERSION_$(file))'; then"; \
echo " undivert_unremove $(file)"; \
echo " fi";) \
$(foreach file,$(divert_files), \
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.
-ifndef _cdbs_rules_replace_files
-_cdbs_rules_replace_files = 1
+ifndef _cdbs_rules_transform_files
+_cdbs_rules_transform_files = 1
include /usr/share/cdbs/1/rules/check-files.mk
-DEB_REPLACE_FILES = $(foreach package,$(DEB_ALL_PACKAGES),$(DEB_REPLACE_FILES_$(package)))
+DEB_TRANSFORM_FILES = $(foreach package,$(DEB_ALL_PACKAGES),$(DEB_TRANSFORM_FILES_$(package)))
-DEB_REPLACE_FILES_DIR=debian/replace_file_copies
+DEB_TRANSFORM_FILES_DIR=debian/transform_file_copies
-debian_replace_files = $(patsubst %,$(DEB_REPLACE_FILES_DIR)%,$(1))
-undebian_replace_files = $(patsubst $(DEB_REPLACE_FILES_DIR)%,%,$(1))
+debian_transform_files = $(patsubst %,$(DEB_TRANSFORM_FILES_DIR)%,$(1))
+undebian_transform_files = $(patsubst $(DEB_TRANSFORM_FILES_DIR)%,%,$(1))
-common-build-indep:: $(foreach file,$(DEB_REPLACE_FILES),$(call debian_replace_files,$(file)))
+common-build-indep:: $(foreach file,$(DEB_TRANSFORM_FILES),$(call debian_transform_files,$(file)))
-$(call debian_replace_files,%): $(call debian_check_files,%)
+$(call debian_transform_files,%): $(call debian_check_files,%)
mkdir -p $(@D)
- $(if $(DEB_TRANSFORM_SCRIPT_$(call undebian_replace_files,$@)), \
- $(DEB_TRANSFORM_SCRIPT_$(call undebian_replace_files,$@)), \
- debian/transform_$(notdir $(call undebian_replace_files,$@))) < $< > $@
+ $(if $(DEB_TRANSFORM_SCRIPT_$(call undebian_transform_files,$@)), \
+ $(DEB_TRANSFORM_SCRIPT_$(call undebian_transform_files,$@)), \
+ debian/transform_$(notdir $(call undebian_transform_files,$@))) < $< > $@
$(patsubst %,binary-install/%,$(DEB_ALL_PACKAGES)) :: binary-install/%:
- $(foreach file,$(DEB_REPLACE_FILES_$(cdbs_curpkg)), \
+ $(foreach file,$(DEB_TRANSFORM_FILES_$(cdbs_curpkg)), \
install -d $(DEB_DESTDIR)/$(dir $(file)); \
- cp -a $(DEB_REPLACE_FILES_DIR)$(file) \
+ cp -a $(DEB_TRANSFORM_FILES_DIR)$(file) \
$(DEB_DESTDIR)/$(dir $(file));)
clean::
- $(foreach file,$(DEB_REPLACE_FILES),rm -f debian/$(notdir $(file)))
- rm -rf $(DEB_REPLACE_FILES_DIR)
+ $(foreach file,$(DEB_TRANSFORM_FILES),rm -f debian/$(notdir $(file)))
+ rm -rf $(DEB_TRANSFORM_FILES_DIR)
endif