From owner-svn-doc-head@FreeBSD.ORG Sun Feb 9 03:37:58 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80041BA3; Sun, 9 Feb 2014 03:37:58 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 699E41E02; Sun, 9 Feb 2014 03:37:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s193bwPO068485; Sun, 9 Feb 2014 03:37:58 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s193bwsO068484; Sun, 9 Feb 2014 03:37:58 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201402090337.s193bwsO068484@svn.freebsd.org> From: Warren Block Date: Sun, 9 Feb 2014 03:37:58 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43848 - 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-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 03:37:58 -0000 Author: wblock Date: Sun Feb 9 03:37:57 2014 New Revision: 43848 URL: http://svnweb.freebsd.org/changeset/doc/43848 Log: Whitespace-only fixes, translators please ignore. 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 Sun Feb 9 03:26:08 2014 (r43847) +++ head/en_US.ISO8859-1/books/porters-handbook/pkg-files/chapter.xml Sun Feb 9 03:37:57 2014 (r43848) @@ -5,211 +5,206 @@ $FreeBSD$ --> - + + + The <filename>pkg-*</filename> Files + + There are some tricks we have not mentioned yet about the + pkg-* files that come in handy + sometimes. + + + <filename>pkg-message</filename> + + If you need to display a message to the installer, you may + 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 + 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 + command pipelining: - The <filename>pkg-*</filename> - Files - - There are some tricks we have not mentioned yet about the - pkg-* files - that come in handy sometimes. - - - <filename>pkg-message</filename> - - If you need to display a message to the installer, you may - 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 - 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 - command pipelining: - - update-etc-shells: + update-etc-shells: @${ECHO_MSG} "updating /etc/shells" @${CP} /etc/shells /etc/shells.bak @( ${GREP} -v ${PREFIX}/bin/bash /etc/shells.bak; \ ${ECHO_CMD} ${PREFIX}/bin/bash) >/etc/shells @${RM} /etc/shells.bak - - The pkg-message file does not need - to be added to pkg-plist. - - - - - <filename>pkg-install</filename> - - If your 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 ${PKGNAME} - PRE-INSTALL and the second time as - ${SH} pkg-install ${PKGNAME} - POST-INSTALL. $2 can be - tested to determine which mode the script is being run in. - The PKG_PREFIX environmental variable will be - set to the package installation directory. - - - This script is not run automatically if you install the - port with make install. If you are - depending on it being run, you will have to explicitly call - it from your port's Makefile, with a - line like PKG_PREFIX=${PREFIX} ${SH} - ${PKGINSTALL} ${PKGNAME} - PRE-INSTALL. - - - - - <filename>pkg-deinstall</filename> - - This script executes when a package is removed. - - This script will be run twice by pkg - delete The first time as ${SH} - pkg-deinstall ${PKGNAME} DEINSTALL and the - second time as ${SH} pkg-deinstall - ${PKGNAME} POST-DEINSTALL. - - - - Changing the Names of - <filename>pkg-*</filename> - Files - - 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-* files - among several ports or have to write to one of the above files - (see writing to places other - than WRKDIR for why it is a bad - idea to write directly into the - pkg-* - subdirectory). - - Here is a list of variable names and their default values. - (PKGDIR defaults to - ${MASTERDIR}.) - - - - - - Variable - Default value - - - - - - DESCR - ${PKGDIR}/pkg-descr - - - - PLIST - ${PKGDIR}/pkg-plist - - - - PKGINSTALL - ${PKGDIR}/pkg-install - - - - PKGDEINSTALL - ${PKGDIR}/pkg-deinstall - - - - PKGMESSAGE - ${PKGDIR}/pkg-message - - - - - - Please change these variables rather than overriding - PKG_ARGS. If you change - PKG_ARGS, those files will not correctly be - installed in /var/db/pkg upon install - from a port. - - - - Making Use of <varname>SUB_FILES</varname> and - <varname>SUB_LIST</varname> - - The SUB_FILES and - SUB_LIST variables are useful for dynamic - values in port files, such as the installation - PREFIX in - pkg-message. - - The SUB_FILES variable specifies a list - of files to be automatically modified. Each - file in the - SUB_FILES list must have a corresponding - file.in - present in FILESDIR. A modified version - will be created in WRKDIR. Files defined - as a value of USE_RC_SUBR (or the - deprecated USE_RCORDER) are automatically - added to the 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 - VALUE in each file listed in - SUB_FILES. Several common pairs are - automatically defined: PREFIX, - LOCALBASE, DATADIR, - DOCSDIR, EXAMPLESDIR, - WWWDIR, and ETCDIR. - Any line beginning with @comment will be - deleted from resulting files after a variable - substitution. - - The following example will replace - %%ARCH%% with the system architecture in a - pkg-message: + + The pkg-message file does not need + to be added to pkg-plist. + + + + + <filename>pkg-install</filename> + + If your 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 ${PKGNAME} + PRE-INSTALL and the second time as + ${SH} pkg-install ${PKGNAME} + POST-INSTALL. $2 can be + tested to determine which mode the script is being run in. + The PKG_PREFIX environmental variable will be + set to the package installation directory. + + + This script is not run automatically if you install the + port with make install. If you are + depending on it being run, you will have to explicitly call + it from your port's Makefile, with a + line like PKG_PREFIX=${PREFIX} ${SH} + ${PKGINSTALL} ${PKGNAME} + PRE-INSTALL. + + + + + <filename>pkg-deinstall</filename> + + This script executes when a package is removed. + + This script will be run twice by + pkg delete The first time as + ${SH} pkg-deinstall ${PKGNAME} + DEINSTALL and the second time as + ${SH} pkg-deinstall + ${PKGNAME} POST-DEINSTALL. + + + + Changing the Names of + <filename>pkg-*</filename> Files + + 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-* + files among several ports or have to write to one of the above + files (see writing to places + other than WRKDIR for why it is a + bad idea to write directly into the pkg-* + subdirectory). + + Here is a list of variable names and their default values. + (PKGDIR defaults to + ${MASTERDIR}.) + + + + + + Variable + Default value + + + + + + DESCR + ${PKGDIR}/pkg-descr + + + + PLIST + ${PKGDIR}/pkg-plist + + + + PKGINSTALL + ${PKGDIR}/pkg-install + + + + PKGDEINSTALL + ${PKGDIR}/pkg-deinstall + + + + PKGMESSAGE + ${PKGDIR}/pkg-message + + + + + + Please change these variables rather than overriding + PKG_ARGS. If you change + PKG_ARGS, those files will not correctly be + installed in /var/db/pkg upon install + from a port. + + + + Making Use of <varname>SUB_FILES</varname> and + <varname>SUB_LIST</varname> + + The SUB_FILES and + SUB_LIST variables are useful for dynamic + values in port files, such as the installation + PREFIX in + pkg-message. + + The SUB_FILES variable specifies a list + of files to be automatically modified. Each + file in the + SUB_FILES list must have a corresponding + file.in present in + FILESDIR. A modified version will be created + in WRKDIR. Files defined as a value of + USE_RC_SUBR (or the deprecated + USE_RCORDER) are automatically added to the + 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 + VALUE in each file listed in + SUB_FILES. Several common pairs are + automatically defined: PREFIX, + LOCALBASE, DATADIR, + DOCSDIR, EXAMPLESDIR, + WWWDIR, and ETCDIR. Any + line beginning with @comment will be deleted + from resulting files after a variable substitution. + + The following example will replace + %%ARCH%% with the system architecture in a + pkg-message: - SUB_FILES= pkg-message + SUB_FILES= pkg-message SUB_LIST= ARCH=${ARCH} - Note that for this example, the - pkg-message.in file must exist in - FILESDIR. + Note that for this example, the + pkg-message.in file must exist in + FILESDIR. - Example of a good - pkg-message.in: + Example of a good + pkg-message.in: - Now it is time to configure this package. + Now it is time to configure this package. Copy %%PREFIX%%/share/examples/putsy/%%ARCH%%.conf into your home directory as .putsy.conf and edit it. - - - + +