diff options
author | joey <joey> | 1999-08-17 05:02:08 +0000 |
---|---|---|
committer | joey <joey> | 1999-08-17 05:02:08 +0000 |
commit | 2b197c28c63bdd7a316fdc3938be2e411c69fa33 (patch) | |
tree | 5ca5cfe97d9f14b1d0e7604390863f29e58ba7ca | |
parent | 1225012d118cdc75892d02a41eb3ffcede466473 (diff) | |
download | debhelper-2b197c28c63bdd7a316fdc3938be2e411c69fa33.tar.gz |
r129: Initial Import
-rw-r--r-- | Test.pm | 254 | ||||
-rw-r--r-- | autoscripts/postinst-doc-base | 3 | ||||
-rw-r--r-- | autoscripts/postinst-wm | 3 | ||||
-rw-r--r-- | autoscripts/postinst-xaw | 3 | ||||
-rw-r--r-- | autoscripts/postrm-wm | 3 | ||||
-rw-r--r-- | autoscripts/prerm-doc-base | 3 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/emacsen-install | 0 | ||||
-rw-r--r-- | debian/emacsen-remove | 0 | ||||
-rw-r--r-- | debian/init.d | 0 | ||||
-rw-r--r-- | debian/links | 4 | ||||
-rw-r--r-- | dh_installmime.1 | 38 | ||||
-rw-r--r-- | dh_installmodules.1 | 35 | ||||
-rw-r--r-- | dh_installpam.1 | 30 | ||||
-rwxr-xr-x | dh_installwm | 21 | ||||
-rw-r--r-- | dh_installwm.1 | 42 | ||||
-rwxr-xr-x | dh_installxaw | 30 | ||||
-rw-r--r-- | dh_installxaw.1 | 40 | ||||
-rwxr-xr-x | dh_link | 70 | ||||
-rw-r--r-- | dh_link.1 | 75 | ||||
-rwxr-xr-x | dh_listpackages | 8 | ||||
-rw-r--r-- | dh_listpackages.1 | 25 | ||||
-rw-r--r-- | dh_perl.1 | 44 | ||||
-rwxr-xr-x | examples/rules | 2 | ||||
-rwxr-xr-x | examples/rules.multi | 2 | ||||
-rw-r--r-- | me | 0 | ||||
-rw-r--r-- | pgptemp.$00 | 0 |
27 files changed, 739 insertions, 2 deletions
diff --git a/Test.pm b/Test.pm new file mode 100644 index 00000000..55f80ac2 --- /dev/null +++ b/Test.pm @@ -0,0 +1,254 @@ +use strict; +package Test; +use Test::Harness 1.1501 (); +use Carp; +use vars (qw($VERSION @ISA @EXPORT @EXPORT_OK $ntest $TestLevel), #public-ish + qw($TESTOUT $ONFAIL %todo %history $planned @FAILDETAIL)); #private-ish +$VERSION = '1.13'; +require Exporter; +@ISA=('Exporter'); +@EXPORT=qw(&plan &ok &skip); +@EXPORT_OK=qw($ntest $TESTOUT); + +$TestLevel = 0; # how many extra stack frames to skip +$|=1; +#$^W=1; ? +$ntest=1; +$TESTOUT = *STDOUT{IO}; + +# Use of this variable is strongly discouraged. It is set mainly to +# help test coverage analyzers know which test is running. +$ENV{REGRESSION_TEST} = $0; + +sub plan { + croak "Test::plan(%args): odd number of arguments" if @_ & 1; + croak "Test::plan(): should not be called more than once" if $planned; + my $max=0; + for (my $x=0; $x < @_; $x+=2) { + my ($k,$v) = @_[$x,$x+1]; + if ($k =~ /^test(s)?$/) { $max = $v; } + elsif ($k eq 'todo' or + $k eq 'failok') { for (@$v) { $todo{$_}=1; }; } + elsif ($k eq 'onfail') { + ref $v eq 'CODE' or croak "Test::plan(onfail => $v): must be CODE"; + $ONFAIL = $v; + } + else { carp "Test::plan(): skipping unrecognized directive '$k'" } + } + my @todo = sort { $a <=> $b } keys %todo; + if (@todo) { + print $TESTOUT "1..$max todo ".join(' ', @todo).";\n"; + } else { + print $TESTOUT "1..$max\n"; + } + ++$planned; +} + +sub to_value { + my ($v) = @_; + (ref $v or '') eq 'CODE' ? $v->() : $v; +} + +sub ok ($;$$) { + croak "ok: plan before you test!" if !$planned; + my ($pkg,$file,$line) = caller($TestLevel); + my $repetition = ++$history{"$file:$line"}; + my $context = ("$file at line $line". + ($repetition > 1 ? " fail \#$repetition" : '')); + my $ok=0; + my $result = to_value(shift); + my ($expected,$diag); + if (@_ == 0) { + $ok = $result; + } else { + $expected = to_value(shift); + my ($regex,$ignore); + if (!defined $expected) { + $ok = !defined $result; + } elsif (!defined $result) { + $ok = 0; + } elsif ((ref($expected)||'') eq 'Regexp') { + $ok = $result =~ /$expected/; + } elsif (($regex) = ($expected =~ m,^ / (.+) / $,sx) or + ($ignore, $regex) = ($expected =~ m,^ m([^\w\s]) (.+) \1 $,sx)) { + $ok = $result =~ /$regex/; + } else { + $ok = $result eq $expected; + } + } + my $todo = $todo{$ntest}; + if ($todo and $ok) { + $context .= ' TODO?!' if $todo; + print $TESTOUT "ok $ntest # ($context)\n"; + } else { + print $TESTOUT "not " if !$ok; + print $TESTOUT "ok $ntest\n"; + + if (!$ok) { + my $detail = { 'repetition' => $repetition, 'package' => $pkg, + 'result' => $result, 'todo' => $todo }; + $$detail{expected} = $expected if defined $expected; + $diag = $$detail{diagnostic} = to_value(shift) if @_; + $context .= ' *TODO*' if $todo; + if (!defined $expected) { + if (!$diag) { + print $TESTOUT "# Failed test $ntest in $context\n"; + } else { + print $TESTOUT "# Failed test $ntest in $context: $diag\n"; + } + } else { + my $prefix = "Test $ntest"; + print $TESTOUT "# $prefix got: ". + (defined $result? "'$result'":'<UNDEF>')." ($context)\n"; + $prefix = ' ' x (length($prefix) - 5); + if ((ref($expected)||'') eq 'Regexp') { + $expected = 'qr/'.$expected.'/' + } else { + $expected = "'$expected'"; + } + if (!$diag) { + print $TESTOUT "# $prefix Expected: $expected\n"; + } else { + print $TESTOUT "# $prefix Expected: $expected ($diag)\n"; + } + } + push @FAILDETAIL, $detail; + } + } + ++ $ntest; + $ok; +} + +sub skip ($$;$$) { + my $whyskip = to_value(shift); + if ($whyskip) { + $whyskip = 'skip' if $whyskip =~ m/^\d+$/; + print $TESTOUT "ok $ntest # $whyskip\n"; + ++ $ntest; + 1; + } else { + local($TestLevel) = $TestLevel+1; #ignore this stack frame + &ok; + } +} + +END { + $ONFAIL->(\@FAILDETAIL) if @FAILDETAIL && $ONFAIL; +} + +1; +__END__ + +=head1 NAME + + Test - provides a simple framework for writing test scripts + +=head1 SYNOPSIS + + use strict; + use Test; + + # use a BEGIN block so we print our plan before MyModule is loaded + BEGIN { plan tests => 14, todo => [3,4] } + + # load your module... + use MyModule; + + ok(0); # failure + ok(1); # success + + ok(0); # ok, expected failure (see todo list, above) + ok(1); # surprise success! + + ok(0,1); # failure: '0' ne '1' + ok('broke','fixed'); # failure: 'broke' ne 'fixed' + ok('fixed','fixed'); # success: 'fixed' eq 'fixed' + ok('fixed',qr/x/); # success: 'fixed' =~ qr/x/ + + ok(sub { 1+1 }, 2); # success: '2' eq '2' + ok(sub { 1+1 }, 3); # failure: '2' ne '3' + ok(0, int(rand(2)); # (just kidding :-) + + my @list = (0,0); + ok @list, 3, "\@list=".join(',',@list); #extra diagnostics + ok 'segmentation fault', '/(?i)success/'; #regex match + + skip($feature_is_missing, ...); #do platform specific test + +=head1 DESCRIPTION + +L<Test::Harness> expects to see particular output when it executes +tests. This module aims to make writing proper test scripts just a +little bit easier (and less error prone :-). + +=head1 TEST TYPES + +=over 4 + +=item * NORMAL TESTS + +These tests are expected to succeed. If they don't something's +screwed up! + +=item * SKIPPED TESTS + +Skip is for tests that might or might not be possible to run depending +on the availability of platform specific features. The first argument +should evaluate to true (think "yes, please skip") if the required +feature is not available. After the first argument, skip works +exactly the same way as do normal tests. + +=item * TODO TESTS + +TODO tests are designed for maintaining an B<executable TODO list>. +These tests are expected NOT to succeed. If a TODO test does succeed, +the feature in question should not be on the TODO list, now should it? + +Packages should NOT be released with succeeding TODO tests. As soon +as a TODO test starts working, it should be promoted to a normal test +and the newly working feature should be documented in the release +notes or change log. + +=back + +=head1 RETURN VALUE + +Both C<ok> and C<skip> return true if their test succeeds and false +otherwise in a scalar context. + +=head1 ONFAIL + + BEGIN { plan test => 4, onfail => sub { warn "CALL 911!" } } + +While test failures should be enough, extra diagnostics can be +triggered at the end of a test run. C<onfail> is passed an array ref +of hash refs that describe each test failure. Each hash will contain +at least the following fields: C<package>, C<repetition>, and +C<result>. (The file, line, and test number are not included because +their correspondence to a particular test is tenuous.) If the test +had an expected value or a diagnostic string, these will also be +included. + +The B<optional> C<onfail> hook might be used simply to print out the +version of your package and/or how to report problems. It might also +be used to generate extremely sophisticated diagnostics for a +particularly bizarre test failure. However it's not a panacea. Core +dumps or other unrecoverable errors prevent the C<onfail> hook from +running. (It is run inside an C<END> block.) Besides, C<onfail> is +probably over-kill in most cases. (Your test code should be simpler +than the code it is testing, yes?) + +=head1 SEE ALSO + +L<Test::Harness> and, perhaps, test coverage analysis tools. + +=head1 AUTHOR + +Copyright (c) 1998-1999 Joshua Nathaniel Pritikin. All rights reserved. + +This package is free software and is provided "as is" without express +or implied warranty. It may be used, redistributed and/or modified +under the terms of the Perl Artistic License (see +http://www.perl.com/perl/misc/Artistic.html) + +=cut diff --git a/autoscripts/postinst-doc-base b/autoscripts/postinst-doc-base new file mode 100644 index 00000000..a53ed7bf --- /dev/null +++ b/autoscripts/postinst-doc-base @@ -0,0 +1,3 @@ +if command -v install-docs >/dev/null 2>&1; then + install-docs -i /usr/share/doc-base/#PACKAGE# +fi diff --git a/autoscripts/postinst-wm b/autoscripts/postinst-wm new file mode 100644 index 00000000..94c052fc --- /dev/null +++ b/autoscripts/postinst-wm @@ -0,0 +1,3 @@ +if [ -x /usr/sbin/register-window-manager ] ; then + register-window-manager --add #WM# +fi diff --git a/autoscripts/postinst-xaw b/autoscripts/postinst-xaw new file mode 100644 index 00000000..b8d718ea --- /dev/null +++ b/autoscripts/postinst-xaw @@ -0,0 +1,3 @@ +if test -x /usr/sbin/update-xaw-wrappers; then + /usr/sbin/update-xaw-wrappers +fi diff --git a/autoscripts/postrm-wm b/autoscripts/postrm-wm new file mode 100644 index 00000000..6dc9f5da --- /dev/null +++ b/autoscripts/postrm-wm @@ -0,0 +1,3 @@ +if [ "$1" == "purge" -a -x /usr/sbin/register-window-manager ] ; then + register-window-manager --remove #WM# +fi diff --git a/autoscripts/prerm-doc-base b/autoscripts/prerm-doc-base new file mode 100644 index 00000000..339361a5 --- /dev/null +++ b/autoscripts/prerm-doc-base @@ -0,0 +1,3 @@ +if command -v install-docs >/dev/null 2>&1; then + install-docs -r #PACKAGE# +fi diff --git a/debian/changelog b/debian/changelog index 3c867107..25279d3f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debhelper (1.1.21) unstable; urgency=low + + * Added install to .PHONY target of example rules files. + + -- Joey Hess <joeyh@master.debian.org> Sun, 11 Oct 1998 22:36:10 -0700 + debhelper (1.1.20) unstable; urgency=low * Added a --same-arch flag, that is useful in the rare case when you have diff --git a/debian/emacsen-install b/debian/emacsen-install new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/debian/emacsen-install diff --git a/debian/emacsen-remove b/debian/emacsen-remove new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/debian/emacsen-remove diff --git a/debian/init.d b/debian/init.d new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/debian/init.d diff --git a/debian/links b/debian/links new file mode 100644 index 00000000..9a72e0fb --- /dev/null +++ b/debian/links @@ -0,0 +1,4 @@ +usr/bin/sysdb-wrapper usr/bin/chfn +usr/bin/sysdb-wrapper usr/bin/chsh +usr/bin/sysdb-wrapper usr/bin/passwd + diff --git a/dh_installmime.1 b/dh_installmime.1 new file mode 100644 index 00000000..4ace9985 --- /dev/null +++ b/dh_installmime.1 @@ -0,0 +1,38 @@ +.TH DH_INSTALLMIME 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installmime \- install mime files into package build directories +.SH SYNOPSIS +.B dh_installmime +.I "[debhelper options] [-n]" +.SH "DESCRIPTION" +dh_installmime is a debhelper program that is responsible for installing +mime files into package build directories. +.P +It also automatically generates the postinst and postrm commands needed to +interface with the debian mime-support package. See +.BR dh_installdeb (1) +for an explanation of how this works. +.P +If a file named debian/package.mime exists, then it is installed into +usr/lib/mime/packages/package in the package build directory. +.P +For the first first binary package listed in the control file, you may use +debian/mime instead. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-n, \--noscripts +Do not modify postinst/postrm scripts. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.SH AUTHOR +Joey Hess <joeyh@master.debian.org> diff --git a/dh_installmodules.1 b/dh_installmodules.1 new file mode 100644 index 00000000..6d9016fe --- /dev/null +++ b/dh_installmodules.1 @@ -0,0 +1,35 @@ +.TH DH_INSTALLMODULES 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installmodules \- register modules with modutils +.SH SYNOPSIS +.B dh_installmodules +.I "[debhelper options] [-n]" +.SH "DESCRIPTION" +dh_installmodules is a debhelper program that is responsible for registering +kernel modules with modutils. +.P +A file named debian/package.modules (debian/modules my be used for the first +binary package in debian/control) will be installed as etc/modutils/package +in the package build directory. +.P +Then postinst and postrm commands are automatically generated to register +the modules when the package is installed. See +.BR dh_installdeb (1) +for an explanation of how this works. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-n, \--noscripts +Do not modify postinst/postrm scripts. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.BR debhelper (1) +.SH AUTHOR +Joey Hess <joeyh@master.debian.org> diff --git a/dh_installpam.1 b/dh_installpam.1 new file mode 100644 index 00000000..bb34a45c --- /dev/null +++ b/dh_installpam.1 @@ -0,0 +1,30 @@ +.TH DH_INSTALLPAM 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installpam \- install pam support files +.SH SYNOPSIS +.B dh_installpam +.I "[debhelper options] [-n]" +.SH "DESCRIPTION" +dh_installpam is a debhelper program that is responsible for installing +files used by PAM into package build directories. +.P +If a file named debian/package.pam exists, then it is installed into +etc/pam.d/package in the package build directory. +.P +For the first first binary package listed in the control file, you may use +debian/pam instead. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.SH AUTHOR +Joey Hess <joeyh@master.debian.org> diff --git a/dh_installwm b/dh_installwm new file mode 100755 index 00000000..be3a1373 --- /dev/null +++ b/dh_installwm @@ -0,0 +1,21 @@ +#!/bin/sh -e +# +# Add to postinst and postrm to register a window manager. + +PATH=debian:$PATH:/usr/lib/debhelper +. dh_lib + +wm=$1 + +if [ -z "$wm" ]; then + error "No window manager was specified." +fi + +for PACKAGE in $DH_DOPACKAGES; do + TMP=`tmpdir $PACKAGE` + + if [ ! "$DH_NOSCRIPTS" ]; then + autoscript "postinst" "postinst-wm" "s/#WM#/$wm/" + autoscript "postrm" "postrm-wm" "s/#WM#/$wm/" + fi +done diff --git a/dh_installwm.1 b/dh_installwm.1 new file mode 100644 index 00000000..bc6ea446 --- /dev/null +++ b/dh_installwm.1 @@ -0,0 +1,42 @@ +.TH DH_INSTALLWM 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installwm \- register a window manager +.SH SYNOPSIS +.B dh_installmenu +.I "[debhelper options] [-n] wmfilename" +.SH "DESCRIPTION" +dh_installwm is a debhelper program that is responsible for +generating the postinst and postrm commands needed to +interface with the the +.BR register-window-manager (1) +command. This results in a window manager being registered when it is +installed. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-n, \--noscripts +Do not modify postinst/postrm scripts. Turns this command into a no-op. +.TP +.B wmfilename +The filename of the window manager you wish to register. May be either a +simple filename if the window manager is in /usr/X11R6/bin/, or a complete +path otherwise. +.SH NOTES +Note that this command will set up postinst and postrm scripts for every +package it acts on. It's wise to limit its action to a single package with, +for example, the -p switch. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.TP +.BR register-window-manager (1) +.SH AUTHOR +Joey Hess <joeyh@master.debian.org> diff --git a/dh_installxaw b/dh_installxaw new file mode 100755 index 00000000..31867f15 --- /dev/null +++ b/dh_installxaw @@ -0,0 +1,30 @@ +#!/usr/bin/perl -w +# +# Integration with xaw-wrappers +# +# If debian/xaw-wrappers file exists, save it to +# $TMP/usr/lib/xaw-wrappers/conf/$PACKAGE +# +# Also, add calls to postinst and postrm. + +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); + +foreach $PACKAGE (@{$dh{DOPACKAGES}}) { + $TMP=tmpdir($PACKAGE); + $xaw=pkgfile($PACKAGE,'xaw'); + + if ($xaw ne '') { + if (! -d "$TMP/usr/lib/xaw-wrappers/conf") { + doit("install","-d","$TMP/usr/lib/xaw-wrappers/conf"); + } + doit("install","-p","-m644",$xaw, + "$TMP/usr/lib/xaw-wrappers/conf/$PACKAGE"); + + if (! $dh{NOSCRIPTS}) { + autoscript($PACKAGE,"postinst","postinst-xaw"); + autoscript($PACKAGE,"postrm","postrm-xaw"); + } + } +} diff --git a/dh_installxaw.1 b/dh_installxaw.1 new file mode 100644 index 00000000..19f47423 --- /dev/null +++ b/dh_installxaw.1 @@ -0,0 +1,40 @@ +.TH DH_INSTALLXAW 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_installxaw \- install xaw wrappers config files into package build directories +.SH SYNOPSIS +.B dh_installxaw +.I "[debhelper options] [-n]" +.SH "DESCRIPTION" +dh_installxaw is a debhelper program that is responsible for installing +xaw wrappers config files into package build directories. +.P +It also automatically generates the postinst and postrm commands needed to +interface with the debian xaw-wrappers package. See +.BR dh_installdeb (1) +for an explanation of how this works. +.P +If a file named debian/package.xaw exists, then it is installed into +usr/lib/xaw-wrappers/conf/package in the package build directory. +.P +For the first first binary package listed in the control file, you may use +debian/xaw instead. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-n, \--noscripts +Do not modify postinst/postrm scripts. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.TP +.BR update-xaw-wrappers (8) +.SH AUTHOR +Joey Hess <joeyh@master.debian.org> diff --git a/dh_link b/dh_link new file mode 100755 index 00000000..8d4c32ad --- /dev/null +++ b/dh_link @@ -0,0 +1,70 @@ +#!/usr/bin/perl -w +# +# Generate symlinks in debian packages, reading debian/links. The +# file contains pairs of files and symlinks. + +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); + +foreach $PACKAGE (@{$dh{DOPACKAGES}}) { + $TMP=tmpdir($PACKAGE); + $file=pkgfile($PACKAGE,"links"); + + undef @links; + if ($file) { + @links=filearray($file); + } + + # Make sure it has pairs of symlinks and destinations. If it + # doesn't, $#links will be _odd_ (not even, -- it's zero-based). + if (int($#links/2) eq $#links/2) { + error("$file lists a link without a destination."); + } + + if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) { + push @links, @ARGV; + } + + # Same test as above, including arguments this time. + if (int($#links/2) eq $#links/2) { + error("parameters list a link without a destination."); + } + + # Now I'd prefer to work with a hash. + %links=@links; + + foreach $src (keys %links) { + $dest=$links{$src}; + + # Make sure the directory the link will be in exists. + $basedir=Dh_Lib::dirname("$TMP/$dest"); + if (! -e $basedir) { + doit("install","-d",$basedir); + } + + # Policy says that if the link is all within one toplevel + # directory, it should be relative. If it's between + # top level directories, leave it absolute. + @src_dirs=split(m:/+:,$src); + @dest_dirs=split(m:/+:,$dest); + if ($src_dirs[0] eq $dest_dirs[0]) { + # Figure out how much of a path $src and $dest + # share in common. + for ($x=0; $x<$#src_dirs && $src_dirs[$x] eq $dest_dirs[$x]; $x++) {} + + # Build up the new src. + $src=""; + for (1..$#dest_dirs - $x) { + $src.="../"; + } + # The + 1 is here to include the actual filename. + for (1..$#src_dirs - $x + 1) { + $src.=$src_dirs[$_]."/"; + } + $src=~s:/$::; + } + + doit("ln","-sf",$src,"$TMP/$dest"); + } +} diff --git a/dh_link.1 b/dh_link.1 new file mode 100644 index 00000000..5a3fbbc2 --- /dev/null +++ b/dh_link.1 @@ -0,0 +1,75 @@ +.TH DH_LINK 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_link \- create symlinks in package build directories +.SH SYNOPSIS +.B dh_link +.I "[debhelper options] [-A] [source destination ...]" +.SH "DESCRIPTION" +dh_link is a debhelper program that creates symlinks in package build +directories. +.P +dh_link accepts a list of pairs of source and destination files. The source +files are the already existing files that will be symlinked from. The +destination files are the symlinks that will be created. There +.B must +be an equal number of source and destination files specified. +.P +The list can be specified in two ways. A file named debian/package.links +(debian/links may be used for the first binary package in debian/control) +can list pairs of files. If you use this file, you should put each pair +of files on its own line, and separate the files within the pair with +whitespace. Also, pairs of files can be specified as parameters - these +pairs will only be created in the package build directory of the first +ackage dh_link is told to act on. By default, this is the first binary +package in debian/control, but if you use -p, -i, or -a flags, it will be +the first package specified by those flags. +.P +Be sure to only use file names relative to the package build +directory. Ie, "/usr/bin/foo" should not be used, use "usr/bin/foo" instead. +Also, be sure you +.B do +specify the full filename to both the source and destination files (unlike +you would do if you were using something like +.BR ln (1) +) +.P +dh_link will generate symlinks that comply with debian policy - absolute +when policy says they should be absolute, and relative links with as short a +path as possible. It will also create any subdirectories it needs to to put +the symlinks in. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B \-A, \--all +Create any links specified by command line parameters in ALL packages +acted on, not just the first. +.TP +.B source destination ... +Create a file named "destination" as a link to a file named "source". Do +this in the package build directory of the first package acted on. +(Or in all packages if -A is specified.) +.SH EXAMPLES +.TP +.B dh_link usr/man/man1/foo.1 usr/man/man1/bar.1 +Make bar.1 be a symlink to foo.1 +.TP +.B dh_link var/lib/foo usr/lib/foo usr/X11R6/man/man1/foo.1x usr/man/man1/bar.1 +Make /usr/lib/foo/ be a link to /var/lib/foo/, and bar.1 be a symlink to the +X man page foo.1x +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.BR debhelper (1) +.SH BUGS +It's impossible to specify filenames with spaces or other whitespace in them +in debian/links file. This is more a historical design flaw than a bug. +.SH "CONFORMS TO" +Debian policy, version 2.5.0.0 +.SH AUTHOR +Joey Hess <joeyh@master.debian.org> diff --git a/dh_listpackages b/dh_listpackages new file mode 100755 index 00000000..7a764af5 --- /dev/null +++ b/dh_listpackages @@ -0,0 +1,8 @@ +#!/usr/bin/perl -w +# +# Output a list of all packages debhelper will act on. + +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); +print join("\n",@{$dh{DOPACKAGES}})."\n"; diff --git a/dh_listpackages.1 b/dh_listpackages.1 new file mode 100644 index 00000000..aa4e7419 --- /dev/null +++ b/dh_listpackages.1 @@ -0,0 +1,25 @@ +.TH DH_LISTPACKAGES 1 "" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_listpackages \- list binary packages debhelper will act on +.SH SYNOPSIS +.B dh_listpackages +.I "[debhelper options]" +.SH "DESCRIPTION" +dh_listpackages is a debhelper program that outputs a list of all binary +packages debhelper commands will act on. If you pass it some options, it +will change the list to match the packages other debhelper commands would +act on if passed the same options. +.SH OPTIONS +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.BR debhelper (1) +.SH AUTHOR +Joey Hess <joeyh@master.debian.org> diff --git a/dh_perl.1 b/dh_perl.1 new file mode 100644 index 00000000..f1277b0b --- /dev/null +++ b/dh_perl.1 @@ -0,0 +1,44 @@ +.TH DH_PERLCHECK 1 "22 June 1999" "Debhelper Commands" "Debhelper Commands" +.SH NAME +dh_perl \- calculates perl scripts & modules dependencies +.SH SYNOPSIS +.B dh_perl +.I "[debhelper options] [-k]" +.SH "DESCRIPTION" +dh_perl is a debhelper program that is responsible for generating +the perl:Depends substitutions and adding them to substvars files. +.P +The program will look for the location of installed modules and will +use this information to generate a dependency (at the present time +it can only be perl5, perl5-thread, perl-5.00X or perl-5.00X-thread). +.P +It will also look at #! lines of perl scripts in order to be able +to calculate a dependency for perl scripts and not only perl modules. +.P +In addition it will automatically remove .packlist file and will +remove the directory in which it was if it's empty. You can +switch off this option by passing -k. +.SH OPTIONS +.TP +.TP +.B debhelper options +See +.BR debhelper (1) +for a list of options common to all debhelper commands. +.TP +.B -k +Keep .packlist files. +.SH ENVIRONMENT +See +.BR debhelper (1) +for a list of environment variables that affect all debhelper commands. +.SH "SEE ALSO" +.TP +.BR debhelper (1) +.SH "CONFORMS TO" +.P +Debian policy, version 2.5.0.0 +.P +Perl policy, version 1.0 +.SH AUTHOR +Raphaël Hertzog <hertzog@debian.org> diff --git a/examples/rules b/examples/rules index 8756505e..4573ebf8 100755 --- a/examples/rules +++ b/examples/rules @@ -69,4 +69,4 @@ source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary +.PHONY: build clean binary-indep binary-arch binary install diff --git a/examples/rules.multi b/examples/rules.multi index 04732edb..77714982 100755 --- a/examples/rules.multi +++ b/examples/rules.multi @@ -91,4 +91,4 @@ source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary +.PHONY: build clean binary-indep binary-arch binary install diff --git a/pgptemp.$00 b/pgptemp.$00 new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pgptemp.$00 |