diff options
author | jlam <jlam@pkgsrc.org> | 2002-09-19 10:20:50 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-09-19 10:20:50 +0000 |
commit | 072abe06cfd97e2b0e3187022d17bb237c3d6f05 (patch) | |
tree | 1bffb7e44941a43dbc7920874e34fb0904faac38 /mk | |
parent | 5c053dd06ad27d113b1bf46e8eecd3cf6f7ed7c6 (diff) | |
download | pkgsrc-072abe06cfd97e2b0e3187022d17bb237c3d6f05.tar.gz |
Restore the ability to not automatically install the rc.d script into
/etc/rc.d. This is controlled by the new variable PKG_RCD_SCRIPTS which
may be set in /etc/mk.conf or in the shell environment in which the
INSTALL script is executed. PKG_RCD_SCRIPTS only takes effect if
${PKG_CONFIG} == "YES" and defaults to NO.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.install.mk | 8 | ||||
-rw-r--r-- | mk/install/header | 11 | ||||
-rw-r--r-- | mk/install/install | 8 |
3 files changed, 22 insertions, 5 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk index 55aa5a12240..67ec1bdc45d 100644 --- a/mk/bsd.pkg.install.mk +++ b/mk/bsd.pkg.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.install.mk,v 1.26 2002/09/19 09:02:40 jlam Exp $ +# $NetBSD: bsd.pkg.install.mk,v 1.27 2002/09/19 10:20:50 jlam Exp $ # # This Makefile fragment is included by package Makefiles to use the common # INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply: @@ -179,13 +179,19 @@ FILES_SUBST+= OWN_DIRS_PERMS=${OWN_DIRS_PERMS:Q} # directories needed to use the package. It is either YES or NO # and defaults to YES. # +# PKG_RCD_SCRIPTS indicates whether to automatically install rc.d scripts +# to ${RCD_SCRIPTS_DIR}. It is either YES or NO and defaults to +# NO. This variable only takes effect if ${PKG_CONFIG} == "YES". +# # These values merely set the defaults for INSTALL/DEINSTALL scripts, but # they may be overridden by resetting them in the environment. # PKG_CREATE_USERGROUP?= YES PKG_CONFIG?= YES +PKG_RCD_SCRIPTS?= NO FILES_SUBST+= PKG_CREATE_USERGROUP=${PKG_CREATE_USERGROUP} FILES_SUBST+= PKG_CONFIG=${PKG_CONFIG} +FILES_SUBST+= PKG_RCD_SCRIPTS=${PKG_RCD_SCRIPTS} # Substitute for various programs used in the DEINSTALL/INSTALL scripts and # in the rc.d scripts. diff --git a/mk/install/header b/mk/install/header index 27f1b63490d..2988850292f 100644 --- a/mk/install/header +++ b/mk/install/header @@ -2,7 +2,7 @@ # # start of header # -# $NetBSD: header,v 1.13 2002/08/22 08:21:32 jlam Exp $ +# $NetBSD: header,v 1.14 2002/09/19 10:20:51 jlam Exp $ PKGNAME=$1 STAGE=$2 @@ -84,4 +84,13 @@ case "${PKG_CONFIG:-@PKG_CONFIG@}" in ;; esac +case "${PKG_RCD_SCRIPTS:-@PKG_RCD_SCRIPTS@}" in +[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + _PKG_RCD_SCRIPTS=YES + ;; +[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + _PKG_RCD_SCRIPTS=NO + ;; +esac + # end of header diff --git a/mk/install/install b/mk/install/install index d5432efb38e..a98cf1aaa16 100644 --- a/mk/install/install +++ b/mk/install/install @@ -1,6 +1,6 @@ # start of install # -# $NetBSD: install,v 1.12 2002/08/22 08:21:32 jlam Exp $ +# $NetBSD: install,v 1.13 2002/09/19 10:20:51 jlam Exp $ case ${STAGE} in PRE-INSTALL) @@ -181,7 +181,8 @@ EOF if [ -n "${CONF_FILES}" -o \ -n "${CONF_FILES_PERMS}" -o \ -n "${SUPPORT_FILES}" -o \ - -n "${SUPPORT_FILES_PERMS}" -o \ + -n "${SUPPORT_FILES_PERMS}" ] || \ + [ "${_PKG_RCD_SCRIPTS}" = "YES" -a \ -n "${RCD_SCRIPTS}" ]; then ${CAT} << EOF Installing configuration files for ${PKGNAME}: @@ -299,7 +300,8 @@ EOF samplefile="${RCD_SCRIPTS_EXAMPLEDIR}/${script}" file="${RCD_SCRIPTS_DIR}/${script}" - if [ "${_PKG_CONFIG}" = "NO" ]; then + if [ "${_PKG_CONFIG}" = "NO" -o \ + "${_PKG_RCD_SCRIPTS}" = "NO" ]; then if [ ${_print_line} -gt 0 ]; then _print_line=0 ${CAT} << EOF |