summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-06-22 19:55:44 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-06-22 19:55:44 +0000
commit8d4196a8f216fabb9b2be83285ad0699837d14c9 (patch)
tree92db8315a945d733d227f718c991b2e4867ea777 /Mk
parentnet/py-soappy-devel: drop dependency on py-xml (diff)
Make USE_RC_SUBR install rc.d scripts in /etc/rc.d if PREFIX is /usr
Remove now useless USE_RC_ORDER
Notes
Notes: svn path=/head/; revision=390321
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk25
1 files changed, 7 insertions, 18 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index a9d07821da62..8b8ec105b558 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -474,12 +474,8 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# If this is set to a list of files, these files will be
# automatically added to ${SUB_FILES}, some %%VAR%%'s will
# automatically be expanded, they will be installed in
-# ${PREFIX}/etc/rc.d and added to the packing list.
-# USE_RCORDER - List of rc.d startup scripts to be called early in the boot
-# process. This acts exactly like USE_RC_SUBR except that
-# scripts are installed in /etc/rc.d.
-# Because local rc.d scripts are included in the base rcorder
-# this option is not needed unless the port installs in the base.
+# ${PREFIX}/etc/rc.d if ${PREFIX} is not /usr, otherwise they
+# will be installed in /etc/rc.d/ and added to the packing list.
##
# USE_APACHE - If set, this port relies on an apache webserver.
#
@@ -5166,24 +5162,17 @@ add-plist-post:
.endif
.if !target(install-rc-script)
-.if defined(USE_RCORDER) || defined(USE_RC_SUBR) && ${USE_RC_SUBR:tu} != "YES"
-install-rc-script:
-.if defined(USE_RCORDER)
- @${ECHO_MSG} "===> Staging early rc.d startup script(s)"
- @for i in ${USE_RCORDER}; do \
- ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${STAGEDIR}/etc/rc.d/$${i%.sh}; \
- ${ECHO_CMD} "/etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \
- done
-.endif
.if defined(USE_RC_SUBR) && ${USE_RC_SUBR:tu} != "YES"
+install-rc-script:
@${ECHO_MSG} "===> Staging rc.d startup script(s)"
@for i in ${USE_RC_SUBR}; do \
- ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${STAGEDIR}${PREFIX}/etc/rc.d/$${i%.sh}; \
- ${ECHO_CMD} "${PREFIX}/etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \
+ _prefix=${PREFIX}; \
+ [ "${PREFIX}" = "/usr" ] && _prefix="" ; \
+ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${STAGEDIR}$${_prefix}/etc/rc.d/$${i%.sh}; \
+ ${ECHO_CMD} "$${_prefix}/etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \
done
.endif
.endif
-.endif
.if !target(check-man)
check-man: stage