]> git.donarmstrong.com Git - debhelper.git/commitdiff
r302: * dh_shlibdeps: added -l option, which lets you specify a path that
authorjoey <joey>
Thu, 4 Nov 1999 23:51:29 +0000 (23:51 +0000)
committerjoey <joey>
Thu, 4 Nov 1999 23:51:29 +0000 (23:51 +0000)
     LD_LIBRARY_PATH is then set to when dpkg-shlibdeps is run. This
     should make it easier for library packages that also build binary
     packages to be built with correct dependancies. Closes: #36751
   * In honor of Burn all GIFs Day (hi Don!), I added alternative
     image formats .png, .jpg (and .jpeg) to the list of extentions dh_compress
     does not compress. Closes: #41733
   * Also, made all extentions dh_compress skips be looked at case
     insensitively.
   * dh_movefiles: force owner and group of installed files to be root.
Closes: #46039
   * Closes: #42650, #47175 -- they've been fixed forever.

Dh_Getopt.pm
debian/changelog
dh_compress
dh_compress.1
dh_installdocs
dh_shlibdeps
dh_shlibdeps.1
doc/PROGRAMMING

index 9254eb065d944bbbb3a2d032aa7bfdd64fe6f74f..0eec704db6eb9b62bd89c754eec4fcf6c6e7a495 100644 (file)
@@ -100,6 +100,8 @@ sub parseopts {
                "dpkg-shlibdeps-params=s", => \$options{U_PARAMS},
                "dpkg-gencontrol-params=s", => \$options{U_PARAMS},
 
+               "l=s", => \$options{L_PARAMS},
+
                "m=s", => \$options{M_PARAMS},
                "major=s" => \$options{M_PARAMS},
 
index 720d6735a03320018f785c224a84dfbdc3367f80..74b2fe7731010f153da9f84da0e922dfcaf6b991 100644 (file)
@@ -1,3 +1,20 @@
+debhelper (2.0.69) unstable; urgency=low
+
+  * dh_shlibdeps: added -l option, which lets you specify a path that
+    LD_LIBRARY_PATH is then set to when dpkg-shlibdeps is run. This
+    should make it easier for library packages that also build binary
+    packages to be built with correct dependancies. Closes: #36751
+  * In honor of Burn all GIFs Day (hi Don!), I added alternative
+    image formats .png, .jpg (and .jpeg) to the list of extentions dh_compress
+    does not compress. Closes: #41733
+  * Also, made all extentions dh_compress skips be looked at case
+    insensitively.
+  * dh_movefiles: force owner and group of installed files to be root.
+    Closes: #46039
+  * Closes: #42650, #47175 -- they've been fixed forever.
+
+ -- Joey Hess <joeyh@master.debian.org>  Thu,  4 Nov 1999 15:05:59 -0800
+
 debhelper (2.0.68) unstable; urgency=low
 
   * dh_installxfonts: Patch from Anthony Wong to fix directory searching.
index a01f5d15265583a6e219e3d7b5d9f03bd92c7a4e..73676d6a58d092f7feef812ed83a5481d2a0f76c 100755 (executable)
@@ -39,8 +39,8 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                push @files, split(/\n/,`
                        find usr/info usr/share/info usr/man usr/share/man usr/X11*/man -type f ! -name "*.gz" 2>/dev/null || true;
                        find usr/doc usr/share/doc -type f \\( -size +4k -or -name "changelog*" \\) \\
-                               \\( -name changelog.html -or ! -name "*.htm*" \\) \\
-                               ! -name "*.gif" ! -iname "*.gz" \\
+                               \\( -name changelog.html -or ! -iname "*.htm*" \\) \\
+                               ! -iname "*.gif" ! -iname "*.png" ! -iname "*.jpg" ! -iname "*.jpeg" ! -iname "*.gz" \\
                                ! -iname "*.taz" ! -iname "*.tgz" ! -iname "*.z" \\
                                ! -iname "*-gz" ! -iname "*-z" ! -iname "*_z" \\
                                ! -name "copyright" 2>/dev/null || true
index 731409b5a4784e8960f867a2d1f8a6c0b51fddd5..e37f040c1d7f1f2ec84516384e701ec749f3f5b4 100644 (file)
@@ -32,8 +32,8 @@ customization of what files are compressed:
  find usr/info usr/share/info usr/man usr/share/man usr/X11*/man -type f ! -name "*.gz"
  find usr/doc usr/share/doc -type f \\ 
        \\( -size +4k -or -name "changelog*" \\) \\
-       \\( -name changelog.html -or ! -name "*.htm*" \\) \\
-       ! -name "*.gif" ! -iname "*.gz" \\
+       \\( -name changelog.html -or ! -iname "*.htm*" \\) \\
+       ! -iname "*.gif" ! -iname "*.png" ! -iname "*.jpg" ! -iname "*.jpeg" ! -iname "*.gz" \\
        ! -iname "*.taz" ! -iname "*.tgz" ! -iname "*.z" \\
        ! -name "copyright"
 .SH OPTIONS
index cc5e00a97e3be3a99abd5fdb702072bf118edfe3..9e43ea8d1e649f434403035b6f9d6feca29391b2 100755 (executable)
@@ -17,7 +17,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        # better know what they're doing.
        if ( ! -d "$TMP/usr/share/doc/$PACKAGE" && 
             ! -l "$TMP/usr/share/doc/$PACKAGE") {
-               doit("install","-d","$TMP/usr/share/doc/$PACKAGE");
+               doit("install","-g","root","-o","root","-d","$TMP/usr/share/doc/$PACKAGE");
        }
 
        undef @docs;
@@ -31,7 +31,8 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        }
 
        if (@docs) {
-               doit("cp","-a",@docs,"$TMP/usr/share/doc/$PACKAGE/");
+               doit("cp", "-a",@docs,"$TMP/usr/share/doc/$PACKAGE/");
+               doit("chown","-R","root.root","$TMP/usr/share/doc");
                doit("chmod","-R","go=rX","$TMP/usr/share/doc");
                doit("chmod","-R","u+rw","$TMP/usr/share/doc");
        }
@@ -42,18 +43,18 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                $readme_debian=pkgfile($PACKAGE,'README.debian');
        }
        if ($readme_debian) {
-               doit("install","-m","644","-p","$readme_debian",
+               doit("install","-g","root","-o","root","-m","644","-p","$readme_debian",
                        "$TMP/usr/share/doc/$PACKAGE/README.Debian");
        }
 
        $todo=pkgfile($PACKAGE,'TODO');
        if ($todo) {
                if (isnative($PACKAGE)) {
-                       doit("install","-m","644","-p",$todo,
+                       doit("install","-g","root","-o","root","-m","644","-p",$todo,
                                "$TMP/usr/share/doc/$PACKAGE/TODO");
                }
                else {
-                       doit("install","-m","644","-p",$todo,
+                       doit("install","-g","root","-o","root","-m","644","-p",$todo,
                                "$TMP/usr/share/doc/$PACKAGE/TODO.Debian");
                }
        }
@@ -66,7 +67,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                $copyright="debian/copyright";
        }
        if ($copyright) {
-                       doit("install","-m","644","-p",$copyright,
+                       doit("install","-g","root","-o","root","-m","644","-p",$copyright,
                                "$TMP/usr/share/doc/$PACKAGE/copyright");
        }
 
@@ -107,11 +108,11 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        
        if (%doc_ids) {
                if (! -d "$TMP/usr/share/doc-base/") {
-                       doit("install","-d","$TMP/usr/share/doc-base/");
+                       doit("install","-g","root","-o","root","-d","$TMP/usr/share/doc-base/");
                }
        }
        foreach my $fn (keys %doc_ids) {
-               doit("install","-m644","-p","debian/$fn",
+               doit("install","-g","root","-o","root","-m644","-p","debian/$fn",
                     "$TMP/usr/share/doc-base/$doc_ids{$fn}");
                if (! $dh{NOSCRIPTS}) {
                        autoscript($PACKAGE,"postinst","postinst-doc-base",
index 1268fa4a4f569ff50b55086b0b8348ea94dd554b..3fec714ceeb05b3fa7e74cfb10e028fa42331ae0 100755 (executable)
@@ -22,6 +22,10 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                }
        }
 
+       if ($dh{L_PARAMS}) {
+               $ENV{'LD_LIBRARY_PATH'}=$dh{L_PARAMS}
+       }
+
        if (@filelist) {
                doit("dpkg-shlibdeps","-Tdebian/$EXT\substvars",@{$dh{U_PARAMS}},@filelist);
        }
index 6b124cbf2c13d777c42df5bb8d7af555e6c75528..5e01d0864ac0a289668cc232dd2ce0585648dc10 100644 (file)
@@ -3,7 +3,7 @@
 dh_shlibdeps \- calculate shared library dependancies
 .SH SYNOPSIS
 .B dh_shlibdeps
-.I "[debhelper options] [-uparams]"
+.I "[debhelper options] [-uparams] [-ldirectory]"
 .SH "DESCRIPTION"
 dh_shlibdeps is a debhelper program that is responsible for calculating
 shared library dependancies for all executables found in the package build
@@ -22,6 +22,14 @@ for a list of options common to all debhelper commands.
 .B \-uparams, \--dpkg-shlibdeps-params=params
 Pass "params" to 
 .BR dpkg-shlibdeps (1)
+.TP
+.B \-ldirectory
+Before
+.BR dpkg-shlibdeps (1)
+is run, LD_LIBRARY_PATH will be set to the specified directory.
+This is useful for multi-binary packages where a library
+is built in one package and another package contains binaries linked
+against said library.
 .SH ENVIRONMENT
 See
 .BR debhelper (1)
index 7dc0c638e944e85cfb42e7099fbd827bea12963f..98b4cd2951a3abc6728e6cd1c9739c50df4b4b4b 100644 (file)
@@ -36,110 +36,130 @@ merge these modifications into the actual postinst scripts.
 
 There are always exceptions. Just ask me.
 
-Introducing dh_lib:
-------------------
+Introducing Dh_Lib.pm:
+---------------------
 
-All debhelper programs use the dh_lib library (actually it's a shell script)
-to parse their arguments and set some useful variables. It's not mandatory
-that your program use dh_lib, but it will make it a lot easier to keep it in
-sync with the rest of debhelper if it does, so this is highly encouraged.
+Dh_lib.pm is the library used by all debhelper programs to parse their
+arguments and set some useful variables. It's not mandatory that your
+program use Dh_lib.pm, but it will make it a lot easier to keep it in sync
+with the rest of debhelper if it does, so this is highly encouraged.
 
-Typically, you invoke dh_lib like this:
+(There used to be a version of Dh_lib.pm that was a library of functions for
+shell scripts. If you want to write a debhelper command that is a shell
+script, I can dig up that old library for you. Only the perl one is
+supported now, though.)
 
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+Use Dh_lib.pm like this:
 
-The path statement is there to make your program look first in debian/ for
-dh_lib (so users can install a modified version there if necessary), then the
-rest of the path, then the canonical location of dh_lib, /usr/lib/debhelper.
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
+use Dh_Lib;
+init();
+
+The BEGIN block is there to make perl look for the module in all the right
+places.
+
+The init() function in the perl version. This causes Dh_lib to
+parse the command line and do some other initialization tasks.
 
 Argument processing:
 -------------------
 
 All debhelper programs should respond to certain arguments, such as -v, -i,
--a, and -p. To help you make this work right, dh_lib handles argument
-processing.
+-a, and -p. To help you make this work right, Dh_Lib.pm handles argument
+processing. Just call init().
 
-As soon as dh_lib loads, it processes any arguments that have been passed to
-your program. The following variables may be set during this stage; your
-program can use them later:
+After argument processing, some global variables are used to hold the
+results; programs can use them later. These variables are elements of the
+%dh hash.
 
 switch         variable        description
--v             DH_VERBOSE      should the program verbosely output what it is
+-v             VERBOSE         should the program verbosely output what it is
                                doing?
---no-act       DH_NO_ACT       should the program not actually do anything?
--i,-a,-p       DH_DOPACKAGES   a space delimited list of the binary packages
-                               to act on
--i,-p          DH_DOINDEP      a space delimited list of the binary independent
+--no-act       NO_ACT          should the program not actually do anything?
+-i,-a,-p,-N    DOPACKAGES      a space delimited list of the binary packages
+                               to act on (in Dh_Lib.pm, this is an array)
+-i,-p,-N       DOINDEP         a space delimited list of the binary independent
                                packages to act on
--a,-p          DH_DOARCH       a space delimited list of the binary dependent
+-a,-p,-N       DOARCH          a space delimited list of the binary dependent
                                packages to act on
--n             DH_NOSCRIPTS    if set, do not make any modifications to the 
+-n             NOSCRIPTS       if set, do not make any modifications to the 
                                package's postinst, postrm, etc scripts.
--X             DH_EXCLUDE      exclude a something from processing (you
+-X             EXCLUDE         exclude a something from processing (you
                                decide what this means for your program)
-               DH_EXCLUDE_GREP same as DH_EXCLUDE, except all items are
-                               separated by '|' characters, instead of spaces,
-                               handy for egrep -v
--x             DH_INCLUDE_CONFFILES
+                               (This is an array)
+                EXCLUDE_FIND   same as DH_EXCLUDE, except all items are put
+                               into a string in a way that they will make
+                               find find them. (Use ! in front to negate
+                               that, of course)
+-x             INCLUDE_CONFFILES
                                include conffiles. It's -x for obscure
                                historical reasons.
--d             DH_D_FLAG       you decide what this means to your program
--r             DH_R_FLAG       you decide what this means to your program
--k             DH_K_FLAG       you decide what this means to your program
--P             DH_TMPDIR       package build directory (implies only one
+-d             D_FLAG          you decide what this means to your program
+-r             R_FLAG          you decide what this means to your program
+-k             K_FLAG          you decide what this means to your program
+-P             TMPDIR          package build directory (implies only one
                                package is being acted on)
--u             DH_U_PARAMS     will be set to a string, that is typically
+-u             U_PARAMS        will be set to a string, that is typically
                                parameters your program passes on to some
-                               other program.
--m             DH_M_PARAMS     will be set to a string, you decide what it
+                               other program. (This is an array)
+-m             M_PARAMS        will be set to a string, you decide what it
+                               means to your program
+-l             L_PARAMS        will be set to a string, you decide what it
                                means to your program
--V             DH_V_FLAG       will be set to a string, you decide what it
+-V             V_FLAG          will be set to a string, you decide what it
                                means to your program
--V             DH_V_FLAG_SET   will be 1 if -V was specified, even if no
+-V             V_FLAG_SET      will be 1 if -V was specified, even if no
                                parameters were passed along with the -V
--A             DH_PARAMS_ALL   generally means that additional command line
+-A             PARAMS_ALL      generally means that additional command line
                                parameters passed to the program (other than
                                those processed here), will apply to all 
                                binary packages the program acts on, not just
                                the first
---init-script  DH_INIT_SCRIPT  will be set to a string, which specifies an
+--init-script  INIT_SCRIPT     will be set to a string, which specifies an
                                init script name (probably only
                                dh_installinit will ever use this)
+--sourcedir    SOURCEDIR       will be set to a string (probably only
+                               dh_movefiles will ever use this)
+--destdir      DESTDIR         will be set to a string (probably only
+                               dh_builddeb will ever use this)
+--flavor       FLAVOR          will be set to a string (probably only
+                               dh_installemacsen will ever use this)
+--number       NUMBER          will be set to a number
 
 Any additional command line parameters that do not start with "-" will be 
-ignored, and you can access them later just as you normally would ($1, $2,
-etc).
+ignored, and you can access them later just as you normally would.
 
 If you need a new command line option, just ask me, and I will add it.
 
 Global variables:
 ----------------
 
-The following variables are also set, you can use any of them:
+The following keys are also set in the %dh hash when you call init():
 
 MAINPACKAGE    the name of the first binary package listed in
                debian/control
-DH_FIRSTPACKAGE        the first package we were instructed to act on. This package
+FIRSTPACKAGE   the first package we were instructed to act on. This package
                typically gets special treatment, additional arguments
                specified on the command line may effect it.
 
 Functions:
 ---------
 
-Dh_lib also contains a number of functions you may find useful.
+Dh_Lib.pm also contains a number of functions you may find useful.
 
 doit()
-       Pass this function a string that is a shell command. It will run the
-       command (unless DH_NO_ACT is set), and if DH_VERBOSE is set, it will
-       also output the command to stdout. You should use this function for
-       almost all commands your program performs that manipulate files in
-       the package build directories.
+       Pass this function an array that is a 
+       shell command. It will run the command (unless $dh{NO_ACT} is set), and
+       if $dh{VERBOSE} is set, it will also output the command to stdout. You
+       should use this function for almost all commands your program performs
+       that manipulate files in the package build directories.
 complex_doit()
-       This is the same as doit(), except you can pass more complicated
-       commands to it (ie, commands involving piping redirection)
-verbose_echo()
-       Pass this command a string, and it will echo it if DH_VERBOSE is set.
+       Pass this function a string that is a shell command, it will run it
+       similarly to how doit() does. You can pass more complicated commands 
+       to this (ie, commands involving piping redirection), however, you 
+       have to worry about things like escaping shell metacharacters.
+verbose_print()
+       Pass this command a string, and it will echo it if $dh{VERBOSE} is set.
 error()
        Pass this command a string, it will output it to standard error and
        exit.
@@ -151,6 +171,10 @@ tmpdir()
        name of the tmp directory that will be used as this package's
        package build directory. Typically, this will be "debian/tmp" or
        "debian/package".
+compat()
+       Pass this command a number, and if the current compatability level
+       equals that number, it will return true. Looks at DH_COMPAT to get
+       the compatability level.
 pkgfile()
        Pass this command the name of a binary package, and the base name of a
        file, and it will return the actual filename to use. This is used
@@ -158,30 +182,25 @@ pkgfile()
        debian/ directory, so there can be one config file per binary
        package. The convention is that the files are named
        debian/package.filename, and debian/filename is also allowable for
-       the MAINPACKAGE. If the file does not exist, nothing is returned.
+       the $dh{MAINPACKAGE}. If the file does not exist, nothing is returned.
 pkgext()
        Pass this command the name of a binary package, and it will return
        the name to prefix to files in debian/ for this package. For the
-       MAINPACKAGE, it returns nothing (there is no prefix), for the other
+       $dh{MAINPACKAGE}, it returns nothing (there is no prefix), for the other
        packages, it returns "package.".
 isnative()
        Pass this command the name of a package, it returns 1 if the package
        is a native debian package.
-       As a side effect, VERSION is set to the version number of the
+       As a side effect, $dh{VERSION} is set to the version number of the
        package.
 autoscript()
-       Pass 3 parameters:
-        1: script to add to
-        2: filename of snippet
-        3: sed commands to run on the snippet. Ie, s/#PACKAGE#/$PACKAGE/
-           (optional)
+       Pass parameters:
+        - binary package to be affected
+        - script to add to
+        - filename of snippet
+        - sed commands to run on the snippet. Ie, s/#PACKAGE#/$PACKAGE/
+          (optional)
        This command automatically adds shell script snippets to a debian
        maintainer script (like the postinst or prerm).
 
-Notes:
------
-
-Dh_lib is still evolving.
-There will probably be a perl version too, in the future.
-
 -- Joey Hess <joeyh@master.debian.org>