5 dh_ucf - register configuration files with ucf
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_ucf> [S<I<debhelper options>>] [B<-n>]
18 B<dh_ucf> is a debhelper program that is responsible for generating the
19 F<postinst> and F<postrm> commands that register files with ucf(1) and ucfr(1).
25 =item debian/I<package>.ucf
27 List pairs of source and destination files to register with ucf. Each pair
28 should be put on its own line, with the source and destination separated by
29 whitespace. Both source and destination must be absolute paths. The source
30 should be a file that is provided by your package, typically in /usr/share/,
31 while the destination is typically a file in /etc/.
33 A dependency on ucf will be generated in B<${misc:Depends}>.
41 =item B<-n>, B<--noscripts>
43 Do not modify F<postinst>/F<postrm> scripts. Turns this command into a no-op.
49 Note that this command is not idempotent. L<dh_prep(1)> should be called
50 between invocations of this command. Otherwise, it may cause multiple
51 instances of the same text to be added to maintainer scripts.
57 foreach my $package (@{$dh{DOPACKAGES}}) {
58 my $tmp=tmpdir($package);
59 my $file=pkgfile($package,"ucf");
63 @ucf=filedoublearray($file);
66 if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
70 if (! $dh{NOSCRIPTS}) {
72 addsubstvar($package, "misc:Depends", "ucf");
74 foreach my $set (@ucf) {
77 autoscript($package,"postinst","postinst-ucf","s:#UCFSRC#:$src:;s:#UCFDEST#:$dest:;s/#PACKAGE#/$package/",);
78 autoscript($package,"postrm","postrm-ucf","s:#UCFDEST#:$dest:;s/#PACKAGE#/$package/");
87 This program is a part of debhelper.
91 Joey Hess <joeyh@debian.org>
92 Jeroen Schot <schot@a-eskwadraat.nl>