#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

DEB_INSTALL_MANPAGES_info2www := debian/info2www.1

binary-post-install/info2www::
	# Install the CGI script.
	install info2www debian/info2www/usr/lib/cgi-bin/
	# Install the HTML file.
	install info2www.html debian/info2www/var/lib/info2www
	# Install the uuencoded PNG images.
	install debian/*.uu debian/info2www/var/lib/info2www
	# uudecode the images and remove the *.uu files.
	(cd debian/info2www/var/lib/info2www; uudecode *.uu; rm -f *.uu)
	# Set the correct permissions on the files.
	chmod 644 debian/info2www/var/lib/info2www/*
	# Setup symlinks.
	dh_link var/lib/info2www/info2www.html var/lib/info2www/index.html \
		var/lib/info2www usr/share/doc/info2www/html
