Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
Date:                    2005-08-03
Initial Package Version: 1.0.3
Upstream Status:         Not submitted
Origin:                  Randy McMurchy
Description:             Installs pre-formatted documentation

diff -Naur bzip2-1.0.3.orig/Makefile bzip2-1.0.3/Makefile
--- bzip2-1.0.3.orig/Makefile   2005-02-18 00:28:24.000000000 +1300
+++ bzip2-1.0.3/Makefile        2005-08-04 16:38:52.947486864 +1200
@@ -12,6 +12,7 @@

 # Where you want it installed when you do 'make install'
 PREFIX=/usr
+DOCDIR=share/doc/$(DISTNAME)


 OBJS= blocksort.o  \
@@ -61,6 +62,7 @@
        if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
        if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
        if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
+       if ( test ! -d $(PREFIX)/$(DOCDIR) ) ; then mkdir -p $(PREFIX)/$(DOCDIR); fi
        if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
        cp -f bzip2 $(PREFIX)/bin/bzip2
        cp -f bzip2 $(PREFIX)/bin/bunzip2
@@ -94,6 +96,15 @@
        echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
        echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
        echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+       cp -f manual.html $(PREFIX)/$(DOCDIR)
+       cp -f manual.pdf $(PREFIX)/$(DOCDIR)
+       cp -f manual.ps $(PREFIX)/$(DOCDIR)
+       cp -f bzip2.txt $(PREFIX)/$(DOCDIR)
+       chmod a+r $(PREFIX)/$(DOCDIR)/manual.html
+       chmod a+r $(PREFIX)/$(DOCDIR)/manual.pdf
+       chmod a+r $(PREFIX)/$(DOCDIR)/manual.ps
+       chmod a+r $(PREFIX)/$(DOCDIR)/bzip2.txt
+

 clean:
        rm -f *.o libbz2.a bzip2 bzip2recover \
