diff options
Diffstat (limited to 'dh_md5sums')
-rwxr-xr-x | dh_md5sums | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/dh_md5sums b/dh_md5sums deleted file mode 100755 index 6f794e7f..00000000 --- a/dh_md5sums +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/perl -w - -=head1 NAME - -dh_md5sums - generate DEBIAN/md5sums file - -=cut - -use strict; -use Cwd; -use Debian::Debhelper::Dh_Lib; - -=head1 SYNOPSIS - -B<dh_md5sums> [S<I<debhelper options>>] [B<-x>] [B<-X>I<item>] [B<--include-conffiles>] - -=head1 DESCRIPTION - -dh_md5sums is a debhelper program that is responsible for generating -a DEBIAN/md5sums file, which lists the md5sums of each file in the package. -These files are used by the debsums package. - -All files in DEBIAN/ are omitted from the md5sums file, as are all -conffiles (unless you use the --include-conffiles switch). - -The md5sums file is installed with proper permissions and ownerships. - -=head1 OPTIONS - -=over 4 - -=item B<-x>, B<--include-conffiles> - -Include conffiles in the md5sums list. Note that this information is -redundant since it is included elsewhere in debian packages. - -=item B<-X>I<item>, B<--exclude=>I<item> - -Exclude files that contain "item" anywhere in their filename from -being listed in the md5sums file. - -=back - -=cut - -init(); - -foreach my $package (@{$dh{DOPACKAGES}}) { - my $tmp=tmpdir($package); - - if (! -d "$tmp/DEBIAN") { - doit("install","-d","$tmp/DEBIAN"); - } - - # Check if we should exclude conffiles. - my $exclude=""; - if (! $dh{INCLUDE_CONFFILES} && -r "$tmp/DEBIAN/conffiles") { - # Generate exclude regexp. - open (CONFF,"$tmp/DEBIAN/conffiles"); - while (<CONFF>) { - chomp; - s/^\///; - $exclude.="! -path \"$_\" "; - } - close CONFF; - } - - # See if we should exclude other files. - if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') { - $exclude.="! \\( $dh{EXCLUDE_FIND} \\) "; - } - - my $olddir=getcwd(); - complex_doit("cd $tmp >/dev/null ; find . -type f $exclude ! -regex '.*/DEBIAN/.*' -printf '%P\\0' | xargs -r0 md5sum > DEBIAN/md5sums ; cd '$olddir' >/dev/null"); - # If the file's empty, no reason to waste inodes on it. - if (-z "$tmp/DEBIAN/md5sums") { - doit("rm","-f","$tmp/DEBIAN/md5sums"); - } - else { - doit("chmod",644,"$tmp/DEBIAN/md5sums"); - doit("chown","0.0","$tmp/DEBIAN/md5sums"); - } -} - -=head1 SEE ALSO - -L<debhelper(7)> - -This program is a part of debhelper. - -=head1 AUTHOR - -Joey Hess <joeyh@debian.org> - -=cut |