Debian packaging fixes.
[alt-git.git] / debian / rules
blob921aeecfb44c9ef55e4755adea6265a74193bcb0
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
29 PREFIX := /usr
30 MANDIR := /usr/share/man/
32 SRC := ./
33 DOC := Documentation/
34 DESTDIR := $(CURDIR)/debian/tmp
35 DOC_DESTDIR := $(DESTDIR)/usr/share/doc/git-core/
36 MAN_DESTDIR := $(DESTDIR)/$(MANDIR)
38 build: debian/build-stamp
39 debian/build-stamp:
40 dh_testdir
41 $(MAKE) prefix=$(PREFIX) all doc
42 touch debian/build-stamp
44 debian-clean:
45 dh_testdir
46 dh_testroot
47 rm -f debian/build-stamp
48 dh_clean
50 clean: debian-clean
51 $(MAKE) clean
53 install: build
54 dh_testdir
55 dh_testroot
56 dh_clean -k
57 dh_installdirs
59 make dest=$(DESTDIR) prefix=$(PREFIX) mandir=$(MANDIR) install install-tools install-doc
61 mkdir -p $(DOC_DESTDIR)
62 find $(DOC) '(' -name '*.txt' -o -name '*.html' ')' -exec install {} $(DOC_DESTDIR) ';'
64 dh_movefiles -p git-tk
65 dh_movefiles -p git-core
66 find debian/tmp -type d -o -print | sed -e 's/^/? /'
68 binary: build install
69 dh_testdir
70 dh_testroot
71 dh_installchangelogs
72 dh_installdocs
73 dh_installexamples
74 # dh_installmenu
75 # dh_installdebconf
76 # dh_installlogrotate
77 # dh_installemacsen
78 # dh_installpam
79 # dh_installmime
80 # dh_installinit
81 # dh_installcron
82 # dh_installinfo
83 dh_installman
84 dh_link
85 dh_strip
86 dh_compress
87 dh_fixperms
88 # dh_perl
89 # dh_python
90 dh_makeshlibs
91 dh_installdeb
92 dh_shlibdeps
93 dh_gencontrol
94 dh_md5sums
95 dh_builddeb
97 .PHONY: build clean binary install clean debian-clean