Subject: Give a proper Makefile for the upstream package
Author: Michael van der Kolff <mvanderkolff@gmail.com>
Forwarded: no

Upstream Makefile is barebones, and doesn't make any shared libraries.

With some extra effort, this does.
--- jbigkit-2.1/Makefile.orig	2014-04-25 11:36:05.278857200 +0000
+++ jbigkit-2.1/Makefile	2014-04-25 11:40:25.214864900 +0000
@@ -10,9 +10,10 @@
 export CC CFLAGS
 
 VERSION=2.1
+INSTALL=/bin/install
+.PHONY: all lib pbm test analyze clean release install
 
 all: lib pbm
-	@echo "Enter 'make test' in order to start some automatic tests."
 
 lib:
 	cd libjbig && $(MAKE) -e
@@ -33,12 +34,19 @@
 	cd libjbig  && $(MAKE) clean
 	cd pbmtools && $(MAKE) clean
 
-distribution:
-	rm -rf jbigkit-$(VERSION)
-	git archive v$(VERSION) --prefix jbigkit-$(VERSION)/ | tar xvf -
-	make -C jbigkit-$(VERSION)/pbmtools txt
-	tar cvaf jbigkit-$(VERSION).tar.gz jbigkit-$(VERSION)
-
 release:
 	rsync -t jbigkit-$(VERSION).tar.gz $(HOME)/public_html/download/
 	rsync -t jbigkit-$(VERSION)/CHANGES $(HOME)/public_html/jbigkit/
+
+install: all
+	$(INSTALL) -d $(DESTDIR)$(prefix)/bin
+	$(INSTALL) -d $(DESTDIR)$(prefix)/lib
+	$(INSTALL) -m 644 libjbig/.libs/*.dll $(DESTDIR)$(prefix)/bin
+	$(INSTALL) -m 644 libjbig/.libs/*.a $(DESTDIR)$(prefix)/lib
+	$(INSTALL) -m 644 libjbig/*.a $(DESTDIR)$(prefix)/lib
+	$(INSTALL) -d $(DESTDIR)$(prefix)/include
+	$(INSTALL) -m 644 libjbig/*.h $(DESTDIR)$(prefix)/include
+	$(INSTALL) -d $(DESTDIR)$(prefix)/bin
+	$(INSTALL) -m 755 pbmtools/jbgtopbm pbmtools/jbgtopbm85 pbmtools/pbmtojbg pbmtools/pbmtojbg85 $(DESTDIR)$(prefix)/bin
+	$(INSTALL) -d $(DESTDIR)$(prefix)/share/man/man1
+	$(INSTALL) -m 644 pbmtools/*.1 $(DESTDIR)$(prefix)/share/man/man1
