1 #!/usr/bin/make -f
2 # debian/ruls 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 CFLAGS = -Wall -g
11 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
12 CFLAGS += -O0
13 else
14 CFLAGS += -O2
15 endif
17 build: build-stamp
19 build-stamp:
20 dh_testdir
22 CFLAGS="$(FLAGS)" $(MAKE) all doc
24 touch build-stamp
26 clean:
27 dh_testdir
28 dh_testroot
29 rm -f build-stamp
31 $(MAKE) clean
33 dh_clean
35 install: build
36 dh_testdir
37 dh_testroot
38 dh_clean -k
39 dh_installdirs
41 $(MAKE) install install-doc DESTDIR=$(CURDIR)/debian/tig \
42 prefix=/usr mandir=/usr/share/man
44 mkdir -p debian/tig/etc/bash_completion.d
45 cp contrib/tig-completion.bash debian/tig/etc/bash_completion.d/tig
46 chmod 644 debian/tig/etc/bash_completion.d/tig
48 binary-indep:
49 # nothing to do here
51 binary-arch: build install
52 dh_testdir
53 dh_testroot
54 dh_installchangelogs
55 dh_installdocs BUGS TODO manual.pdf
56 dh_installexamples contrib/tigrc
57 dh_link
58 dh_strip
59 dh_compress -X.pdf
60 dh_fixperms
61 dh_installdeb
62 dh_shlibdeps
63 dh_gencontrol
64 dh_md5sums
65 dh_builddeb
67 binary: binary-indep binary-arch
68 .PHONY: build clean binary-indep binary-arch binary install patch unpatch