data in a file. Substvars data may be put in debian/package.substvars.
(Those files used to be used by debhelper for automatically generated
data, but it uses a different internal filename now). It will be merged
with any automatically determined substvars data. See bug #98819
* I want to stress that no one should ever rely in internal, undocumented
debhelper workings. Just because debhelper uses a certian name for some
internally used file does not mean that you should feel free to modify
that file to your own ends in a debian package. If you do use it, don't
be at all suprised when it breaks. If you find that debhelper is lacking
a documented interface for something that you need, ask for it!
(debhelper's undocumented, internal use only files should now all be
prefixed with ".debhelper")
+debhelper (3.0.30) unstable; urgency=low
+
+ * dh_gencontrol: Added a documented interface for specifying substvars
+ data in a file. Substvars data may be put in debian/package.substvars.
+ (Those files used to be used by debhelper for automatically generated
+ data, but it uses a different internal filename now). It will be merged
+ with any automatically determined substvars data. See bug #98819
+ * I want to stress that no one should ever rely in internal, undocumented
+ debhelper workings. Just because debhelper uses a certian name for some
+ internally used file does not mean that you should feel free to modify
+ that file to your own ends in a debian package. If you do use it, don't
+ be at all suprised when it breaks. If you find that debhelper is lacking
+ a documented interface for something that you need, ask for it!
+ (debhelper's undocumented, internal use only files should now all be
+ prefixed with ".debhelper")
+
+ -- Joey Hess <joeyh@debian.org> Sun, 3 Jun 2001 16:37:33 -0400
+
debhelper (3.0.29) unstable; urgency=low
* Added -X flag to dh_makeshlibs, for packages with wacky plugins that
my $ext=pkgext($package);
if (! $dh{D_FLAG}) {
- doit("rm","-f","debian/${ext}substvars",
+ doit("rm","-f","debian/${ext}substvars.debhelper",
"debian/${ext}postinst.debhelper",
"debian/${ext}postrm.debhelper",
"debian/${ext}preinst.debhelper",
This program is merely a wrapper around L<dpkg-gencontrol(1)>, which calls
it once for each package being acted on, and passes in some additional
-useful flags including "-isp".
+useful flags including "-isp".
+
+Note that L<dpkg-gencontrol(1)> expands certian substirution variables
+when generating the control file (for details, see its man page). Those
+variables are typically generated by L<dh_shlibdeps(1)> and like programs.
+However, if you want to specify some of your own manually, you may do so,
+by creating files named debian/package.substvars (where package is the
+package these variables apply to). The files should be of the same form
+output by L<dpkg-shlibdeps(1)>
=head1 OPTIONS
doit("install","-o",0,"-g",0,"-d","$tmp/DEBIAN");
}
- # Generate and install control file. Use complex_doit to allow for
- # wild and wonderful U_PARAMS quoting.
+ # Merge in user-specified substvars file with debhelper generated
+ # one.
+ my $substvars=pkgfile($package,"substvars");
+ if (-e $substvars) {
+ complex_doit("cat $substvars >> debian/${ext}substvars.debhelper");
+ }
+
+ # Generate and install control file.
doit("dpkg-gencontrol","-l$changelog","-isp","-p$package",
- "-Tdebian/${ext}substvars","-P$tmp",@{$dh{U_PARAMS}});
+ "-Tdebian/${ext}substvars.debhelper",
+ "-P$tmp",@{$dh{U_PARAMS}});
- # This chmod is only necessary if the user sets the umask to something odd.
+ # This chmod is only necessary if the user sets the umask to
+ # something odd.
doit("chmod","644","$tmp/DEBIAN/control");
doit("chown","0.0","$tmp/DEBIAN/control");
libraries, and generates a shlibs file for the libraries it finds.
It also adds a call to ldconfig in the postinst and postrm scripts (in
-DH_COMPAT=3 mode and above only).
+DH_COMPAT=3 mode and above only) to any packages which it finds shared
+libraries in.
=head1 OPTIONS
my $ext = pkgext($package);
my @subs;
- if (open IN, "debian/${ext}substvars")
+ if (open IN, "debian/${ext}substvars.debhelper")
{
@subs = grep !/^perl:Depends=/, <IN>;
close IN;
unless $perl_depends eq 'perl-base';
}
- open OUT, ">debian/${ext}substvars";
+ open OUT, ">debian/${ext}substvars.debhelper";
print OUT @subs;
close OUT;
}
}
if (@filelist) {
- doit("dpkg-shlibdeps","-Tdebian/${ext}substvars",@{$dh{U_PARAMS}},'-dDepends',@filelist);
+ doit("dpkg-shlibdeps","-Tdebian/${ext}substvars.debhelper",@{$dh{U_PARAMS}},'-dDepends',@filelist);
}
}
dh_installdeb is an exception, it will run after the other commands and
merge these modifications into the actual postinst scripts.
+In general, files named debian/*.debhelper are internal to debhelper, and
+their expstence or use should not be relied on by external programs such as
+the build process of a package.
+
Debhelper programs should default to doing exactly what policy says to do.
There are always exceptions. Just ask me.