Description: Adapt Makefile so it's usable for Debian
 * Add support for $DESTDIR.
 * Fix default $CGIDIR and create it in install target.
 * Disable check-config target, not needed at build time.
 * Install CGI without .cgi suffix.
 * Don't install COPYING, INSTALL and ChangeLog (not needed or done
   automatically)
 * Don't install doc/readme.* anymore (same content as man page).
Author: Werner Heuser <wehe@debian.org>

--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,11 @@
 # =========================================================================== #
 # Configuration 
-PREFIX=/usr/local
-CGIDIR=/home/httpd/cgi-bin
+DESTDIR=
+PREFIX=${DESTDIR}/usr
+
+#CGIDIR=/home/httpd/cgi-bin
+# changed for Debian
+CGIDIR=$(DESTDIR)/usr/lib/cgi-bin/
 
 # =========================================================================== #
 # Do not edit the following unless you know what are you are doing
@@ -11,8 +15,10 @@
 
 # Standard subdirectories locations
 BINDIR=$(PREFIX)/bin
-MANDIR=$(PREFIX)/man
-DOCDIR=$(PREFIX)/doc/html2wml
+# added /share for Debian
+MANDIR=$(PREFIX)/share/man
+# added /share for Debian
+DOCDIR=$(PREFIX)/share/doc/html2wml
 
 MAN1DIR=$(MANDIR)/man1
 
@@ -33,12 +39,12 @@
 install: check-config directories
 	install -m 555 html2wml.cgi $(BINDIR)/html2wml
 	install -m 444 doc/html2wml.man $(MAN1DIR)/html2wml.1 
-	install -m 444 COPYING INSTALL NEWS NOTES README TODO ChangeLog $(DOCDIR) 
+# modified for Debian
+	install -m 444 NEWS NOTES README TODO $(DOCDIR)
 	make -C t/ install DOCDIR=$(DOCDIR) 
-	make -C doc/ install DOCDIR=$(DOCDIR)
 
 installcgi: check-config
-	install -m 555 html2wml.cgi $(CGIDIR)
+	install -m 555 html2wml.cgi $(CGIDIR)/html2wml
 
 uninstall: 
 	rm -f $(BINDIR)/html2wml
@@ -46,10 +52,7 @@
 	rm -rf $(DOCDIR)
 
 directories: 
-	install -d $(BINDIR) $(MAN1DIR) $(DOCDIR)
+	install -d $(BINDIR) $(MAN1DIR) $(DOCDIR) $(CGIDIR)
 
 check-config:
-	@echo "Checking if your config looks good..."
-	@perl checkconfig.pl
-	@echo "Sounds ok."
-
+	@echo "Skipping checkconfig.pl for Debian package."
