missing ncurses sources
[tomato.git] / release / src / router / libncurses / Ada95 / package / debian / rules
blobad1a35101b10a5081e52acf031c69e585a0103fa
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.
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
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)
14 TARGET_DIR = $(CURDIR)/debian/adacurses
15 SAMPLE_DIR = $(TARGET_DIR)/usr/bin/AdaCurses
17 CFLAGS =
19 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
20 CFLAGS += -O0
21 else
22 CFLAGS += -O2
23 endif
24 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
25 INSTALL_PROGRAM += -s
26 endif
29 configure: configure-stamp
30 configure-stamp:
31 dh_testdir
33 CFLAGS="$(CFLAGS)" ./configure \
34 --host=$(DEB_HOST_GNU_TYPE) \
35 --build=$(DEB_BUILD_GNU_TYPE) \
36 --prefix=/usr \
37 --disable-rpath-link \
38 --with-shared \
39 --with-ada-sharedlib
41 touch configure-stamp
43 build: build-stamp
44 build-stamp: configure-stamp
45 dh_testdir
47 $(MAKE)
49 touch build-stamp
51 clean:
52 dh_testdir
53 dh_testroot
55 [ ! -f makefile ] || $(MAKE) distclean
57 rm -f configure-stamp build-stamp install-stamp
59 dh_clean
61 install: install-stamp
62 install-stamp: build-stamp
63 dh_testdir
64 dh_testroot
65 dh_clean -k
66 dh_installdirs
68 $(MAKE) install DESTDIR=$(TARGET_DIR)
70 # FIXME: it would be nice to make these into separate packages
71 ( cd samples && $(MAKE) install.examples DESTDIR=$(TARGET_DIR) BINDIR=$(SAMPLE_DIR) )
72 ( cd doc && $(MAKE) install.html DESTDIR=$(TARGET_DIR) )
74 touch install-stamp
76 # Build architecture-independent files here.
77 binary-indep: build install
78 # No binary-indep target.
80 # Build architecture-dependent files here.
81 binary-arch: build install
82 dh_testdir
83 dh_testroot
84 dh_installdocs
85 dh_installexamples
86 dh_installchangelogs NEWS
87 dh_strip
88 dh_compress
89 dh_fixperms
90 dh_installdeb
91 dh_shlibdeps
92 dh_gencontrol
93 dh_md5sums
94 dh_builddeb
96 binary: binary-indep binary-arch
97 .PHONY: build clean binary-indep binary-arch binary install install-stamp