11590Srgrimes#	@(#)Makefile	8.2 (Berkeley) 4/2/94
254677Smarcel# $FreeBSD: stable/11/usr.bin/chpass/Makefile 319186 2017-05-30 04:27:05Z ngie $
31590Srgrimes
4265420Simp.include <src.opts.mk>
5156813Sru
6319186Sngie.PATH: ${SRCTOP}/usr.sbin/pwd_mkdb ${SRCTOP}/lib/libc/gen
7108435Sobrien
81590SrgrimesPROG=	chpass
996201SdesSRCS=	chpass.c edit.c field.c pw_scan.c table.c util.c
1083391SruBINOWN=	root
111590SrgrimesBINMODE=4555
12298107SgjbPRECIOUSPROG=
13156813Sru.if ${MK_NIS} != "no"
14137675SbzCFLAGS+= -DYP
15137675Sbz.endif
16108435Sobrien#Some people need this, uncomment to activate
17108435Sobrien#CFLAGS+=-DRESTRICT_FULLNAME_CHANGE
18319186SngieCFLAGS+=-I${SRCTOP}/usr.sbin/pwd_mkdb -I${SRCTOP}/lib/libc/gen -I.
19108435Sobrien
20275042SbaptLIBADD=	crypt util
21156813Sru.if ${MK_NIS} != "no"
22275042SbaptLIBADD+=	ypclnt
23137675Sbz.endif 
24108435Sobrien
25319016SrgrimesSYMLINKS=	chpass ${BINDIR}/chfn
26319016SrgrimesSYMLINKS+=	chpass ${BINDIR}/chsh
27156813Sru.if ${MK_NIS} != "no"
28319016SrgrimesSYMLINKS+=	chpass ${BINDIR}/ypchfn
29319016SrgrimesSYMLINKS+=	chpass ${BINDIR}/ypchpass
30319016SrgrimesSYMLINKS+=	chpass ${BINDIR}/ypchsh
31139396Sache.endif
3229322Swosch
331590SrgrimesMLINKS=	chpass.1 chfn.1 chpass.1 chsh.1
34156813Sru.if ${MK_NIS} != "no"
3529322SwoschMLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1
36139396Sache.endif
3729322Swosch
38278664Sbaptbeforeinstall:
39278664Sbapt.for i in chpass chfn chsh ypchpass ypchfn ypchsh
40278664Sbapt.if exists(${DESTDIR}${BINDIR}/$i)
41278664Sbapt	-chflags noschg ${DESTDIR}${BINDIR}/$i
42278664Sbapt.endif
43278664Sbapt.endfor
44278664Sbapt
451590Srgrimes.include <bsd.prog.mk>
46