From owner-svn-doc-all@FreeBSD.ORG Tue Sep 9 15:51:33 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2663182; Tue, 9 Sep 2014 15:51:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B191DDE9; Tue, 9 Sep 2014 15:51:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s89FpXLO036193; Tue, 9 Sep 2014 15:51:33 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s89FpXi6036192; Tue, 9 Sep 2014 15:51:33 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201409091551.s89FpXi6036192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Tue, 9 Sep 2014 15:51:33 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r45579 - head/en_US.ISO8859-1/books/porters-handbook/pkg-files X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2014 15:51:33 -0000 Author: mat (ports committer) Date: Tue Sep 9 15:51:33 2014 New Revision: 45579 URL: http://svnweb.freebsd.org/changeset/doc/45579 Log: igor -Ry and some other rewording and fixes. Differential Revision: https://reviews.freebsd.org/D645 Reviewed by: wblock Sponsored by: Absolight Modified: head/en_US.ISO8859-1/books/porters-handbook/pkg-files/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/pkg-files/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/pkg-files/chapter.xml Tue Sep 9 15:40:40 2014 (r45578) +++ head/en_US.ISO8859-1/books/porters-handbook/pkg-files/chapter.xml Tue Sep 9 15:51:33 2014 (r45579) @@ -9,7 +9,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="pkg-files"> - The <filename>pkg-*</filename> Files + <filename>pkg-*</filename> There are some tricks we have not mentioned yet about the pkg-* files that @@ -18,19 +18,19 @@ <filename>pkg-message</filename> - If you need to display a message to the installer, you may + To display a message when the package is installed, place the message in pkg-message. This capability is often useful to display additional installation steps to be taken after a pkg install or to display licensing information. When some lines about the build-time knobs or warnings - have to be displayed, use ECHO_MSG. The - pkg-message file is only for + have to be displayed, use ECHO_MSG. + pkg-message is only for post-installation steps. Likewise, the distinction between - ECHO_MSG and ECHO_CMD - should be kept in mind. The former is for printing - informational text to the screen, while the latter is for + ECHO_MSG is for printing + informational text to the screen and ECHO_CMD + is for command pipelining: update-etc-shells: @@ -41,22 +41,22 @@ @${RM} /etc/shells.bak - The pkg-message file does not need - to be added to pkg-plist. + Do not add an entry for pkg-message + in pkg-plist. <filename>pkg-install</filename> - If your port needs to execute commands when the binary + If the port needs to execute commands when the binary package is installed with pkg add or - pkg install you can do this via the - pkg-install script. This script will - automatically be added to the package, and will be run twice by - pkg the first time as ${SH} + pkg install, use + pkg-install. This script will + automatically be added to the package. It will be run twice by + pkg, the first time as ${SH} pkg-install ${PKGNAME} PRE-INSTALL before the - package is installed and the second time as + package is installed, and the second time as ${SH} pkg-install ${PKGNAME} POST-INSTALL after it has been installed. $2 can be tested to determine which @@ -84,21 +84,21 @@ Changing the Names of - <filename>pkg-<replaceable>*</replaceable></filename> - Files + pkg-* All the names of - pkg-* files are - defined using variables so you can change them in your - Makefile if need be. This is especially - useful when you are sharing the same + pkg-* are + defined using variables that can be changed in the + Makefile if needed. This is especially + useful when sharing the same pkg-* files - among several ports or have to write to one of the above files - (see writing to places other than + among several ports or when it is necessary to write to one of these files. + See writing to places other than WRKDIR for why it is a bad idea to - write directly into the + write directly into + the directory containing the pkg-* - subdirectory). + files. Here is a list of variable names and their default values. (PKGDIR defaults to @@ -147,13 +147,13 @@ Making Use of <varname>SUB_FILES</varname> and <varname>SUB_LIST</varname> - The SUB_FILES and - SUB_LIST variables are useful for dynamic + SUB_FILES and + SUB_LIST are useful for dynamic values in port files, such as the installation PREFIX in pkg-message. - The SUB_FILES variable specifies a list + SUB_FILES specifies a list of files to be automatically modified. Each file in the SUB_FILES list must have a corresponding @@ -163,16 +163,16 @@ ${WRKDIR}/file. Files defined as a value of USE_RC_SUBR (or the deprecated USE_RCORDER) are automatically - added to the SUB_FILES. For the files + added to SUB_FILES. For the files pkg-message, pkg-install, and pkg-deinstall, the corresponding Makefile variable is automatically set to point to the processed version. - The SUB_LIST variable is a list of - VAR=VALUE pairs. For each pair - %%VAR%% will get replaced with + SUB_LIST is a list of + VAR=VALUE pairs. For each pair, + %%VAR%% will be replaced with VALUE in each file listed in SUB_FILES. Several common pairs are automatically defined: PREFIX, @@ -182,15 +182,15 @@ line beginning with @comment will be deleted from resulting files after a variable substitution. - The following example will replace + This example replaces %%ARCH%% with the system architecture in a pkg-message: SUB_FILES= pkg-message SUB_LIST= ARCH=${ARCH} - Note that for this example, the - pkg-message.in file must exist in + Note that for this example, + pkg-message.in must exist in FILESDIR. Example of a good