aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2006-08-14 13:24:18 +0000
committerErwin Lansing <erwin@FreeBSD.org>2006-08-14 13:24:18 +0000
commit16a4d859c0798db0f7f27becd0f8837e55ba2d01 (patch)
tree5e878b8527b0341062d667c88036b1762e89fd4a /Mk/bsd.port.mk
parentd60b7dd874a9b70519c7ae04cd3c723c95ec5ef5 (diff)
downloadports-16a4d859c0798db0f7f27becd0f8837e55ba2d01.tar.gz
ports-16a4d859c0798db0f7f27becd0f8837e55ba2d01.zip
Notes
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk34
1 files changed, 18 insertions, 16 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 6d5c32908bc8..f0cf7abf40d4 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1370,21 +1370,22 @@ PREFIX?= ${LOCALBASE_REL}
.if defined(USE_LINUX_PREFIX)
.if !defined(DESTDIR)
LDCONFIG_CMD?= ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL}
+LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD}
+LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG_CMD}
.else
LDCONFIG_CMD?= ${CHROOT} ${DESTDIR} ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL}
-.endif
LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD}
-LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG_CMD}
+LDCONFIG_PLIST_UNEXEC_CMD?= ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL}
+.endif
.else
.if !defined(DESTDIR)
LDCONFIG_CMD?= ${LDCONFIG} -m ${LDCONFIG_RUNLIST}
LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG} -m ${LDCONFIG_PLIST}
-LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG} -R
.else
LDCONFIG_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_RUNLIST}
LDCONFIG_PLIST_EXEC_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -m ${LDCONFIG_PLIST}
-LDCONFIG_PLIST_UNEXEC_CMD?= ${CHROOT} ${DESTDIR} ${LDCONFIG} -R
.endif
+LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG} -R
.endif
PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg
@@ -1588,8 +1589,9 @@ INSTALL_WRKSRC?=${WRKSRC}
PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} \
DESTDIR=${DESTDIR} TARGETDIR=${TARGETDIR}
-SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} \
- DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR}
+SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE_REL} X11BASE=${X11BASE_REL} \
+ DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} \
+ DESTDIR=${DESTDIR} TARGETDIR=${TARGETDIR}
PLIST_REINPLACE+= dirrmtry
PLIST_REINPLACE_DIRRMTRY=s!^@dirrmtry \(.*\)!@unexec rmdir %D/\1 2>/dev/null || true!
@@ -5512,7 +5514,7 @@ install-rc-script:
@${ECHO_CMD} "===> Installing early rc.d startup script(s)"
@${ECHO_CMD} "@cwd /" >> ${TMPPLIST}
@for i in ${USE_RCORDER}; do \
- ${INSTALL_SCRIPT} ${WRKDIR}/$${i} /etc/rc.d/$${i%.sh}; \
+ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${DESTDIR}/etc/rc.d/$${i%.sh}; \
${ECHO_CMD} "etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \
done
@${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}
@@ -5581,13 +5583,13 @@ fake-pkg:
fi
@${RM} -rf ${PKG_DBDIR}/${PKGNAME}
.endif
-.if !exists(${PKG_DBDIR}/${PKGNAME})
-.if !defined(DESTDIR)
- @${ECHO_MSG} "===> Registering installation for ${PKGNAME}"
-.else
- @${ECHO_MSG} "===> Registering installation for ${PKGNAME} in ${DESTDIR}"
-.endif
- @${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \
+ @if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \
+ if [ -z "${DESTDIR}" ] ; then \
+ ${ECHO_MSG} "===> Registering installation for ${PKGNAME}"; \
+ else \
+ ${ECHO_MSG} "===> Registering installation for ${PKGNAME} in ${DESTDIR}"; \
+ fi; \
+ ${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \
${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \
${CP} ${DESCR} ${PKG_DBDIR}/${PKGNAME}/+DESC; \
${ECHO_CMD} ${COMMENT:Q} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \
@@ -5610,8 +5612,8 @@ fake-pkg:
${ECHO_CMD} ${PKGNAME} >> ${PKG_DBDIR}/$$dep/+REQUIRED_BY; \
fi; \
fi; \
- done
-.endif
+ done; \
+ fi
.if !defined(NO_MTREE)
@if [ -f ${MTREE_FILE} ]; then \
${CP} ${MTREE_FILE} ${PKG_DBDIR}/${PKGNAME}/+MTREE_DIRS; \