Author: obrien
Date: Tue Jun 26 23:15:55 2012
New Revision: 237612
URL: http://svn.freebsd.org/changeset/base/237612
Log:
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
Modified:
head/share/mk/bsd.own.mk
Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk Tue Jun 26 22:16:53 2012 (r237611)
+++ head/share/mk/bsd.own.mk Tue Jun 26 23:15:55 2012 (r237612)
@@ -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>__)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"