ncurses 6.1 - patch 20181006
[ncurses.git] / package / debian / rules
index e77fd692224b230ff9f34e7bd5568c32b7875017..06c088ab3296b58fab6db12b2084b98719a7e005 100755 (executable)
@@ -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
@@ -25,6 +25,7 @@ NORMAL_DIR=$(CURDIR)/debian/ncurses$(MY_ABI)
 THREAD_DIR=$(CURDIR)/debian/ncursest$(MY_ABI)
 
 CFLAGS   = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL)
+CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
 LDFLAGS  = $(shell dpkg-buildflags --get LDFLAGS)
 
@@ -55,29 +56,36 @@ configure = \
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
                --prefix=$(MY_DIR) \
-               --with-default-terminfo-dir=$(MYDATA) \
-               --with-terminfo-dirs=$(MYDATA):/usr/share/terminfo \
                --disable-echo \
                --disable-getcap \
                --disable-leaks \
                --disable-macros  \
                --disable-overwrite  \
+               --disable-relink \
                --disable-termcap \
                --enable-hard-tabs \
+               --enable-opaque-curses \
+               --enable-opaque-form \
+               --enable-opaque-menu \
+               --enable-opaque-panel \
                --enable-pc-files \
                --enable-warnings \
                --enable-wgetch-events \
                --enable-widec \
+               --enable-xmc-glitch \
                --program-suffix=$(MY_ABI) \
                --verbose \
                --with-abi-version=$(MY_ABI) \
+               --with-config-suffix=dev \
+               --with-cxx-shared \
+               --with-default-terminfo-dir=$(MYDATA) \
                --with-develop \
                --with-extra-suffix=$(MY_ABI) \
                --with-shared \
+               --with-terminfo-dirs=$(MYDATA):/lib/terminfo:/usr/share/terminfo \
                --with-termlib \
                --with-ticlib \
                --with-trace \
-               --with-cxx-shared \
                --with-versioned-syms \
                --with-xterm-kbs=DEL \
                --without-ada \
@@ -130,6 +138,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 +156,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,12 +186,35 @@ 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),)
        rm -f $(PACKAGES.indep:%=install-%-stamp)
        dh_testdir
        dh_testroot
+       dh_lintian           $(verbose) $(PACKAGES.arch:%=-p%)
        dh_installdocs       $(verbose) $(PACKAGES.indep:%=-p%)
        dh_installman        $(verbose) $(PACKAGES.indep:%=-p%)
        dh_installexamples   $(verbose) $(PACKAGES.indep:%=-p%)
@@ -194,6 +233,8 @@ ifneq ($(PACKAGES.arch),)
        rm -f $(PACKAGES.arch:%=install-%-stamp)
        dh_testdir
        dh_testroot
+       dh_lintian           $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_installdocs       $(verbose) $(PACKAGES.arch:%=-p%)
        dh_installchangelogs $(verbose) $(PACKAGES.arch:%=-p%)  NEWS
        dh_strip             $(verbose) $(PACKAGES.arch:%=-p%)
        dh_compress          $(verbose) $(PACKAGES.arch:%=-p%)