Index: gap-4r7p7/doc/Makefile
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gap-4r7p7/doc/Makefile	2015-05-03 23:12:40.641505671 +0200
@@ -0,0 +1,31 @@
+SHELL=/bin/bash
+pkgdocdir=/usr/share/gap/doc
+DOCDIR=$(DESTDIR)$(pkgdocdir)
+DIRS={ref,tut,changes}
+clean:
+	rm -f $(DIRS)/*.{html,txt,css,js}
+	rm -f $(DIRS)/make_manuals.out $(DIRS)/mathjax
+	rm -f $(DIRS)/main.{aux,bbl,blg,brf,idx,ilg,ind,log,out,pnr,tex,toc,toc.gz}
+	rm -f $(DIRS)/manual{,-bw}.{lab,six,six.gz,pdf}
+	rm -f manualbib.xml.bib wsp.g
+install-pdf:
+	install -d $(DOCDIR)/$(DIRS)
+	set -e; for man in $(DIRS); do \
+	  install -o root -g root -m 0644 $$man/manual.pdf $(DOCDIR)/$$man;\
+	done
+install-help:
+	install -d $(DOCDIR)/$(DIRS)
+	set -e; for man in $(DIRS); do \
+	  gzip --best --no-name $$man/manual.six; \
+	  gzip --best --no-name $$man/main.toc; \
+	  install -o root -g root -m 0644 $$man/manual.lab $(DOCDIR)/$$man;\
+	  install -o root -g root -m 0644 $$man/manual.six.gz $(DOCDIR)/$$man;\
+	  install -o root -g root -m 0644 $$man/main.toc.gz $(DOCDIR)/$$man;\
+	  install -o root -g root -m 0644 $$man/*.txt $(DOCDIR)/$$man;\
+	done
+install-html:
+	install -d $(DOCDIR)/$(DIRS)
+	set -e; for man in ref tut changes; do \
+	  install -o root -g root -m 0644 $$man/*.{html,css,js} $(DOCDIR)/$$man;\
+	  ln -s `readlink $$man/mathjax` $(DOCDIR)/$$man/mathjax;\
+	done
