summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrillig <rillig>2005-08-23 09:29:06 +0000
committerrillig <rillig>2005-08-23 09:29:06 +0000
commitf772a92da276e688598f24509ce1effe1eba56c9 (patch)
tree5a82d3ac791170be7ad393f8f52f7ca275f7c4f6
parentd1895d17a2a215cc128e2b50e26a05730592a2c1 (diff)
downloadpkgsrc-f772a92da276e688598f24509ce1effe1eba56c9.tar.gz
Made the code for the permissions file work on Solaris.
-rw-r--r--mk/install/bsd.pkginstall.mk29
1 files changed, 12 insertions, 17 deletions
diff --git a/mk/install/bsd.pkginstall.mk b/mk/install/bsd.pkginstall.mk
index c46526ae710..540ca74dbf1 100644
--- a/mk/install/bsd.pkginstall.mk
+++ b/mk/install/bsd.pkginstall.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.19 2005/08/23 09:19:06 rillig Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.20 2005/08/23 09:29:06 rillig Exp $
#
# This Makefile fragment is included by bsd.pkg.mk to use the common
# INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply:
@@ -198,16 +198,18 @@ SPECIAL_PERMS?= # empty
SETUID_ROOT_PERMS?= ${ROOT_USER} ${ROOT_GROUP} 4711
INSTALL_PERMS_FILE= ${WRKDIR}/.install-perms
+INSTALL_PERMS_MEMBERS= ${SPECIAL_PERMS}
INSTALL_UNPACK_TMPL+= ${INSTALL_PERMS_FILE}
+.if empty(INSTALL_PERMS_MEMBERS:M*)
+${INSTALL_PERMS_FILE}:
+ ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
+.else
${INSTALL_PERMS_FILE}: ../../mk/install/perms
${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET} ${.TARGET}.tmp
- ${_PKG_SILENT}${_PKG_DEBUG}${TEST} -f ${.TARGET}.tmp || { \
- case "${SPECIAL_PERMS:M*:Q}" in \
- "") ;; \
- *) ${TOUCH} ${TOUCH_FLAGS} ${.TARGET}.tmp ;; \
- esac; }
- ${_PKG_SILENT}${_PKG_DEBUG}${TEST} ! -f ${.TARGET}.tmp || { \
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${_FUNC_STRIP_PREFIX}; \
+ exec 1>>${.TARGET}.tmp; \
${ECHO} "# start of install-perms"; \
${ECHO} "#"; \
${ECHO} "# Generate a +PERMS script that sets the special"; \
@@ -219,29 +221,22 @@ ${INSTALL_PERMS_FILE}: ../../mk/install/perms
${ECHO} " \$${CAT} > ./+PERMS << 'EOF_PERMS'"; \
${SED} ${FILES_SUBST_SED} ../../mk/install/perms; \
${ECHO} ""; \
- } >> ${.TARGET}.tmp
- ${_PKG_SILENT}${_PKG_DEBUG}${_FUNC_STRIP_PREFIX}; \
- ${TEST} ! -f ${.TARGET}.tmp || { \
- eval set -- __dummy ${SPECIAL_PERMS}; \
+ eval set -- dummy ${SPECIAL_PERMS}; shift; \
while ${TEST} $$# -gt 0; do \
- if ${TEST} "$$1" = "__dummy"; then shift; continue; fi; \
file="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
shift; shift; shift; shift; \
file=`strip_prefix "$$file"`; \
${ECHO} "# PERMS: $$file $$mode $$owner $$group"; \
done; \
- } >> ${.TARGET}.tmp
- ${_PKG_SILENT}${_PKG_DEBUG}${TEST} ! -f ${.TARGET}.tmp || { \
${ECHO} "EOF_PERMS"; \
${ECHO} " \$${CHMOD} +x ./+PERMS"; \
${ECHO} " ;;"; \
${ECHO} "esac"; \
${ECHO} ""; \
${ECHO} "# end of install-perms"; \
- } >> ${.TARGET}.tmp
- ${_PKG_SILENT}${_PKG_DEBUG}${TEST} ! -f ${.TARGET}.tmp || \
+ exec 1>/dev/null; \
${MV} -f ${.TARGET}.tmp ${.TARGET}
- ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
+.endif
# CONF_FILES are pairs of example and true config files, used much like
# MLINKS in the base system. At post-install time, if the true config