[PATCH] Use '-d' as the first flag to 'install'
[git/gitweb.git] / debian / rules
blob1a53ca239853b34065ae7edd94039acb1889d6aa
1 #!/usr/bin/make -f
2 # -*- makefile -*-
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
7 CFLAGS = -g -Wall
8 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
9 CFLAGS += -O0
10 else
11 CFLAGS += -O2
12 endif
13 export CFLAGS
16 # On PowerPC we compile against the hand-crafted assembly, on all
17 # other architectures we compile against GPL'ed sha1 code lifted
18 # from Mozilla. OpenSSL is strangely licensed and best avoided
19 # in Debian.
21 HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
22 ifeq (${HOST_ARCH},powerpc)
23 export PPC_SHA1=YesPlease
24 else
25 export MOZILLA_SHA1=YesPlease
26 endif
28 # We do have the requisite perl modules in the mainline, and
29 # have no reason to shy away from this script.
30 export WITH_SEND_EMAIL=YesPlease
32 PREFIX := /usr
33 MANDIR := /usr/share/man/
35 SRC := ./
36 DOC := Documentation/
37 DESTDIR := $(CURDIR)/debian/tmp
38 DOC_DESTDIR := $(DESTDIR)/usr/share/doc/git-core/
39 MAN_DESTDIR := $(DESTDIR)/$(MANDIR)
41 build: debian/build-stamp
42 debian/build-stamp:
43 dh_testdir
44 $(MAKE) prefix=$(PREFIX) PYTHON_PATH=/usr/bin/python2.4 all doc
45 touch debian/build-stamp
47 debian-clean:
48 dh_testdir
49 dh_testroot
50 rm -f debian/build-stamp
51 dh_clean
53 clean: debian-clean
54 $(MAKE) clean
56 install: build
57 dh_testdir
58 dh_testroot
59 dh_clean -k
60 dh_installdirs
62 make DESTDIR=$(DESTDIR) prefix=$(PREFIX) mandir=$(MANDIR) \
63 install install-doc
65 mkdir -p $(DOC_DESTDIR)
66 find $(DOC) '(' -name '*.txt' -o -name '*.html' ')' -exec install {} $(DOC_DESTDIR) ';'
68 dh_movefiles -p git-tk
69 dh_movefiles -p git-core
70 find debian/tmp -type d -o -print | sed -e 's/^/? /'
72 binary-arch: build install
73 dh_testdir
74 dh_testroot
75 dh_installchangelogs -a
76 dh_installdocs -a
77 dh_strip -a
78 dh_compress -a
79 dh_fixperms -a
80 dh_perl -a
81 dh_makeshlibs -a
82 dh_installdeb -a
83 dh_shlibdeps -a
84 dh_gencontrol -a
85 dh_md5sums -a
86 dh_builddeb -a
88 binary-indep: build install
89 dh_testdir
90 dh_testroot
91 dh_installchangelogs -i
92 dh_installdocs -i
93 dh_compress -i
94 dh_fixperms -i
95 dh_makeshlibs -i
96 dh_installdeb -i
97 dh_shlibdeps -i
98 dh_gencontrol -i
99 dh_md5sums -i
100 dh_builddeb -i
102 binary: binary-arch binary-indep
104 .PHONY: build clean binary install clean debian-clean