]> ncurses.scripts.mit.edu Git - ncurses.git/blob - package/debian/rules
ncurses 5.9 - patch 20120826
[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_DIR=/usr/local/ncurses6
18 MYDATA=/usr/local/ncurses/share/terminfo
19
20 CFLAGS = $(CC_NORMAL)
21
22 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
23         CFLAGS += -O0
24 else
25         CFLAGS += -O2
26 endif
27 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
28         INSTALL_PROGRAM += -s
29 endif
30
31
32 configure: configure-stamp
33 configure-stamp:
34         dh_testdir
35
36         RPATH_LIST=../lib:$(MY_DIR)/lib \
37         CFLAGS="$(CFLAGS)" ./configure \
38                 --host=$(DEB_HOST_GNU_TYPE) \
39                 --build=$(DEB_BUILD_GNU_TYPE) \
40                 --prefix=$(MY_DIR) \
41                 --with-default-terminfo-dir=$(MYDATA) \
42                 --with-terminfo-dirs=$(MYDATA):/usr/share/terminfo \
43                 --disable-echo \
44                 --disable-getcap \
45                 --disable-leaks \
46                 --disable-macros  \
47                 --disable-termcap \
48                 --enable-const \
49                 --enable-ext-colors \
50                 --enable-ext-mouse \
51                 --enable-hard-tabs \
52                 --enable-interop \
53                 --enable-rpath \
54                 --enable-sp-funcs \
55                 --enable-warnings \
56                 --enable-widec \
57                 --verbose \
58                 --with-develop \
59                 --with-shared \
60                 --with-termlib \
61                 --with-ticlib \
62                 --with-trace \
63                 --with-xterm-kbs=DEL \
64                 --without-ada \
65                 --without-debug \
66                 --without-normal
67
68         touch configure-stamp
69
70 build: build-stamp
71 build-stamp: configure-stamp
72         dh_testdir
73
74         $(MAKE)
75
76         touch build-stamp
77
78 clean:
79         dh_testdir
80         dh_testroot
81
82         [ ! -f makefile ] || $(MAKE) distclean
83
84         rm -f configure-stamp build-stamp install-stamp
85
86         dh_clean
87
88 install: install-stamp
89 install-stamp: build-stamp
90         dh_testdir
91         dh_testroot
92         dh_clean -k
93         dh_installdirs
94
95         $(MAKE) install.libs install.progs DESTDIR=$(CURDIR)/debian/ncurses6
96
97         touch install-stamp
98
99 # Build architecture-independent files here.
100 binary-indep: build install
101 # No binary-indep target.
102
103 # Build architecture-dependent files here.
104 binary-arch: build install
105         dh_testdir
106         dh_testroot
107         dh_installchangelogs NEWS
108         dh_strip
109         dh_compress
110         dh_fixperms
111         dh_installdeb
112         dh_shlibdeps
113         dh_gencontrol
114         dh_md5sums
115         dh_builddeb
116
117 binary: binary-indep binary-arch
118 .PHONY: build clean binary-indep binary-arch binary install install-stamp