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