]> git.donarmstrong.com Git - debhelper.git/commitdiff
r475: * dh_gencontrol: Added a documented interface for specifying substvars
authorjoey <joey>
Sun, 3 Jun 2001 22:25:07 +0000 (22:25 +0000)
committerjoey <joey>
Sun, 3 Jun 2001 22:25:07 +0000 (22:25 +0000)
     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")

debian/changelog
dh_clean
dh_gencontrol
dh_makeshlibs
dh_perl
dh_shlibdeps
doc/PROGRAMMING

index f19766b005bc4af2d6214501e5ad904bc44fc05d..f8858cb07f8bde32ce08c7fece46dc4f74c0ce6c 100644 (file)
@@ -1,3 +1,21 @@
+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
index d86743a5ab775ea614ded0b112832902d8fccc70..bd3b72cac5a15f98f664ab1626e2182f187a9911 100755 (executable)
--- a/dh_clean
+++ b/dh_clean
@@ -62,7 +62,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        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",
index bb39780cb4dd3369dddf0ba0de4f6b5cf74c511f..d305b961c54b7fc0750cc946d4f82c41f109ef07 100755 (executable)
@@ -21,7 +21,15 @@ proper permissions.
 
 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
 
@@ -52,12 +60,20 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                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");
index bb1d8acd8a715e3a0a8d605c335fa45b80a174f7..a70d3b220be966a0cacfe0ca4d60fd34894467d7 100755 (executable)
@@ -19,7 +19,8 @@ dh_makeshlibs is a debhelper program that automatically scans for shared
 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
 
diff --git a/dh_perl b/dh_perl
index ac6fa0667f0bf3de3cdd639981e860761d1e96c9..ea2025e0e3e7edc8ca6a765a4028e9e0fb573290 100755 (executable)
--- a/dh_perl
+++ b/dh_perl
@@ -89,7 +89,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        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;
@@ -144,7 +144,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                unless $perl_depends eq 'perl-base';
        }
 
-       open OUT, ">debian/${ext}substvars";
+       open OUT, ">debian/${ext}substvars.debhelper";
        print OUT @subs;
        close OUT;
 }
index 744aa5bfdd29159cb039f53972b8cee015d9d10e..f9199c3f46f2bb48df15333c7a0fdbaa78b29f0a 100755 (executable)
@@ -97,7 +97,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }
 
        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);
        }
 }
 
index 1f89e10fdf44c86198f20109f27b3c16af59d05a..0934727e686bbe04d70a070bb6553cfb32701592 100644 (file)
@@ -34,6 +34,10 @@ The autoscript() function (see below) is one easy way to do this.
 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.