Don't chown installed files or directories if UNPRIVILEGED is defined.

"make build" should now work as a non-root user (tested on Alpha).
mtree spits out lots of warnings during "make distrib-dirs", but
these are non-fatal.
This commit is contained in:
simonb 1999-08-21 06:30:11 +00:00
parent b729f2c755
commit ba77c9abaf
4 changed files with 18 additions and 5 deletions

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.17 1998/12/06 09:06:46 dbj Exp $
# $NetBSD: Makefile,v 1.18 1999/08/21 06:30:11 simonb Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
.include <bsd.own.mk> # for UNPRIVILEGED
PROG= phantasia
SRCS= fight.c gamesupport.c interplayer.c io.c main.c misc.c phantglobs.c
@ -25,7 +27,9 @@ setup.o: ${.CURDIR}/setup.c
afterinstall:
DESTDIR=${DESTDIR} ./setup -m ${.CURDIR}/monsters.asc
.if !defined(UNPRIVILEGED)
chown games:games ${DESTDIR}/var/games/phantasia/*
.endif
# Make Phantasia map. Change the map commands reflect your installation.
# PLOTDEVICE is used for plotting the map. Change as appropriate.

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.14 1999/07/30 04:07:26 mycroft Exp $
# $NetBSD: Makefile,v 1.15 1999/08/21 06:30:12 simonb Exp $
# for OBJECT_FMT
# for OBJECT_FMT, UNPRIVILEGED
.include <bsd.own.mk>
.if (${OBJECT_FMT} == "ELF") || defined(BOOTSTRAP_ELF)
@ -125,7 +125,9 @@ ldemul-list.h: Makefile
afterinstall:
.if ${MKSHARE} != "no"
(cd ldscripts ; pax -rw . ${DESTDIR}${SCRIPTDIR})
.if !defined(UNPRIVILEGED)
chown -R ${BINOWN}:${BINGRP} ${DESTDIR}${SCRIPTDIR}
.endif
find ${DESTDIR}${SCRIPTDIR} -type f | xargs chmod a=rX
find ${DESTDIR}${SCRIPTDIR} -type d | xargs chmod u=rwX,go=rX
.endif

View File

@ -1,14 +1,18 @@
#
# $NetBSD: Makefile,v 1.16 1999/02/14 10:53:06 lukem Exp $
# $NetBSD: Makefile,v 1.17 1999/08/21 06:30:12 simonb Exp $
#
.include <bsd.own.mk> # for UNPRIVILEGED
STUFF= README syscall vfs misc
MKOBJ= no
install:
find ${STUFF} -follow -name CVS -prune -o -type f -print | \
cpio -pdumL ${DESTDIR}${BINDIR}/lkm
.if !defined(UNPRIVILEGED)
chown -R ${BINOWN}:${BINGRP} ${DESTDIR}${BINDIR}/lkm
.endif
find ${DESTDIR}${BINDIR}/lkm -type f | xargs chmod a=rX
find ${DESTDIR}${BINDIR}/lkm -type d | xargs chmod u=rwX,go=rX

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.21 1999/02/13 02:54:36 lukem Exp $
# $NetBSD: Makefile,v 1.22 1999/08/21 06:30:12 simonb Exp $
.include <bsd.own.mk>
@ -77,8 +77,11 @@ right_posix: right_only other_two
.if ${MKSHARE} != "no"
afterinstall: ${DATA} ${REDO}
${ZIC} -y ${YEARISTYPE} -d ${TZDIR} -p ${POSIXRULES}
.if !defined(UNPRIVILEGED)
chown -R ${BINOWN}:${BINGRP} ${TZDIR}
.endif
find ${TZDIR} -type f | xargs chmod a=r
find ${TZDIR} -type d | xargs chmod u=rwX,go=rX
.else
afterinstall:
.endif