X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_usrlocal;h=e92d909ce73bade7c330bc3ce11483b1b91b0186;hb=e2a6d4cec4a7ee952cf6a7f250d80f1d75a38f95;hp=edfc0aa1510fd10ef504ebf9283026dfcbd04f3c;hpb=1b4a4bb37859d047d31e36fca733e7828377fd85;p=debhelper.git diff --git a/dh_usrlocal b/dh_usrlocal index edfc0aa..e92d909 100755 --- a/dh_usrlocal +++ b/dh_usrlocal @@ -18,22 +18,23 @@ B [S>] [B<-n>] =head1 DESCRIPTION -dh_usrlocal is a debhelper program that can be used for building packages -that will provide a subdirectory in /usr/local when installed. +B is a debhelper program that can be used for building packages +that will provide a subdirectory in F when installed. -It finds subdirectories of usr/local in the package build directory, and +It finds subdirectories of F in the package build directory, and removes them, replacing them with maintainer script snippets (unless B<-n> is used) to create the directories at install time, and remove them when -the package is removed, in a manner compliant with Debian policy. See -L for an explanation of Debhelper maintainer script +the package is removed, in a manner compliant with Debian policy. These +snippets are inserted into the maintainer scripts by B. See +L for an explanation of debhelper maintainer script snippets. If the directories found in the build tree have unusual owners, groups, or permissions, then those values will be preserved in the directories made by -the postinst script. However, as a special exception, if a directory is owned +the F script. However, as a special exception, if a directory is owned by root.root, it will be treated as if it is owned by root.staff and is mode 2775. This is useful, since that is the group and mode policy recommends for -directories in /usr/local. +directories in F. =head1 OPTIONS @@ -47,7 +48,7 @@ Do not modify F/F scripts. =head1 NOTES -Note that this command is not idempotent. "dh_clean -k" should be called +Note that this command is not idempotent. L should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. @@ -99,13 +100,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) { # This constructs the body of a 'sed' c\ expression which # is parsed by the shell in double-quotes my $dirs = join("$ebs\n", @dirs); - pop @justdirs; # don't remove directories in /usr/local + pop @justdirs; # don't remove directories directly in /usr/local my $justdirs = join("$ebs\n", @justdirs); if (! $dh{NOSCRIPTS}) { autoscript($package,"postinst", "postinst-usrlocal", "/#DIRS#/ c${ebs}\n${dirs}"); autoscript($package,"prerm", "prerm-usrlocal", - "/#JUSTDIRS#/ c${ebs}\n${justdirs}"); + "/#JUSTDIRS#/ c${ebs}\n${justdirs}") if length $justdirs; } } }