X-Git-Url: https://git.cameronkatri.com/pw-darwin.git/blobdiff_plain/a8da6514f59a0823e142e9898a0edffb7e12d06b..f290337306e66cc8b4860837032dffedc3f5ebe3:/adduser/Makefile diff --git a/adduser/Makefile b/adduser/Makefile index 0ca2dae..5cb44ec 100644 --- a/adduser/Makefile +++ b/adduser/Makefile @@ -1,6 +1,37 @@ -# $FreeBSD$ +PREFIX ?= /usr +DESTDIR ?= +MEMO_PREFIX ?= +MEMO_SUB_PREFIX ?= /usr -SCRIPTS=adduser.sh rmuser.sh -MAN= adduser.conf.5 adduser.8 rmuser.8 +all: adduser rmuser -.include +adduser: adduser.sh + sed -e 's|@MEMO_PREFIX@|$(MEMO_PREFIX)|g' \ + -e 's|@MEMO_SUB_PREFIX@|$(MEMO_SUB_PREFIX)|g' \ + $< > $@ + +rmuser: rmuser.sh + sed -e 's|@MEMO_PREFIX@|$(MEMO_PREFIX)|g' \ + -e 's|@MEMO_SUB_PREFIX@|$(MEMO_SUB_PREFIX)|g' \ + $< > $@ + +clean: + rm -f adduser rmuser + +install: install-adduser install-rmuser + +install-adduser: adduser adduser.8 adduser.conf.5 + install -d $(DESTDIR)/$(PREFIX)/sbin \ + $(DESTDIR)/$(PREFIX)/share/man/man5 \ + $(DESTDIR)/$(PREFIX)/share/man/man8 + install -m755 adduser $(DESTDIR)/$(PREFIX)/sbin/adduser + install -m644 adduser.8 $(DESTDIR)/$(PREFIX)/share/man/man8/adduser.8 + install -m644 adduser.conf.5 $(DESTDIR)/$(PREFIX)/share/man/man5/adduser.conf.5 + +install-rmuser: rmuser rmuser.8 + install -d $(DESTDIR)/$(PREFIX)/sbin \ + $(DESTDIR)/$(PREFIX)/share/man/man8 + install -m755 rmuser $(DESTDIR)/$(PREFIX)/sbin/rmuser + install -m644 rmuser.8 $(DESTDIR)/$(PREFIX)/share/man/man8/rmuser.8 + +.PHONY: all install install-adduser install-rmuser clean