hbbs

[archived] bbs.hlirc.net
git clone https://hhvn.uk/hbbs
git clone git://hhvn.uk/hbbs
Log | Files | Refs | README | LICENSE

makefile (834B)


      1 PREFIX  = /usr/local
      2 DATADIR = /var/bbs
      3 DATE    = `date +%d\ %b\ %Y`
      4 COMMIT  = `git log | head -n 1 | awk '{print $2}' | cut -c-7`
      5 
      6 default: less
      7 
      8 less: etc/lesskey
      9 	@echo Pager for long posts
     10 	lesskey -o etc/less etc/lesskey
     11 	@echo
     12 
     13 install: clean
     14 	mkdir -p $(PREFIX)/share/hbbs /etc/xinetd.d
     15 	cp -r `ls -A` $(PREFIX)/share/hbbs
     16 	sed 's~PREFIX~$(PREFIX)~' < etc/xinetd > /etc/xinetd.d/hbbs
     17 	chmod 755 $(PREFIX)/share/hbbs/hbbs.sh
     18 	chmod 755 $(PREFIX)/share/hbbs/bin/wrapper.sh
     19 	mkdir -p $(DATADIR)/
     20 	chmod 777 $(DATDIR)/
     21 	sed "s~PREFIX~$(PREFIX)~;s/DATE/$(DATE), $(COMMIT)/" < hbbs.8 > $(PREFIX)/share/man/man8/hbbs.8
     22 
     23 clean:
     24 	@echo Cleaning...
     25 	[ ! -f $(PREFIX)/share/hbbs ] || rm -rf $(PREFIX)/share/hbbs
     26 	@echo
     27 
     28 uninstall:
     29 	rm -rf $(DATADIR)
     30 	rm -rf $(PREFIX)/share/hbbs
     31 	rm /etc/xinetd.d/hbbs
     32 	rm $(PREFIX)/share/man/man8/hbbs.8