]> andersk Git - config-package-dev.git/blobdiff - config-package.mk
Improve config-package-dev documentation and examples.
[config-package-dev.git] / config-package.mk
index 55d8cd457fcd4081850d34442c7663041dee4a44..2f6711266719ec88c1690aea66539e6333e4926b 100644 (file)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 # 02111-1307 USA.
 
+#   /usr/share/cdbs/1/rules/config-package.mk is the externally-facing
+# makefile fragment for config-package-dev.  It should be included
+# after the following variables are set in debian/rules.
+#
+#
+# Most variables are lists, so one can 
+#
+# DEB_DIVERT_FILES_package += /path1/file1.divert \
+#                            /path2/file2.divert \
+#                            /path3/file3.divert
+#
+# We use += in the examples 
+#
+# The config-package-dev system supports the following variables:
+#
+# DEB_DIVERT_EXTENSION
+#
+#   Extension used for all config-package-dev diversions (defaults to
+# .divert, which we will use in examples).  This field is difficult to
+# change on package upgrades; we recommend picking a value to use for
+# all packages at your site.
+#
+# DEB_DIVERT_FILES_package += /path/file.divert
+#
+#   List of absolute paths to files to be replaced at package install
+# time by being diverted from /path/file to /path/file.divert-orig
+# (DEB_DIVERT_EXTENSION should be part of the path, but need not
+# appear at the end); a symlink /path/file -> /path/file.divert will
+# be installed in its place.  The user is responsible for installing
+# /path/file.divert.  This is best for diverting binaries and most
+# configuration files.
+#
+# DEB_TRANSFORM_FILES_package += /path/file.divert
+#
+#   This works like DEB_DIVERT_FILES, but additionally the file to be
+# installed to /path/file.divert will be generated at package build
+# time as the standard output from
+#
+# $(DEB_TRANSFORM_SCRIPT_path/file.divert) < $(DEB_CHECK_FILES_SOURCE_/path/file.divert)
+#
+# These variables have the following defaults:
+#
+#   DEB_TRANSFORM_SCRIPT_path/file.divert = debian/transform_file.divert
+#   DEB_CHECK_FILES_SOURCE_/path/file.divert = path/file
+#
+#   If DEB_CHECK_FILES_SOURCE_/path/file.divert does not match the
+# md5sums shipped with the package containing it, the package build
+# will abort.  DEB_TRANSFORM_FILES is targeted at making changes to a
+# (potentially long) configuration file that will work on several
+# Debian versions.  We recommend using DEB_TRANSFORM_FILES in
+# conjunction with pbuilder, sbuild, or another tool for building
+# Debian packages in a clean environment.
+#
+# DEB_REMOVE_FILES_package += /path/file
+#
+#   List of absolute paths to files to be diverted to a unique path in
+# /usr/share/package/.  No symlink or replacement file will be
+# installed.  This system is useful for disabling files in /etc/cron.d
+# or similar .d directories where the normal divert-and-symlink
+# approach would result in (e.g.)  the old cron job still being run,
+# and any new cron job being run twice.  Note that for technical
+# reasons related to how dpkg unpacks files, you cannot also install a
+# replacement file to /etc/cron.d/file; you must install it to some
+# other path (which should be fine in a .d directory).  If you want to
+# install a replacement file with the same name, you probably want
+# DEB_DIVERT_FILES.
+#
+# DEB_UNDIVERT_FILES_package += /path/file.divert
+# DEB_UNDIVERT_VERSION_/path/file.divert = 1.0-1
+#
+#   List of absolute paths to files whose diversions caused by
+# DEB_DIVERT_FILES are to be removed upon installing this package.
+# This is primarily useful for removing a now-unecessary diversion
+# provided by a previous version of this package on an upgrade.
+#
+#   The DEB_UNDIVERT_VERSION_file variable should be set to the
+# version number of this package at which you added
+# DEB_UNDIVERT_FILES_path/file.divert; it is used to avoid attempting
+# to remove the diversions again on future upgrades.
+#
+# DEB_UNREMOVE_FILES_package += /path/file
+# DEB_UNREMOVE_VERSION_/path/file = 1.0-1
+#
+#   This works like DEB_UNDIVERT_FILES_package, except that it only
+# removes the diversion (not a symlink) and the version number is
+# specified with DEB_UNREMOVE_VERSION_/path/file.
+
 ifndef _cdbs_rules_config_package
 _cdbs_rules_config_package = 1
 
+# transform-files.mk includes the other config-package-dev fragments.
 include /usr/share/cdbs/1/rules/transform-files.mk
 
 endif
This page took 0.498792 seconds and 4 git commands to generate.