summaryrefslogtreecommitdiff
path: root/mk/pkginstall/bsd.pkginstall.mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-11-23 11:50:19 +0000
committerrillig <rillig@pkgsrc.org>2007-11-23 11:50:19 +0000
commit8589bb73de480e9cd5cc664e8af503028361364b (patch)
treeab6a399f6e75aa67e21bc6e7d8a64ecdeccbccc3 /mk/pkginstall/bsd.pkginstall.mk
parente7132cb17f5fe0da6e1a86762a814827799b7705 (diff)
downloadpkgsrc-8589bb73de480e9cd5cc664e8af503028361364b.tar.gz
The last change didn't receive enough testing. Now it is ok to have
/dev/null as an example file, and the proper file names are checked.
Diffstat (limited to 'mk/pkginstall/bsd.pkginstall.mk')
-rw-r--r--mk/pkginstall/bsd.pkginstall.mk28
1 files changed, 12 insertions, 16 deletions
diff --git a/mk/pkginstall/bsd.pkginstall.mk b/mk/pkginstall/bsd.pkginstall.mk
index b9cfbaf091d..3e511ef0d74 100644
--- a/mk/pkginstall/bsd.pkginstall.mk
+++ b/mk/pkginstall/bsd.pkginstall.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.35 2007/11/23 11:36:19 rillig Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.36 2007/11/23 11:50:19 rillig Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -417,35 +417,31 @@ privileged-install-hook: _pkginstall-postinstall-check
_pkginstall-postinstall-check: .PHONY
${RUN} p="${DESTDIR}${PREFIX}"; \
${_FUNC_STRIP_PREFIX}; \
+ canon() { f=`strip_prefix "$$1"`; case $$f in [!/]*) f="$$p/$$f"; esac; echo "$$f"; }; \
set args ${RCD_SCRIPTS}; shift; \
while [ $$# -gt 0 ]; do \
- egfile=$$p/`strip_prefix "${RCD_SCRIPTS_EXAMPLEDIR}/$$1"`; \
- shift 1; \
- [ -f "$$egfile" ] || ${FAIL_MSG} "RCD_SCRIPT $$egfile does not exist."; \
+ egfile=`canon "${RCD_SCRIPTS_EXAMPLEDIR}/$$1"`; shift; \
+ [ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "RCD_SCRIPT $$egfile does not exist."; \
done; \
set args ${CONF_FILES}; shift; \
while [ $$# -gt 0 ]; do \
- egfile=$$p/`strip_prefix "$$1"`; \
- shift 2; \
- [ -f "$$1" ] || ${FAIL_MSG} "CONF_FILE $$egfile does not exist."; \
+ egfile=`canon "$$1"`; shift 2; \
+ [ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "CONF_FILE $$egfile does not exist."; \
done; \
set args ${REQD_FILES}; shift; \
while [ $$# -gt 0 ]; do \
- egfile=$$p/`strip_prefix "$$1"`; \
- shift 2; \
- [ -f "$$1" ] || ${FAIL_MSG} "REQD_FILE $$egfile does not exist."; \
+ egfile=`canon "$$1"`; shift 2; \
+ [ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "REQD_FILE $$egfile does not exist."; \
done; \
set args ${CONF_FILES_PERMS}; shift; \
while [ $$# -gt 0 ]; do \
- egfile=$$p/`strip_prefix "$$1"`; \
- shift 5; \
- [ -f "$$1" ] || ${FAIL_MSG} "CONF_FILES_PERMS $$egfile does not exist."; \
+ egfile=`canon "$$1"`; shift 5; \
+ [ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "CONF_FILES_PERMS $$egfile does not exist."; \
done; \
set args ${REQD_FILES_PERMS}; shift; \
while [ $$# -gt 0 ]; do \
- egfile=$$p/`strip_prefix "$$1"`; \
- shift 5; \
- [ -f "$$1" ] || ${FAIL_MSG} "REQD_FILES_PERMS $$egfile does not exist."; \
+ egfile=`canon "$$1"`; shift 5; \
+ [ -f "$$egfile" ] || [ -c "$$egfile" ] || ${FAIL_MSG} "REQD_FILES_PERMS $$egfile does not exist."; \
done
${_INSTALL_FILES_DATAFILE}: