#	BSDI	Makefile,v 1.5 1996/01/09 22:04:51 polk Exp

# Install in ${NEWSETC} mode 0644
ETCPUB=		overview.fmt newsfeeds inn.conf distrib.pats moderators active

# Install in ${NEWSETC} mode 0640
ETCPRIV=	hosts.nntp nnrp.access passwd.nntp control.ctl expire.ctl \
		nntpsend.ctl innwatch.ctl innlog.awk

# Install in ${NEWSLIB} mode 0640
LIBPRIV=	innshellvars

# Install in ${NEWSBIN} mode 0750
BINEXEC=	makegroup writelog scanlogs expirerm \
		tally.control tally.unwanted nntpsend sendbatch \
		ctlrun inncheck innstat innwatch

# Install in ${CTLBIN} mode 0750
CTLEXEC=	checkgroups default ihave newgroup rmgroup sendme sendsys \
		senduuname version docheckgroups

# Install in ${NEWSETC} mode 0750
ETCEXEC=	parsecontrol rc.news send-ihave send-nntp send-uucp news.daily 

all tags obj objdir depend clean cleandir:

install:
	for i in ${ETCPUB}; do \
		if [ ! -f ${DESTDIR}${NEWSETC}/$$i ]; then \
			echo "Installing $$i" ; \
			install -c -o ${BINOWN} -g ${BINGRP} -m 0644 \
				$$i ${DESTDIR}${NEWSETC} ; \
		fi; \
	done
	for i in ${ETCPRIV}; do \
		if [ ! -f ${DESTDIR}${NEWSETC}/$$i ]; then \
			echo "Installing $$i" ; \
			install -c -o ${BINOWN} -g ${BINGRP} -m 0640 \
				$$i ${DESTDIR}${NEWSETC} ; \
		fi; \
	done
	for i in ${LIBPRIV}; do \
		if [ ! -f ${DESTDIR}${NEWSLIB}/$$i ]; then \
			echo "Installing $$i" ; \
			install -c -o ${BINOWN} -g ${BINGRP} -m 0640 \
				$$i ${DESTDIR}${NEWSLIB} ; \
		fi; \
	done
	for i in ${BINEXEC}; do \
		if [ ! -f ${DESTDIR}${NEWSBIN}/$$i ]; then \
			echo "Installing $$i" ; \
			install -c -o ${BINOWN} -g ${BINGRP} -m 0750 \
				$$i ${DESTDIR}${NEWSBIN} ; \
		fi; \
	done
	for i in ${CTLEXEC}; do \
		if [ ! -f ${DESTDIR}${CTLBIN}/$$i ]; then \
			echo "Installing $$i" ; \
			install -c -o ${BINOWN} -g ${BINGRP} -m 0750 \
				$$i ${DESTDIR}${CTLBIN} ; \
		fi; \
	done
	for i in ${ETCEXEC}; do \
		if [ ! -f ${DESTDIR}${NEWSETC}/$$i ]; then \
			echo "Installing $$i" ; \
			install -c -o ${BINOWN} -g ${BINGRP} -m 0750 \
				$$i ${DESTDIR}${NEWSETC} ; \
		fi; \
	done
	rm -f ${DESTDIR}${NEWSBIN}/news.daily
	ln -s ${NEWSETC}/news.daily ${DESTDIR}${NEWSBIN}/news.daily
	rm -f ${DESTDIR}/var/spool/news
	ln -s ../news/spool ${DESTDIR}/var/spool/news

.include <../Makefile.inc>
