]> ncurses.scripts.mit.edu Git - ncurses.git/blob - package/debian/rules
ncurses 5.9 - patch 20150418
[ncurses.git] / package / debian / rules
1 #!/usr/bin/make -f
2 # MAde with the aid of dh_make, by Craig Small
3 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
4 # Some lines taken from debmake, by Cristoph Lameter.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
13
14 CC_NORMAL = -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
15 CC_STRICT = $(CC_NORMAL) -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
16
17 MY_ABI=6
18 MY_DIR=/usr/local/ncurses$(MY_ABI)
19 MYDATA=/usr/local/ncurses/share/terminfo
20 BUILD_DIR=$(CURDIR)/debian/ncurses$(MY_ABI)
21
22 CFLAGS = $(CC_NORMAL)
23
24 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25         CFLAGS += -O0
26 else
27         CFLAGS += -O2
28 endif
29 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
30         INSTALL_PROGRAM += -s
31 endif
32
33
34 configure: configure-stamp
35 configure-stamp:
36         dh_testdir
37
38         RPATH_LIST=../lib:$(MY_DIR)/lib \
39         CFLAGS="$(CFLAGS)" ./configure \
40                 --host=$(DEB_HOST_GNU_TYPE) \
41                 --build=$(DEB_BUILD_GNU_TYPE) \
42                 --prefix=$(MY_DIR) \
43                 --with-default-terminfo-dir=$(MYDATA) \
44                 --with-terminfo-dirs=$(MYDATA):/usr/share/terminfo \
45                 --disable-echo \
46                 --disable-getcap \
47                 --disable-leaks \
48                 --disable-macros  \
49                 --disable-termcap \
50                 --enable-const \
51                 --enable-ext-colors \
52                 --enable-ext-mouse \
53                 --enable-ext-putwin \
54                 --enable-hard-tabs \
55                 --enable-interop \
56                 --enable-pc-files \
57                 --enable-rpath \
58                 --enable-sp-funcs \
59                 --enable-warnings \
60                 --enable-widec \
61                 --program-suffix=$(MY_ABI) \
62                 --verbose \
63                 --with-chtype=uint32_t \
64                 --with-mmask_t=uint32_t \
65                 --with-develop \
66                 --with-extra-suffix=$(MY_ABI) \
67                 --with-shared \
68                 --with-termlib \
69                 --with-ticlib \
70                 --with-trace \
71                 --with-cxx-shared \
72                 --with-versioned-syms \
73                 --with-xterm-kbs=DEL \
74                 --without-ada \
75                 --without-debug \
76                 --without-normal
77
78         touch configure-stamp
79
80 build: build-stamp
81 build-stamp: configure-stamp
82         dh_testdir
83
84         $(MAKE)
85
86         touch build-stamp
87
88 clean:
89         dh_testdir
90         dh_testroot
91
92         [ ! -f makefile ] || $(MAKE) distclean
93
94         rm -f configure-stamp build-stamp install-stamp
95
96         dh_clean
97
98 install: install-stamp
99 install-stamp: build-stamp
100         dh_testdir
101         dh_testroot
102         dh_clean -k
103         dh_installdirs
104
105         $(MAKE) install.libs install.progs DESTDIR=$(BUILD_DIR)
106
107         ( cd test && make ncurses LOCAL_LIBDIR=$(MY_DIR)/lib )
108         mv test/ncurses $(BUILD_DIR)$(MY_DIR)/bin/ncurses$(MY_ABI)
109
110         touch install-stamp
111
112 # Build architecture-independent files here.
113 binary-indep: build install
114 # No binary-indep target.
115
116 # Build architecture-dependent files here.
117 binary-arch: build install
118         dh_testdir
119         dh_testroot
120         dh_installchangelogs NEWS
121         dh_strip
122         dh_compress
123         dh_fixperms
124         dh_installdeb
125         dh_shlibdeps
126         dh_gencontrol
127         dh_md5sums
128         dh_builddeb
129
130 binary: binary-indep binary-arch
131 .PHONY: build clean binary-indep binary-arch binary install install-stamp