diff options
author | jmmv <jmmv@pkgsrc.org> | 2003-07-31 10:36:03 +0000 |
---|---|---|
committer | jmmv <jmmv@pkgsrc.org> | 2003-07-31 10:36:03 +0000 |
commit | 38dd4422e2bcae03d27570dd3e689e2b1ac80ecf (patch) | |
tree | a0e0247417ea3b6a69dc07185ebd98d1da256021 /mk/bsd.pkg.install.mk | |
parent | 28c5acf8d2d36fd46283a3355f53595abf87d521 (diff) | |
download | pkgsrc-38dd4422e2bcae03d27570dd3e689e2b1ac80ecf.tar.gz |
Let a package override the name of the automatically generated rc.d script
files inside the WRKDIR. This is done by setting RCD_SCRIPT_WRK.<name> to
the requested filename, like:
RCD_SCRIPT_WRK.foobar= ${WRKDIR}/foobar.sh
This fixes a problem (rc.d script not beeing generated) when there is a name
conflict in the WRKDIR (i.e., the file already exists or WRKSRC has the same
basename).
Diffstat (limited to 'mk/bsd.pkg.install.mk')
-rw-r--r-- | mk/bsd.pkg.install.mk | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk index 8d40a609be6..a72babae72c 100644 --- a/mk/bsd.pkg.install.mk +++ b/mk/bsd.pkg.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.install.mk,v 1.42 2003/07/30 10:31:20 jlam Exp $ +# $NetBSD: bsd.pkg.install.mk,v 1.43 2003/07/31 10:36:03 jmmv Exp $ # # This Makefile fragment is included by package Makefiles to use the common # INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply: @@ -324,26 +324,27 @@ install-rcd-scripts: # do nothing .for _script_ in ${RCD_SCRIPTS} RCD_SCRIPT_SRC.${_script_}?= ${FILESDIR}/${_script_}.sh +RCD_SCRIPT_WRK.${_script_}?= ${WRKDIR}/${_script_} . if !empty(RCD_SCRIPT_SRC.${_script_}) . if exists(${RCD_SCRIPT_SRC.${_script_}}) -generate-rcd-scripts: ${WRKDIR}/${_script_} -${WRKDIR}/${_script_}: ${RCD_SCRIPT_SRC.${_script_}} +generate-rcd-scripts: ${RCD_SCRIPT_WRK.${_script_}} +${RCD_SCRIPT_WRK.${_script_}}: ${RCD_SCRIPT_SRC.${_script_}} ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} | \ ${SED} ${FILES_SUBST_SED} > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} install-rcd-scripts: install-rcd-${_script_} -install-rcd-${_script_}: ${WRKDIR}/${_script_} +install-rcd-${_script_}: ${RCD_SCRIPT_WRK.${_script_}} ${_PKG_SILENT}${_PKG_DEBUG} \ if [ ! -d ${RCD_SCRIPTS_EXAMPLEDIR} ]; then \ ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} \ -m 0755 ${RCD_SCRIPTS_EXAMPLEDIR}; \ fi ${_PKG_SILENT}${_PKG_DEBUG} \ - if [ -f ${WRKDIR}/${_script_} ]; then \ - ${INSTALL_SCRIPT} ${WRKDIR}/${_script_} \ - ${RCD_SCRIPTS_EXAMPLEDIR}; \ + if [ -f ${RCD_SCRIPT_WRK.${_script_}} ]; then \ + ${INSTALL_SCRIPT} ${RCD_SCRIPT_WRK.${_script_}} \ + ${RCD_SCRIPTS_EXAMPLEDIR}/${_script_}; \ fi . endif . endif |