*** Makefile.orig	Sun Feb  8 09:53:49 1998
--- Makefile	Sun Feb  8 10:45:43 1998
***************
*** 1,11 ****
  # -*- makefile -*-
  # $Id: patch-ac,v 1.3 1998/02/28 01:27:44 brian Exp $
! CC = gcc
  DEBUG = -g -Wall -Wformat -Wstrict-prototypes -Wmissing-prototypes 
! CFLAGS = $(DEBUG)
  LIBS = 
! BINDIR = /usr/local/sbin
! MANDIR = /usr/local/man
  VERSION = 1.4
  #
  # this is the directory where the news is stored.
--- 1,12 ----
  # -*- makefile -*-
  # $Id: patch-ac,v 1.3 1998/02/28 01:27:44 brian Exp $
! #CC = gcc
  DEBUG = -g -Wall -Wformat -Wstrict-prototypes -Wmissing-prototypes 
! RELEASE = -O2 -m486 -fno-strength-reduce -Wall -Wformat -Wstrict-prototypes -Wmissing-prototypes
! CFLAGS = $(RELEASE)
  LIBS = 
! BINDIR = $(PREFIX)/sbin
! MANDIR = $(PREFIX)/man
  VERSION = 1.4
  #
  # this is the directory where the news is stored.
***************
*** 13,30 ****
  #
  # this is the directory where the configuration and group information is
  # kept.  It should preferably not be on the same partition as spooldir
! LIBDIR = /usr/lib/leafnode
  #
  # This is the lock file for fetch.  The normal locations for such lock
  # files are /var/run or /var/lock.
  LOCKFILE = "/var/run/news/fetch.lck"
  
! all: nntpd fetch texpire checkgroups
  
! nntpd: nntpd.o util.o config.o
! 	$(CC) -g -o $@ nntpd.o util.o config.o
  
! fetch: fetch.o util.o config.o
  	$(CC) -o $@ fetch.o util.o config.o
  
  texpire: texpire.o util.o config.o
--- 14,31 ----
  #
  # this is the directory where the configuration and group information is
  # kept.  It should preferably not be on the same partition as spooldir
! LIBDIR = $(PREFIX)/lib/leafnode
  #
  # This is the lock file for fetch.  The normal locations for such lock
  # files are /var/run or /var/lock.
  LOCKFILE = "/var/run/news/fetch.lck"
  
! all: leafnode fetch-news texpire checkgroups
  
! leafnode: nntpd.o util.o config.o
! 	$(CC) -o $@ nntpd.o util.o config.o
  
! fetch-news: fetch.o util.o config.o
  	$(CC) -o $@ fetch.o util.o config.o
  
  texpire: texpire.o util.o config.o
***************
*** 34,40 ****
  	$(CC) -o $@ checkgroups.o util.o config.o
  
  clean:
! 	-@rm -f *.o core nntpd fetch texpire checkgroups
  
  depend:
  	makedepend *.c 2> /dev/null
--- 35,41 ----
  	$(CC) -o $@ checkgroups.o util.o config.o
  
  clean:
! 	-@rm -f *.o core leafnode fetch-news texpire checkgroups
  
  depend:
  	makedepend *.c 2> /dev/null
***************
*** 45,72 ****
  		-DLOCKFILE=\"$(LOCKFILE)\" \
  		-DVERSION=\"$(VERSION)\" $<
  
! install: nntpd fetch texpire checkgroups
! 	cp nntpd $(BINDIR)/leafnode
! 	cp fetch $(BINDIR)/fetch
! 	cp texpire $(BINDIR)/texpire
! 	cp checkgroups $(BINDIR)/checkgroups
! 	cp *.8 $(MANDIR)/man8
! 	-mkdir -p /var/run/news
! 	chown news.news /var/run/news
! 	-mkdir -p $(SPOOLDIR) $(LIBDIR)
! 	-mkdir -p $(SPOOLDIR)/{message.id,interesting.groups,out.going}
  	cd $(SPOOLDIR)/message.id ; for a in 0 1 2 3 4 5 6 7 8 9 ; do \
  		for b in 0 1 2 3 4 5 6 7 8 9 ; do \
! 			mkdir -p $${a}$${b}0 $${a}$${b}1 $${a}$${b}2 \
  				$${a}$${b}3 $${a}$${b}4 $${a}$${b}5 \
  				$${a}$${b}6 $${a}$${b}7 $${a}$${b}8 \
  				$${a}$${b}9 ; \
  			done ; done
- 	cp config.example $(LIBDIR)
- 	chown -R news.news $(LIBDIR) $(SPOOLDIR)
- 	chmod 2750 $(SPOOLDIR)
- 	chmod 750 $(BINDIR)/{leafnode,fetch,texpire,checkgroups}
- 	chown news.news $(BINDIR)/{leafnode,fetch,texpire,checkgroups}
  	@echo edit /etc/inetd.conf to start $(BINDIR)/leafnode
  
  dist:
--- 46,74 ----
  		-DLOCKFILE=\"$(LOCKFILE)\" \
  		-DVERSION=\"$(VERSION)\" $<
  
! fetch-news.8:	fetch.8
! 	cp fetch.8 fetch-news.8
! 
! install: leafnode fetch-news texpire checkgroups fetch-news.8
! 	install -d -g bin -o bin $(PREFIX)/share/doc/leafnode
! 	install -c -g bin -o bin -m 444 COPYING INSTALL README $(PREFIX)/share/doc/leafnode
! 	install -c -s -g bin -o bin -m 555 leafnode fetch-news texpire checkgroups $(BINDIR)
! 	install -c -g bin -o bin -m 444 leafnode.8 fetch-news.8 texpire.8 checkgroups.8 $(MANDIR)/man8
! 	install -d -g news -o news /var/run/news
! 	install -d -g news -o news $(LIBDIR)
! 	install -c -g news -o news -m 644 config.example $(LIBDIR)
! 	install -d -g news -o news -m 2750 $(SPOOLDIR)
! 	install -d -g news -o news $(SPOOLDIR)/message.id
! 	install -d -g news -o news $(SPOOLDIR)/interesting.groups
! 	install -d -g news -o news $(SPOOLDIR)/out.going
  	cd $(SPOOLDIR)/message.id ; for a in 0 1 2 3 4 5 6 7 8 9 ; do \
  		for b in 0 1 2 3 4 5 6 7 8 9 ; do \
! 			install -d -g news -o news \
! 				$${a}$${b}0 $${a}$${b}1 $${a}$${b}2 \
  				$${a}$${b}3 $${a}$${b}4 $${a}$${b}5 \
  				$${a}$${b}6 $${a}$${b}7 $${a}$${b}8 \
  				$${a}$${b}9 ; \
  			done ; done
  	@echo edit /etc/inetd.conf to start $(BINDIR)/leafnode
  
  dist:
