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 binary-indep:
45 # nothing to do here
47 binary-arch: build install
48 dh_testdir
49 dh_testroot
50 dh_installchangelogs
51 dh_installdocs BUGS TODO manual.pdf
52 dh_installexamples tigrc
53 dh_link
54 dh_strip
55 dh_compress -X.pdf
56 dh_fixperms
57 dh_installdeb
58 dh_shlibdeps
59 dh_gencontrol
60 dh_md5sums
61 dh_builddeb
63 binary: binary-indep binary-arch
64 .PHONY: build clean binary-indep binary-arch binary install patch unpatch