#Install the cn script and man page.

#Standard system directories, which may be temporarily overridden when packaging an rpm.
sysconfdir=/etc
bindir=/usr/local/bin
datadir=/usr/local/share
mandir=$(datadir)/man

all:
	bzip2 -kf cn.1

clean:
	rm -f cn.1.bz2

install:
	@[ `whoami` = root ] || (echo "Error, you need to be root to install."; exit 1)
	mkdir -p $(bindir)
	install -m 755 cn $(bindir)/

	mkdir -p $(mandir)/man1
	install -m 644 cn.1.bz2 $(mandir)/man1/

uninstall:
	@[ `whoami` = root ] || (echo "Error, you need to be root to uninstall."; exit 1)
	rm -f $(bindir)/cn

	rm -f $(mandir)/man1/cn.1.bz2
