2012-06-09 08:43:33 +08:00
|
|
|
#!/usr/bin/make -f
|
2015-04-26 09:21:33 +08:00
|
|
|
# Made with the aid of dh_make, by Craig Small
|
2012-06-09 08:43:33 +08:00
|
|
|
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
|
|
|
|
# Some lines taken from debmake, by Cristoph Lameter.
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
# packages
|
|
|
|
PACKAGES.indep = # ncurses6-docs
|
|
|
|
PACKAGES.arch = ncurses6 ncursest6
|
|
|
|
|
2012-06-09 08:43:33 +08:00
|
|
|
# These are used for cross-compiling and for saving the configure script
|
|
|
|
# from having to guess our platform (since we know it already)
|
|
|
|
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
|
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
|
|
|
|
|
|
CC_NORMAL = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
|
|
|
|
CC_STRICT = $(CC_NORMAL) -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
|
|
|
|
|
2015-04-19 08:05:38 +08:00
|
|
|
MY_ABI=6
|
ncurses 5.9 - patch 20150502
+ modify the configure script to allow different default values
for ABI 5 versus ABI 6.
+ add wgetch-events to test-packages.
+ add a note on how to build ncurses-examples to test/README.
+ fix a memory leak in delscreen (report by Daniel Kahn Gillmor,
Debian #783486) -TD
+ remove unnecessary ';' from E3 capabilities -TD
+ add tmux entry, derived from screen (patch by Nicholas Marriott).
+ split-out recent change to nsterm-bce as nsterm-build326, and add
nsterm-build342 to reflect changes with successive releases of OSX
(discussion with Leonardo B Schenkel)
+ add xon, ich1, il1 to ibm3161 (patch by Stephen Powell, Debian
#783806)
+ add sample "magic" file, to document ext-putwin.
+ modify gen-pkgconfig.in to add explicit -ltinfo, etc., to the
generated ".pc" file when ld option "--as-needed" is used, or when
ncurses and tinfo are installed without using rpath (prompted by
discussion with Sylvain Bertrand).
+ modify test-package for ncurses6 to omit rpath feature when installed
in /usr.
+ add OSX's "*.dSYM" to clean-rules in makefiles.
+ make extra-suffix work for OSX configuration, e.g., for shared
libraries.
+ modify Ada95/configure script to work with pkg-config
+ move test-package for ncurses6 to /usr, since filename-conflicts have
been eliminated.
+ corrected build rules for Ada95/gen/generate; it does not depend on
the ncurses library aside from headers.
+ reviewed man pages, fixed a few other spelling errors.
+ fix a typo in curs_util.3x (Sven Joachim).
+ use extra-suffix in some overlooked shared library dependencies
found by 20150425 changes for test-packages.
+ update config.guess, config.sub from
http://git.savannah.gnu.org/cgit/config.git
2015-05-03 09:06:46 +08:00
|
|
|
MY_DIR=/usr
|
2012-06-09 08:43:33 +08:00
|
|
|
MYDATA=/usr/local/ncurses/share/terminfo
|
2015-07-12 09:32:50 +08:00
|
|
|
NORMAL_DIR=$(CURDIR)/debian/ncurses$(MY_ABI)
|
|
|
|
THREAD_DIR=$(CURDIR)/debian/ncursest$(MY_ABI)
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-05-17 05:01:22 +08:00
|
|
|
CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL)
|
|
|
|
CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
|
|
|
|
LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
|
2012-06-09 08:43:33 +08:00
|
|
|
|
ncurses 5.9 - patch 20150502
+ modify the configure script to allow different default values
for ABI 5 versus ABI 6.
+ add wgetch-events to test-packages.
+ add a note on how to build ncurses-examples to test/README.
+ fix a memory leak in delscreen (report by Daniel Kahn Gillmor,
Debian #783486) -TD
+ remove unnecessary ';' from E3 capabilities -TD
+ add tmux entry, derived from screen (patch by Nicholas Marriott).
+ split-out recent change to nsterm-bce as nsterm-build326, and add
nsterm-build342 to reflect changes with successive releases of OSX
(discussion with Leonardo B Schenkel)
+ add xon, ich1, il1 to ibm3161 (patch by Stephen Powell, Debian
#783806)
+ add sample "magic" file, to document ext-putwin.
+ modify gen-pkgconfig.in to add explicit -ltinfo, etc., to the
generated ".pc" file when ld option "--as-needed" is used, or when
ncurses and tinfo are installed without using rpath (prompted by
discussion with Sylvain Bertrand).
+ modify test-package for ncurses6 to omit rpath feature when installed
in /usr.
+ add OSX's "*.dSYM" to clean-rules in makefiles.
+ make extra-suffix work for OSX configuration, e.g., for shared
libraries.
+ modify Ada95/configure script to work with pkg-config
+ move test-package for ncurses6 to /usr, since filename-conflicts have
been eliminated.
+ corrected build rules for Ada95/gen/generate; it does not depend on
the ncurses library aside from headers.
+ reviewed man pages, fixed a few other spelling errors.
+ fix a typo in curs_util.3x (Sven Joachim).
+ use extra-suffix in some overlooked shared library dependencies
found by 20150425 changes for test-packages.
+ update config.guess, config.sub from
http://git.savannah.gnu.org/cgit/config.git
2015-05-03 09:06:46 +08:00
|
|
|
ifneq ($(MY_DIR),/usr)
|
|
|
|
RPATH_ENV = RPATH_LIST=../lib:$(MY_DIR)/lib
|
|
|
|
RPATH_OPT = --enable-rpath
|
|
|
|
else
|
|
|
|
RPATH_ENV =
|
|
|
|
RPATH_OPT = --disable-rpath --disable-rpath-hack
|
|
|
|
endif
|
|
|
|
|
2012-06-09 08:43:33 +08:00
|
|
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
|
|
|
CFLAGS += -O0
|
|
|
|
else
|
|
|
|
CFLAGS += -O2
|
|
|
|
endif
|
|
|
|
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|
|
|
INSTALL_PROGRAM += -s
|
|
|
|
endif
|
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
verbose = # -v
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
configure = \
|
2015-05-17 05:01:22 +08:00
|
|
|
$(RPATH_ENV) \
|
|
|
|
CFLAGS="$(CFLAGS)" \
|
|
|
|
CPPFLAGS="$(CPPFLAGS)" \
|
2015-07-12 09:32:50 +08:00
|
|
|
LDFLAGS="$(LDFLAGS)" ../../configure $(RPATH_OPT) \
|
2012-06-09 08:43:33 +08:00
|
|
|
--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 \
|
ncurses 5.9 - patch 20150502
+ modify the configure script to allow different default values
for ABI 5 versus ABI 6.
+ add wgetch-events to test-packages.
+ add a note on how to build ncurses-examples to test/README.
+ fix a memory leak in delscreen (report by Daniel Kahn Gillmor,
Debian #783486) -TD
+ remove unnecessary ';' from E3 capabilities -TD
+ add tmux entry, derived from screen (patch by Nicholas Marriott).
+ split-out recent change to nsterm-bce as nsterm-build326, and add
nsterm-build342 to reflect changes with successive releases of OSX
(discussion with Leonardo B Schenkel)
+ add xon, ich1, il1 to ibm3161 (patch by Stephen Powell, Debian
#783806)
+ add sample "magic" file, to document ext-putwin.
+ modify gen-pkgconfig.in to add explicit -ltinfo, etc., to the
generated ".pc" file when ld option "--as-needed" is used, or when
ncurses and tinfo are installed without using rpath (prompted by
discussion with Sylvain Bertrand).
+ modify test-package for ncurses6 to omit rpath feature when installed
in /usr.
+ add OSX's "*.dSYM" to clean-rules in makefiles.
+ make extra-suffix work for OSX configuration, e.g., for shared
libraries.
+ modify Ada95/configure script to work with pkg-config
+ move test-package for ncurses6 to /usr, since filename-conflicts have
been eliminated.
+ corrected build rules for Ada95/gen/generate; it does not depend on
the ncurses library aside from headers.
+ reviewed man pages, fixed a few other spelling errors.
+ fix a typo in curs_util.3x (Sven Joachim).
+ use extra-suffix in some overlooked shared library dependencies
found by 20150425 changes for test-packages.
+ update config.guess, config.sub from
http://git.savannah.gnu.org/cgit/config.git
2015-05-03 09:06:46 +08:00
|
|
|
--disable-overwrite \
|
2012-06-09 08:43:33 +08:00
|
|
|
--disable-termcap \
|
|
|
|
--enable-hard-tabs \
|
2014-12-14 10:33:09 +08:00
|
|
|
--enable-pc-files \
|
2012-06-09 08:43:33 +08:00
|
|
|
--enable-warnings \
|
ncurses 5.9 - patch 20150502
+ modify the configure script to allow different default values
for ABI 5 versus ABI 6.
+ add wgetch-events to test-packages.
+ add a note on how to build ncurses-examples to test/README.
+ fix a memory leak in delscreen (report by Daniel Kahn Gillmor,
Debian #783486) -TD
+ remove unnecessary ';' from E3 capabilities -TD
+ add tmux entry, derived from screen (patch by Nicholas Marriott).
+ split-out recent change to nsterm-bce as nsterm-build326, and add
nsterm-build342 to reflect changes with successive releases of OSX
(discussion with Leonardo B Schenkel)
+ add xon, ich1, il1 to ibm3161 (patch by Stephen Powell, Debian
#783806)
+ add sample "magic" file, to document ext-putwin.
+ modify gen-pkgconfig.in to add explicit -ltinfo, etc., to the
generated ".pc" file when ld option "--as-needed" is used, or when
ncurses and tinfo are installed without using rpath (prompted by
discussion with Sylvain Bertrand).
+ modify test-package for ncurses6 to omit rpath feature when installed
in /usr.
+ add OSX's "*.dSYM" to clean-rules in makefiles.
+ make extra-suffix work for OSX configuration, e.g., for shared
libraries.
+ modify Ada95/configure script to work with pkg-config
+ move test-package for ncurses6 to /usr, since filename-conflicts have
been eliminated.
+ corrected build rules for Ada95/gen/generate; it does not depend on
the ncurses library aside from headers.
+ reviewed man pages, fixed a few other spelling errors.
+ fix a typo in curs_util.3x (Sven Joachim).
+ use extra-suffix in some overlooked shared library dependencies
found by 20150425 changes for test-packages.
+ update config.guess, config.sub from
http://git.savannah.gnu.org/cgit/config.git
2015-05-03 09:06:46 +08:00
|
|
|
--enable-wgetch-events \
|
2012-06-09 08:43:33 +08:00
|
|
|
--enable-widec \
|
2015-04-19 08:05:38 +08:00
|
|
|
--program-suffix=$(MY_ABI) \
|
2012-06-09 08:43:33 +08:00
|
|
|
--verbose \
|
2015-06-07 09:16:17 +08:00
|
|
|
--with-abi-version=$(MY_ABI) \
|
2012-06-09 08:43:33 +08:00
|
|
|
--with-develop \
|
2015-04-19 08:05:38 +08:00
|
|
|
--with-extra-suffix=$(MY_ABI) \
|
2012-06-09 08:43:33 +08:00
|
|
|
--with-shared \
|
|
|
|
--with-termlib \
|
|
|
|
--with-ticlib \
|
|
|
|
--with-trace \
|
2013-04-07 09:11:39 +08:00
|
|
|
--with-cxx-shared \
|
2014-11-16 12:08:00 +08:00
|
|
|
--with-versioned-syms \
|
2012-06-09 08:43:33 +08:00
|
|
|
--with-xterm-kbs=DEL \
|
|
|
|
--without-ada \
|
|
|
|
--without-debug \
|
|
|
|
--without-normal
|
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
NCURSES6_DIR = $(CURDIR)/debian/ncurses6
|
|
|
|
NCURSEST6_DIR = $(CURDIR)/debian/ncursest6
|
|
|
|
|
|
|
|
.PHONY: all config build install binary clean config-indep config-arch \
|
|
|
|
build-indep build-arch install-indep install-arch binary-indep \
|
|
|
|
binary-arch
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
all: build
|
|
|
|
|
|
|
|
config: config-indep config-arch
|
|
|
|
build: build-indep build-arch
|
|
|
|
install: install-indep install-arch
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
clean:
|
2012-06-09 08:43:33 +08:00
|
|
|
dh_testdir
|
2015-07-12 09:32:50 +08:00
|
|
|
dh_testroot
|
|
|
|
dh_clean $(verbose)
|
|
|
|
rm -rf t
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
config-indep: $(PACKAGES.indep:%=config-%-stamp)
|
|
|
|
config-arch: $(PACKAGES.arch:%=config-%-stamp)
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
build-indep: $(PACKAGES.indep:%=build-%-stamp)
|
|
|
|
build-arch: $(PACKAGES.arch:%=build-%-stamp)
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
install-indep: $(PACKAGES.indep:%=install-%-stamp)
|
|
|
|
install-arch: $(PACKAGES.arch:%=install-%-stamp)
|
|
|
|
|
|
|
|
config-ncurses6-stamp:
|
|
|
|
dh_testdir
|
|
|
|
rm -rf t/ncurses6
|
|
|
|
mkdir -p t/ncurses6
|
|
|
|
cd t/ncurses6; $(configure)
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
config-ncursest6-stamp:
|
|
|
|
dh_testdir
|
|
|
|
rm -rf t/ncursest6
|
|
|
|
mkdir -p t/ncursest6
|
|
|
|
cd t/ncursest6; $(configure) \
|
|
|
|
--enable-interop \
|
|
|
|
--enable-sp-funcs \
|
|
|
|
--program-suffix=t$(MY_ABI) \
|
|
|
|
--with-pthread
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
build-ncurses6-stamp: config-ncurses6-stamp
|
|
|
|
dh_testdir
|
|
|
|
|
|
|
|
$(MAKE) -C t/ncurses6
|
|
|
|
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
build-ncursest6-stamp: config-ncursest6-stamp
|
|
|
|
dh_testdir
|
|
|
|
|
|
|
|
$(MAKE) -C t/ncursest6
|
|
|
|
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
install-ncurses6-stamp: build-ncurses6-stamp
|
2012-06-09 08:43:33 +08:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2015-07-12 09:32:50 +08:00
|
|
|
dh_installdirs $(verbose)
|
|
|
|
dh_prep $(verbose) -pncurses6
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
$(MAKE) -C t/ncurses6 install.libs install.progs DESTDIR=$(NCURSES6_DIR)
|
|
|
|
$(MAKE) -C t/ncurses6/test ncurses LOCAL_LIBDIR=$(MY_DIR)/lib
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
mv t/ncurses6/test/ncurses $(NCURSES6_DIR)$(MY_DIR)/bin/ncurses$(MY_ABI)
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
touch $@
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
install-ncursest6-stamp: build-ncursest6-stamp
|
2012-06-09 08:43:33 +08:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2015-07-12 09:32:50 +08:00
|
|
|
dh_installdirs $(verbose)
|
|
|
|
dh_prep $(verbose) -pncursest6
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
$(MAKE) -C t/ncursest6 install.libs install.progs DESTDIR=$(NCURSEST6_DIR)
|
|
|
|
$(MAKE) -C t/ncursest6/test ncurses LOCAL_LIBDIR=$(MY_DIR)/lib
|
2012-10-28 07:06:26 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
mv t/ncursest6/test/ncurses $(NCURSEST6_DIR)$(MY_DIR)/bin/ncursest$(MY_ABI)
|
2012-06-09 08:43:33 +08:00
|
|
|
|
2015-07-12 09:32:50 +08:00
|
|
|
touch $@
|
2012-06-09 08:43:33 +08:00
|
|
|
|
|
|
|
# Build architecture-independent files here.
|
2015-07-12 09:32:50 +08:00
|
|
|
binary-indep: install-indep
|
|
|
|
ifneq ($(PACKAGES.indep),)
|
|
|
|
rm -f $(PACKAGES.indep:%=install-%-stamp)
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installdocs $(verbose) $(PACKAGES.indep:%=-p%)
|
|
|
|
dh_installman $(verbose) $(PACKAGES.indep:%=-p%)
|
|
|
|
dh_installexamples $(verbose) $(PACKAGES.indep:%=-p%)
|
|
|
|
dh_installchangelogs $(verbose) $(PACKAGES.indep:%=-p%) NEWS
|
|
|
|
dh_compress $(verbose) $(PACKAGES.indep:%=-p%)
|
|
|
|
dh_fixperms $(verbose) $(PACKAGES.indep:%=-p%)
|
|
|
|
dh_installdeb $(verbose) $(PACKAGES.indep:%=-p%)
|
|
|
|
dh_gencontrol $(verbose) $(PACKAGES.indep:%=-p%)
|
|
|
|
dh_md5sums $(verbose) $(PACKAGES.indep:%=-p%)
|
|
|
|
dh_builddeb $(verbose) $(PACKAGES.indep:%=-p%)
|
|
|
|
endif
|
2012-06-09 08:43:33 +08:00
|
|
|
|
|
|
|
# Build architecture-dependent files here.
|
2015-07-12 09:32:50 +08:00
|
|
|
binary-arch: install-arch
|
|
|
|
ifneq ($(PACKAGES.arch),)
|
|
|
|
rm -f $(PACKAGES.arch:%=install-%-stamp)
|
2012-06-09 08:43:33 +08:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2015-07-12 09:32:50 +08:00
|
|
|
dh_installchangelogs $(verbose) $(PACKAGES.arch:%=-p%) NEWS
|
|
|
|
dh_strip $(verbose) $(PACKAGES.arch:%=-p%)
|
|
|
|
dh_compress $(verbose) $(PACKAGES.arch:%=-p%)
|
|
|
|
dh_fixperms $(verbose) $(PACKAGES.arch:%=-p%)
|
|
|
|
dh_installdeb $(verbose) $(PACKAGES.arch:%=-p%)
|
|
|
|
dh_makeshlibs $(verbose) $(PACKAGES.arch:%=-p%)
|
|
|
|
dh_shlibdeps $(verbose) $(PACKAGES.arch:%=-p%)
|
|
|
|
dh_gencontrol $(verbose) $(PACKAGES.arch:%=-p%)
|
|
|
|
dh_md5sums $(verbose) $(PACKAGES.arch:%=-p%)
|
|
|
|
dh_builddeb $(verbose) $(PACKAGES.arch:%=-p%)
|
|
|
|
endif
|