[PATCH] Debian: build-depend on "bc"
[git/git.git] / debian / rules
CommitLineData
7421abfd
EB
1#!/usr/bin/make -f
2# -*- makefile -*-
3
4# Uncomment this to turn on verbose mode.
5#export DH_VERBOSE=1
6
7CFLAGS = -g -Wall
8ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
9 CFLAGS += -O0
10else
11 CFLAGS += -O2
12endif
13export CFLAGS
14
a977d2cf
RA
15#
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.
20#
21HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
22ifeq (${HOST_ARCH},powerpc)
23 export PPC_SHA1=YesPlease
24else
25 export MOZILLA_SHA1=YesPlease
26endif
27
90bc118f
JH
28# We do have the requisite perl modules in the mainline, and
29# have no reason to shy away from this script.
30export WITH_SEND_EMAIL=YesPlease
a977d2cf 31
7421abfd
EB
32PREFIX := /usr
33MANDIR := /usr/share/man/
34
35SRC := ./
36DOC := Documentation/
37DESTDIR := $(CURDIR)/debian/tmp
38DOC_DESTDIR := $(DESTDIR)/usr/share/doc/git-core/
39MAN_DESTDIR := $(DESTDIR)/$(MANDIR)
40
71fb3de0
RA
41build: debian/build-stamp
42debian/build-stamp:
7421abfd 43 dh_testdir
28423758 44 $(MAKE) prefix=$(PREFIX) PYTHON_PATH=/usr/bin/python2.4 all doc test
7421abfd
EB
45 touch debian/build-stamp
46
47debian-clean:
48 dh_testdir
49 dh_testroot
50 rm -f debian/build-stamp
51 dh_clean
52
53clean: debian-clean
54 $(MAKE) clean
55
71fb3de0 56install: build
7421abfd
EB
57 dh_testdir
58 dh_testroot
59 dh_clean -k
60 dh_installdirs
61
5b6a8b64 62 make DESTDIR=$(DESTDIR) prefix=$(PREFIX) mandir=$(MANDIR) \
704a66f5 63 install install-doc
7421abfd
EB
64
65 mkdir -p $(DOC_DESTDIR)
66 find $(DOC) '(' -name '*.txt' -o -name '*.html' ')' -exec install {} $(DOC_DESTDIR) ';'
67
5acc5bfd
MU
68 dh_movefiles -p git-tk
69 dh_movefiles -p git-core
70 find debian/tmp -type d -o -print | sed -e 's/^/? /'
7421abfd 71
af36b70e 72binary-arch: build install
7421abfd
EB
73 dh_testdir
74 dh_testroot
af36b70e
MU
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
87
88binary-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
101
102binary: binary-arch binary-indep
7421abfd
EB
103
104.PHONY: build clean binary install clean debian-clean