b542f6f9477e897016266c5de308a9ac05209f70
1 #!/usr/bin/make -f
2 # debian/rules for tig
3 #
4 # Written by Sebastian Harl <sh@tokkee.org>
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 CFLAGS = -Wall -g -I/usr/include/ncursesw
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17 CFLAGS += -O0
18 else
19 CFLAGS += -O2
20 endif
22 config.status: configure
23 dh_testdir
24 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
25 --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc \
26 CFLAGS="$(CFLAGS)" LIBS="-lncursesw"
28 build: build-stamp
30 build-stamp: config.status
31 dh_testdir
33 $(MAKE) all doc
35 touch build-stamp
37 clean:
38 dh_testdir
39 dh_testroot
40 rm -f build-stamp
42 $(MAKE) clean
44 rm -f config.h config.log config.make config.status
45 rm -rf manual.html-chunked/
46 rm -f manual.pdf manual.html manual.toc
47 rm -f tig.1 tig.1.html tigrc.5 tigrc.5.html
49 dh_clean
51 install: build
52 dh_testdir
53 dh_testroot
54 dh_clean -k
55 dh_installdirs
57 $(MAKE) install install-doc DESTDIR=$(CURDIR)/debian/tig
59 mkdir -p debian/tig/etc/bash_completion.d
60 cp contrib/tig-completion.bash debian/tig/etc/bash_completion.d/tig
61 chmod 644 debian/tig/etc/bash_completion.d/tig
63 binary-indep:
64 # nothing to do here
66 binary-arch: build install
67 dh_testdir
68 dh_testroot
69 dh_installchangelogs
70 dh_installdocs NEWS BUGS TODO manual.pdf
71 dh_installexamples contrib/tigrc
72 dh_link
73 dh_strip
74 dh_compress -X.pdf
75 dh_fixperms
76 dh_installdeb
77 dh_shlibdeps
78 dh_gencontrol
79 dh_md5sums
80 dh_builddeb
82 binary: binary-indep binary-arch
83 .PHONY: build clean binary-indep binary-arch binary install patch unpatch