summaryrefslogtreecommitdiff
path: root/security/krb5/Makefile
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2002-08-17 00:29:41 +0000
committerCy Schubert <cy@FreeBSD.org>2002-08-17 00:29:41 +0000
commit9c4b0991387ce808f05daeb077d582ced2700cda (patch)
tree9fb27d7b030acf219c43f316f7b47872e45ec948 /security/krb5/Makefile
parentremove perllocal.pod from pkg-plist (diff)
Fix extract for non-root users.
Noticed by: nectar Pointy hat to: cy
Diffstat (limited to 'security/krb5/Makefile')
-rw-r--r--security/krb5/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/security/krb5/Makefile b/security/krb5/Makefile
index 5406f50c601c..54537d1bcaa2 100644
--- a/security/krb5/Makefile
+++ b/security/krb5/Makefile
@@ -81,8 +81,12 @@ do-fetch:
post-extract:
@${TAR} -C ${WRKDIR} -xzf ${WRKDIR}/${DISTNAME}.tar.gz
@${RM} ${WRKDIR}/${DISTNAME}.tar.gz ${WRKDIR}/${DISTNAME}.tar.gz.asc
- @${CHMOD} -R ug-s,go-w ${WRKDIR}/${DISTNAME}
- @${CHOWN} -R 0:0 ${WRKDIR}/${DISTNAME}
+.if !defined(EXTRACT_PRESERVE_OWNERSHIP)
+ @if [ `id -u` = 0 ]; then \
+ ${CHMOD} -R ug-s,go-w ${WRKDIR}/${DISTNAME}; \
+ ${CHOWN} -R 0:0 ${WRKDIR}/${DISTNAME}; \
+ fi
+.endif
.endif
pre-build: