ncurses 6.0 - patch 20170708
[ncurses.git] / package / debian / rules
old mode 100644 (file)
new mode 100755 (executable)
index e77fd69..9d0eb98
@@ -7,7 +7,7 @@
 #export DH_VERBOSE=1
 
 # packages
-PACKAGES.indep = # ncurses6-docs
+PACKAGES.indep = ncurses6-doc ncurses6-doc-html
 PACKAGES.arch  = ncurses6 ncursest6
 
 # These are used for cross-compiling and for saving the configure script
@@ -78,6 +78,7 @@ configure = \
                --with-ticlib \
                --with-trace \
                --with-cxx-shared \
+               --with-terminfo-dirs=/lib/terminfo:/usr/share/terminfo \
                --with-versioned-syms \
                --with-xterm-kbs=DEL \
                --without-ada \
@@ -130,6 +131,10 @@ config-ncursest6-stamp:
                --with-pthread
        touch $@
 
+config-ncurses6-doc-stamp \
+config-ncurses6-doc-html-stamp: config-ncurses6-stamp
+       touch $@
+
 build-ncurses6-stamp: config-ncurses6-stamp
        dh_testdir
 
@@ -144,6 +149,10 @@ build-ncursest6-stamp: config-ncursest6-stamp
 
        touch $@
 
+build-ncurses6-doc-stamp \
+build-ncurses6-doc-html-stamp: build-ncurses6-stamp
+       touch $@
+
 install-ncurses6-stamp: build-ncurses6-stamp
        dh_testdir
        dh_testroot
@@ -170,6 +179,28 @@ install-ncursest6-stamp: build-ncursest6-stamp
 
        touch $@
 
+install-ncurses6-doc-stamp: build-ncurses6-stamp
+       dh_testdir
+       dh_testroot
+       dh_installdirs $(verbose)
+       dh_prep        $(verbose) -pncurses6-doc
+
+       $(MAKE) -C t/ncurses6 install.man DESTDIR=$(NCURSES6_DIR)-doc
+
+       touch $@
+
+HTML_DESTDIR=$(NCURSES6_DIR)-doc-html/usr/share/ncurses6-doc-html
+install-ncurses6-doc-html-stamp: build-ncurses6-stamp
+       dh_testdir
+       dh_testroot
+       dh_installdirs $(verbose)
+       dh_prep        $(verbose) -pncurses6-doc-html
+
+       cd doc/html && find * -type d | sort | xargs -I{} mkdir -p -v $(HTML_DESTDIR)/{}
+       cd doc/html && find * -type f -name '*.html' | sort | xargs -I{} install -m 644 -p -v -T {} $(HTML_DESTDIR)/{}
+
+       touch $@
+
 # Build architecture-independent files here.
 binary-indep: install-indep
 ifneq ($(PACKAGES.indep),)