X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_installdebconf;h=5a20ed79c402c76cfe44a0fd539c2785772fd39d;hb=fb8f18f4a98669c3b85e1bd7920fbabfc00b886e;hp=b1a23453af55d2f5747f1a6dafead8cbeaf6c2e2;hpb=967f2d7877a06e4868350b82df94a168dc2fccda;p=debhelper.git diff --git a/dh_installdebconf b/dh_installdebconf index b1a2345..5a20ed7 100755 --- a/dh_installdebconf +++ b/dh_installdebconf @@ -15,36 +15,48 @@ B [S>] [B<-n>] [S I>] =head1 DESCRIPTION -dh_installdebconf is a debhelper program that is responsible for installing -files used by the debconf package into package build directories. - -It also automatically generates the postrm commands needed to -interface with debconf. See L for an explanation of how -that works. - -Files named debian/package.config and debian/package.templates are -installed into the DEBIAN directory in the package build directory. -If a file named debian/package.config.debhelper exists, the contents -of that file are merged into the config script as follows: If the script -exists, then anywhere in it that "#DEBHELPER#" appears, the text of the -.debhelper file is inserted. If the script does not exist, then a script -is generated from the .debhelper file. The .debhelper files may be created -by other debhelper programs, and are shell script fragments. +B is a debhelper program that is responsible for installing +files used by debconf into package build directories. + +It also automatically generates the F commands needed to interface +with debconf. The commands are added to the maintainer scripts by +B. See L for an explanation of how that +works. Note that if you use debconf, your package probably needs to depend on it -(it will be added to ${misc:Depends} by this program). +(it will be added to B<${misc:Depends}> by this program). + +Note that for your config script to be called by B, your F +needs to source debconf's confmodule. B does not +install this statement into the F automatically as it is too +hard to do it right. + +=head1 FILES + +=over 4 + +=item debian/I.config + +This is the debconf F script, and is installed into the F +directory in the package build directory. -Note that for your config script to be called by dpkg, your postinst -needs to source debconf's confmodule. dh_installdebconf does not -install this statement into postinst automatically as it it too hard to -do it right. +Inside the script, the token B<#DEBHELPER#> is replaced with +shell script snippets generated by other debhelper commands. -=head1 LOCALIZED TEMPLATE FILES +=item debian/I.templates -This program will look to see if you have a debian/po directory and if so -will automatically call L to generate a merged templates -file containing the translations. For this to work, your package should -build-depend on po-debconf. +This is the debconf F file, and is installed into the F +directory in the package build directory. + +=item F + +If this directory is present, this program will automatically use +L to generate merged templates +files that include the translations from there. + +For this to work, your package should build-depend on F. + +=back =head1 OPTIONS @@ -52,11 +64,11 @@ build-depend on po-debconf. =item B<-n>, B<--noscripts> -Do not modify postrm script. +Do not modify F script. =item B<--> I -Pass the params to po2debconf. +Pass the params to B. =back @@ -100,14 +112,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } # I'm going with debconf 0.5 because it was the first - # "modern" one. - my $debconfdep="debconf (>= 0.5) | debconf-2.0"; + # "modern" one. udebs just need cdebconf. + my $debconfdep=is_udeb($package) ? "cdebconf-udeb" : "debconf (>= 0.5) | debconf-2.0"; if ($config ne '' || $templates ne '') { addsubstvar($package, "misc:Depends", $debconfdep); } - else { - addsubstvar($package, "misc:Depends", $debconfdep, undef, 1); # remove - } if (($config ne '' || $templates ne '') && ! $dh{NOSCRIPTS}) { autoscript($package,"postrm","postrm-debconf");