]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/dialog/package/debian/rules
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / dialog / 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 CFLAGS =
15
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17         CFLAGS += -O0
18 else
19         CFLAGS += -O2
20 endif
21 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
22         INSTALL_PROGRAM += -s
23 endif
24
25
26 configure: configure-stamp
27 configure-stamp:
28         dh_testdir
29
30         CFLAGS="$(CFLAGS)" ./configure \
31                 --host=$(DEB_HOST_GNU_TYPE) \
32                 --build=$(DEB_BUILD_GNU_TYPE) \
33                 --prefix=/usr \
34                 --mandir=\$${prefix}/share/man \
35                 --enable-nls \
36                 --enable-header-subdir \
37                 --enable-widec \
38                 --with-libtool \
39                 --with-ncursesw \
40                 --with-package=cdialog \
41                 --disable-rpath-hack
42
43         touch configure-stamp
44
45 build: build-stamp
46 build-stamp: configure-stamp
47         dh_testdir
48
49         $(MAKE)
50
51         touch build-stamp
52
53 clean:
54         dh_testdir
55         dh_testroot
56
57         [ ! -f makefile ] || $(MAKE) distclean
58
59         rm -f configure-stamp build-stamp install-stamp
60
61         dh_clean
62
63 install: install-stamp
64 install-stamp: build-stamp
65         dh_testdir
66         dh_testroot
67         dh_clean -k
68         dh_installdirs
69
70         $(MAKE) install DESTDIR=$(CURDIR)/debian/cdialog
71
72         touch install-stamp
73
74 # Build architecture-independent files here.
75 binary-indep: build install
76 # No binary-indep target.
77
78 # Build architecture-dependent files here.
79 binary-arch: build install
80         dh_testdir
81         dh_testroot
82         dh_installdocs
83         dh_installexamples
84         dh_installchangelogs CHANGES
85         dh_strip
86         dh_compress
87         dh_fixperms
88         dh_installdeb
89         dh_shlibdeps
90         dh_gencontrol
91         dh_md5sums
92         dh_builddeb
93
94 binary: binary-indep binary-arch
95 .PHONY: build clean binary-indep binary-arch binary install install-stamp