-# $Id$
+GINSTALL ?= install
+PREFIX ?= /usr
+DESTDIR ?=
-SCRIPTS= adduser.perl #rmuser.perl addgroup.tcl rmgroup.sh
-MAN8= adduser.8 #rmuser.8 addgroup.8 rmgroup.8
+all:
+ @echo "Nothing to build"
-beforeinstall:
-.for script in ${SCRIPTS}
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${.CURDIR}/${script} ${DESTDIR}${BINDIR}/${script:R}
-.endfor
+clean:
+ @echo "Nothing to clean"
-.include <bsd.prog.mk>
+install: install-adduser install-rmuser
+
+install-adduser: adduser.sh adduser.8 adduser.conf.5
+ $(GINSTALL) -Dm755 adduser.sh $(DESTDIR)/$(PREFIX)/sbin/adduser
+ $(GINSTALL) -Dm644 adduser.8 $(DESTDIR)/$(PREFIX)/share/man/man8/adduser.8
+ $(GINSTALL) -Dm644 adduser.conf.5 $(DESTDIR)/$(PREFIX)/share/man/man5/adduser.conf.5
+
+install-rmuser: rmuser.sh rmuser.8
+ $(GINSTALL) -Dm755 rmuser.sh $(DESTDIR)/$(PREFIX)/sbin/rmuser
+ $(GINSTALL) -Dm644 rmuser.8 $(DESTDIR)/$(PREFIX)/share/man/man8/rmuser.8
+
+.PHONY: all install install-adduser install-rmuser clean