[22923] | 1 | # -*- mode: makefile; coding: utf-8 -*- |
---|
| 2 | # Copyright © 2007-2008 Anders Kaseorg <andersk@mit.edu> and |
---|
| 3 | # Tim Abbott <tabbott@mit.edu> |
---|
| 4 | # |
---|
| 5 | # This program is free software; you can redistribute it and/or |
---|
| 6 | # modify it under the terms of the GNU General Public License as |
---|
| 7 | # published by the Free Software Foundation; either version 2, or (at |
---|
| 8 | # your option) any later version. |
---|
| 9 | # |
---|
| 10 | # This program is distributed in the hope that it will be useful, but |
---|
| 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 13 | # General Public License for more details. |
---|
| 14 | # |
---|
| 15 | # You should have received a copy of the GNU General Public License |
---|
| 16 | # along with this program; if not, write to the Free Software |
---|
| 17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
---|
| 18 | # 02111-1307 USA. |
---|
| 19 | |
---|
[23076] | 20 | # /usr/share/cdbs/1/rules/config-package.mk is the externally-facing |
---|
| 21 | # makefile fragment for config-package-dev. It should be included |
---|
| 22 | # after the following variables are set in debian/rules. |
---|
| 23 | # |
---|
| 24 | # |
---|
| 25 | # Most variables are lists, so one can |
---|
| 26 | # |
---|
[25844] | 27 | # DEB_DISPLACE_FILES_package += /path1/file1.divert \ |
---|
| 28 | # /path2/file2.divert \ |
---|
| 29 | # /path3/file3.divert |
---|
[23076] | 30 | # |
---|
| 31 | # We use += in the examples |
---|
| 32 | # |
---|
| 33 | # The config-package-dev system supports the following variables: |
---|
| 34 | # |
---|
[25844] | 35 | # DEB_DISPLACE_EXTENSION |
---|
[23076] | 36 | # |
---|
| 37 | # Extension used for all config-package-dev diversions (defaults to |
---|
| 38 | # .divert, which we will use in examples). This field is difficult to |
---|
| 39 | # change on package upgrades; we recommend picking a value to use for |
---|
| 40 | # all packages at your site. |
---|
| 41 | # |
---|
[25844] | 42 | # DEB_DISPLACE_FILES_package += /path/file.divert |
---|
[23076] | 43 | # |
---|
| 44 | # List of absolute paths to files to be replaced at package install |
---|
| 45 | # time by being diverted from /path/file to /path/file.divert-orig |
---|
[25844] | 46 | # (DEB_DISPLACE_EXTENSION should be part of the path, but need not |
---|
[23076] | 47 | # appear at the end); a symlink /path/file -> /path/file.divert will |
---|
| 48 | # be installed in its place. The user is responsible for installing |
---|
| 49 | # /path/file.divert. This is best for diverting binaries and most |
---|
| 50 | # configuration files. |
---|
| 51 | # |
---|
| 52 | # DEB_TRANSFORM_FILES_package += /path/file.divert |
---|
| 53 | # |
---|
[25844] | 54 | # This works like DEB_DISPLACE_FILES, but additionally the file to be |
---|
[23076] | 55 | # installed to /path/file.divert will be generated at package build |
---|
| 56 | # time as the standard output from |
---|
| 57 | # |
---|
| 58 | # $(DEB_TRANSFORM_SCRIPT_path/file.divert) < $(DEB_CHECK_FILES_SOURCE_/path/file.divert) |
---|
| 59 | # |
---|
| 60 | # These variables have the following defaults: |
---|
| 61 | # |
---|
| 62 | # DEB_TRANSFORM_SCRIPT_path/file.divert = debian/transform_file.divert |
---|
[25800] | 63 | # DEB_CHECK_FILES_SOURCE_/path/file.divert = /path/file |
---|
[23076] | 64 | # |
---|
| 65 | # If DEB_CHECK_FILES_SOURCE_/path/file.divert does not match the |
---|
| 66 | # md5sums shipped with the package containing it, the package build |
---|
| 67 | # will abort. DEB_TRANSFORM_FILES is targeted at making changes to a |
---|
| 68 | # (potentially long) configuration file that will work on several |
---|
| 69 | # Debian versions. We recommend using DEB_TRANSFORM_FILES in |
---|
| 70 | # conjunction with pbuilder, sbuild, or another tool for building |
---|
[25800] | 71 | # Debian packages in a clean environment. (That said, if /path/file is |
---|
| 72 | # diverted on the running system, DEB_CHECK_FILES_SOURCE does |
---|
| 73 | # reverse-resolve the diversion and default to the original version of |
---|
| 74 | # the file, to allow you to rebuild a package using DEB_TRANSFORM_FILES |
---|
| 75 | # that is currently installed, in most cases.) |
---|
[23076] | 76 | # |
---|
[25844] | 77 | # DEB_HIDE_FILES_package += /path/file |
---|
[23076] | 78 | # |
---|
| 79 | # List of absolute paths to files to be diverted to a unique path in |
---|
| 80 | # /usr/share/package/. No symlink or replacement file will be |
---|
| 81 | # installed. This system is useful for disabling files in /etc/cron.d |
---|
| 82 | # or similar .d directories where the normal divert-and-symlink |
---|
| 83 | # approach would result in (e.g.) the old cron job still being run, |
---|
| 84 | # and any new cron job being run twice. Note that for technical |
---|
| 85 | # reasons related to how dpkg unpacks files, you cannot also install a |
---|
| 86 | # replacement file to /etc/cron.d/file; you must install it to some |
---|
| 87 | # other path (which should be fine in a .d directory). If you want to |
---|
| 88 | # install a replacement file with the same name, you probably want |
---|
[25844] | 89 | # DEB_DISPLACE_FILES. |
---|
[23076] | 90 | # |
---|
[25844] | 91 | # DEB_UNDISPLACE_FILES_package += /path/file.divert |
---|
[23076] | 92 | # |
---|
| 93 | # List of absolute paths to files whose diversions caused by |
---|
[25844] | 94 | # DEB_DISPLACE_FILES are to be removed upon installing this package, if |
---|
[24906] | 95 | # the diversions have been made on the target system. This is |
---|
[25844] | 96 | # primarily useful for removing a now-unnecessary displacement provided by |
---|
[24906] | 97 | # a previous version of this package on an upgrade. |
---|
[23076] | 98 | # |
---|
[25844] | 99 | # DEB_UNHIDE_FILES_package += /path/file |
---|
[23076] | 100 | # |
---|
[25844] | 101 | # This works like DEB_UNDISPLACE_FILES_package, except that it undoes |
---|
| 102 | # the work of a previous DEB_HIDE_FILES. In particular, it only removes |
---|
| 103 | # the diversion, whereas DEB_UNDISPLACE_FILES first removes the symlink |
---|
| 104 | # generated by DEB_DISPLACE_FILES. |
---|
[23076] | 105 | |
---|
[22923] | 106 | ifndef _cdbs_rules_config_package |
---|
| 107 | _cdbs_rules_config_package = 1 |
---|
| 108 | |
---|
[23076] | 109 | # transform-files.mk includes the other config-package-dev fragments. |
---|
[22923] | 110 | include /usr/share/cdbs/1/rules/transform-files.mk |
---|
| 111 | |
---|
| 112 | endif |
---|