diff options
author | obrien <obrien@FreeBSD.org> | 2012-06-26 23:15:55 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2012-06-26 23:15:55 +0000 |
commit | bd43c5e6d640101f1bd6cca7e83586ae41e1a065 (patch) | |
tree | 94b52a1e32862745457424a98cbe53a089f259e8 /share | |
parent | f6d1a69477137f8ebcfe5c08bf311f2f572826ea (diff) | |
download | FreeBSD-src-bd43c5e6d640101f1bd6cca7e83586ae41e1a065.zip FreeBSD-src-bd43c5e6d640101f1bd6cca7e83586ae41e1a065.tar.gz |
Add -DWITH_INSTALL_AS_USER to the source build (naming matches the
same functionality of The Ports Collection).
This sets BINOWN, BINGRP, etc... to match current user. This this
allows 'install', as used in 'make install', to succeed (assuming
user has write permissions).
Submitted by: Simon J Gerraty <sjg@juniper.net>
Discussed on: freebsd-arch
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.own.mk | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index e825c62..7d31a39 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -427,6 +427,7 @@ __DEFAULT_NO_OPTIONS = \ HESIOD \ ICONV \ IDEA \ + INSTALL_AS_USER \ LIBCPLUSPLUS \ NAND \ OFED \ @@ -645,6 +646,17 @@ CTFCONVERT_CMD= CTFCONVERT_CMD= @: .endif +.if ${MK_INSTALL_AS_USER} != "no" +_uid!= id -un +.if ${_uid} != 0 +_gid!= id -gn +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +$xOWN= ${_uid} +$xGRP= ${_gid} +.endfor +.endif +.endif + .endif # !_WITHOUT_SRCCONF .endif # !target(__<bsd.own.mk>__) |