.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "DH_USRLOCAL 1"
.TH DH_USRLOCAL 1 "2021-03-06" "13.3.4" "Debhelper"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
dh_usrlocal \- migrate usr/local directories to maintainer scripts
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBdh_usrlocal\fR [\fIdebhelper options\fR] [\fB\-n\fR]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBdh_usrlocal\fR is a debhelper program that can be used for building packages
that will provide a subdirectory in \fI/usr/local\fR when installed.
.PP
It finds subdirectories of \fIusr/local\fR in the package build directory, and
removes them, replacing them with maintainer script snippets (unless \fB\-n\fR
is used) to create the directories at install time, and remove them when
the package is removed, in a manner compliant with Debian policy. These
snippets are inserted into the maintainer scripts by \fBdh_installdeb\fR. See
\&\fBdh_installdeb\fR\|(1) for an explanation of debhelper maintainer script
snippets.
.PP
When the \fI\s-1DEB_RULES_REQUIRES_ROOT\s0\fR environment variable is not (effectively)
\&\fIbinary-targets\fR, the directories in \fI/usr/local\fR will be handled as if
they were owned by root:root (see below).
.PP
When the \fI\s-1DEB_RULES_REQUIRES_ROOT\s0\fR environment variable has an effective value of
\&\fIbinary-targets\fR, the owners, groups and permissions will be
preserved with the sole exception where the directory is owned by root:root.
.PP
If a directory is owned by root:root, then ownership will be determined
at install time.  The ownership and permission bits will either be root:root
mode 0755 or root:staff mode 02775.  The actual choice depends on whether
the system has \fI/etc/staff\-group\-for\-usr\-local\fR (as documented in the Debian
Policy Manual ยง9.1.2 since version 4.1.4)
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fB\-n\fR, \fB\-\-no\-scripts\fR" 4
.IX Item "-n, --no-scripts"
Do not modify \fIpostinst\fR/\fIprerm\fR scripts.
.SH "NOTES"
.IX Header "NOTES"
Note that this command is not idempotent. \fBdh_prep\fR\|(1) should be called
between invocations of this command. Otherwise, it may cause multiple
instances of the same text to be added to maintainer scripts.
.SH "CONFORMS TO"
.IX Header "CONFORMS TO"
Debian policy, version 2.2
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBdebhelper\fR\|(7)
.PP
This program is a part of debhelper.
.SH "AUTHOR"
.IX Header "AUTHOR"
Andrew Stribblehill <ads@debian.org>