# Edit the DIRs for your needs and run make
# The Prefix is to debianize the program

PREFIX = debian/tmp
INSTALL_DIR = $(PREFIX)/usr

INSTALL = /usr/bin/install

all: install 

install: 
	$(INSTALL) -d $(INSTALL_DIR)/bin/
	cp perl/cd-label.pl $(INSTALL_DIR)/bin/cd-circleprint
	chmod 755 $(INSTALL_DIR)/bin/cd-circleprint
	$(INSTALL) -d $(PREFIX)/usr/share/cd-circleprint/
	cp graphics/debian_logo.eps $(PREFIX)/usr/share/cd-circleprint/debian_logo.eps
	cp graphics/unixstuff.eps $(PREFIX)/usr/share/cd-circleprint/unixstuff.eps
	$(INSTALL) -d $(INSTALL_DIR)/man/man1/
	pod2man --section=1 perl/cd-label.pl > $(INSTALL_DIR)/man/man1/cd-circleprint.1

uninstall: 
	rm $(INSTALL_DIR)/bin/cd-circleprint
	rm $(INSTALL_DIR)/man/man1/cd-circleprint.1.gz
	rm $(PREFIX)/usr/share/cd-circleprint/*.eps

clean: uninstall
