Describe ${WRKDIRPREFIX}. Tell people not to write to anywhere other than
under ${WRKDIR}. Mention that files under ${PKGDIR} are all defined using variables.
This commit is contained in:
parent
61726cf09c
commit
8d01b74d15
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=3910
1 changed files with 56 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
<!-- $Id: porting.sgml,v 1.118 1998-11-26 23:56:54 asami Exp $ -->
|
||||
<!-- $Id: porting.sgml,v 1.119 1998-12-12 07:09:09 asami Exp $ -->
|
||||
<!-- The FreeBSD Documentation Project -->
|
||||
|
||||
<sect><heading>Making a port yourself<label id="porting"></heading>
|
||||
|
@ -1586,6 +1586,35 @@ PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}
|
|||
the resulting file, do so in <tt/post-install/ to a file
|
||||
named <tt/${TMPPLIST}/.
|
||||
|
||||
<sect2>
|
||||
<heading>Changing the names of files in the <tt/pkg/ subdirectory<label
|
||||
id="porting:pkgsubdir"></heading>
|
||||
<p>All the filenames in the <tt/pkg/ subdirectory are defined
|
||||
using variables so you can change them in your Makefile if
|
||||
need be. This is expecially useful when you are sharing the
|
||||
same <tt/pkg/ subdirectory among several ports or have to
|
||||
write to one of the above files (see <ref
|
||||
id="porting:wrkdir" name="writing to places other than
|
||||
WRKDIR"> for why it is a bad idea to write directry into the
|
||||
<tt/pkg/ subdirectory).
|
||||
|
||||
<p>Here is a list of variable names and their default values.
|
||||
|
||||
<tscreen><verb>
|
||||
COMMENT ${PKGDIR}/COMMENT
|
||||
DESCR ${PKGDIR}/DESCR
|
||||
PLIST ${PKGDIR}/PLIST
|
||||
PKGINSTALL ${PKGDIR}/INSTALL
|
||||
PKGDEINSTALL ${PKGDIR}/DEINSTALL
|
||||
PKGREQ ${PKGDIR}/REQ
|
||||
PKGMESSAGE ${PKGDIR}/MESSAGE
|
||||
</verb></tscreen>
|
||||
|
||||
<p>Please change these variables rather than overriding
|
||||
<tt>PKG_ARGS</tt>. If you change <tt>PKG_ARGS</tt>, those
|
||||
files will not correctly be installed in
|
||||
<tt>/var/db/pkg</tt> upon install from a port.
|
||||
|
||||
<sect1>
|
||||
<heading>Licensing Problems</heading>
|
||||
|
||||
|
@ -1714,6 +1743,32 @@ PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION}
|
|||
the appropriate flags. See below for an example on how to
|
||||
use them.
|
||||
|
||||
<sect2>
|
||||
<heading><tt/WRKDIR/<label id="porting:wrkdir"></heading>
|
||||
<p>Do not write anything to files outside <tt/WKRDIR/.
|
||||
<tt/WRKDIR/ is the only place that is guaranteed to be
|
||||
writable during the port build (see <ref id="ports:cd"
|
||||
name="compiling ports frem CDROM"> for an example of
|
||||
building ports from a read-only tree). If you need to
|
||||
modify some file in <tt>${PKGDIR}</tt>, do so by <ref
|
||||
id="porting:pkgsubdir" name="redefining a variable">, not by
|
||||
writing over it.
|
||||
|
||||
<sect2>
|
||||
<heading><tt/WRKDIRPREFIX/</heading>
|
||||
<p>Make sure your port honors <tt/WRKDIRPREFIX/. (Most ports
|
||||
don't have to worry about this.) In particular, if you are
|
||||
referring to a <tt>${WRKDIR}</tt> of another port,
|
||||
note that the correct location is
|
||||
<tt>${WRKDIRPREFIX}${PORTSDIR}/subdir/name/work</tt>,
|
||||
not <tt>${PORTSDIR}/subdir/name/work</tt> or
|
||||
<tt>${.CURDIR}/../../subdir/name/work</tt> or some
|
||||
such.
|
||||
|
||||
<p>Also, if you are defining <tt/WRKDIR/ yourself, make sure
|
||||
you prepend <tt>${WRKDIRPREFIX}${.CURDIR}</tt>
|
||||
in the front.
|
||||
|
||||
<sect2>
|
||||
<heading>Differentiating operating systems and OS versions<label
|
||||
id="porting:versions"></heading>
|
||||
|
|
Loading…
Reference in a new issue