4 CPPFLAGS
:=$(shell dpkg-buildflags
--get CPPFLAGS
)
5 CFLAGS
:=-Wall
$(shell dpkg-buildflags
--get CFLAGS
) $(CPPFLAGS
)
6 LDFLAGS
:=$(shell dpkg-buildflags
--get LDFLAGS
)
8 OPTS
=NO_OPENSSL
=1 prefix=/usr gitexecdir
=/usr
/lib
/git-core \
9 libexecdir
=/usr
/lib
/git-core \
10 mandir=/usr
/share
/man htmldir
=/usr
/share
/doc
/git
/html \
13 SANE_TOOL_PATH
= INSTALL
=install TAR
=tar \
14 NO_CROSS_DIRECTORY_HARDLINKS
=1 NO_INSTALL_HARDLINKS
=1 \
15 DEFAULT_PAGER
=pager DEFAULT_EDITOR
=editor \
17 CC
='$(CC)' CFLAGS
='$(CFLAGS)' LDFLAGS
='$(LDFLAGS)'
18 DOC_OPTS
=prefix=/usr htmldir
=/usr
/share
/doc
/git
/html \
20 ASCIIDOC8
=1 ASCIIDOC_NO_ROFF
=1
22 # https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGeneratedByAsciidoc
23 DOC_OPTS
+= ASCIIDOC
='TZ=UTC asciidoc'
25 ifneq (,$(findstring nocheck
,$(DEB_BUILD_OPTIONS
)))
28 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
29 NUMJOBS
= $(patsubst parallel
=%,%,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
30 MAKEFLAGS
+= -j
$(NUMJOBS
)
31 # Setting this with a pattern-specific rule prevents -O from
32 # affecting the top-level make, which would break realtime build
33 # output (unless dh is run as +dh, which causes other problems).
37 TMP
= $(CURDIR
)/debian
/tmp
38 GIT
= $(CURDIR
)/debian
/git
43 override_dh_auto_configure
:
50 override_dh_auto_build-arch
: build-stamp
51 $(MAKE
) -C contrib
/subtree
all $(OPTS
)
52 ln
-s contrib
/subtree
/git-subtree
54 override_dh_auto_test-arch
:
55 test -z
'$(TEST)' || \
56 $(MAKE
) $(TEST
) $(OPTS
) || \
57 GIT_TEST_OPTS
=--verbose
$(MAKE
) $(TEST
) $(OPTS
)
58 test -z
'$(TEST)' || \
59 $(MAKE
) -C contrib
/subtree
$(TEST
) $(OPTS
) || \
60 GIT_TEST_OPTS
=--verbose
$(MAKE
) -C contrib
/subtree
$(TEST
) $(OPTS
)
62 override_dh_auto_build-indep
: build-stamp
64 $(MAKE
) -CDocumentation man html
$(DOC_OPTS
)
66 $(MAKE
) -Ccontrib
/mw-to-git
all $(OPTS
)
68 override_dh_auto_test-indep
:
70 override_dh_auto_clean
:
71 $(MAKE
) -C contrib
/mw-to-git
clean $(OPTS
)
72 $(MAKE
) -C contrib
/subtree
clean $(OPTS
)
76 override_dh_auto_install-arch
:
78 DESTDIR
='$(GIT)' $(MAKE
) install $(OPTS
)
79 DESTDIR
='$(GIT)' $(MAKE
) -C contrib
/subtree
install $(OPTS
)
80 install -d
-m0755
'$(GIT)'/var
/lib
/git
81 rm -f
'$(GIT)'/usr
/share
/perl5
/Error.pm
82 rm -rf
'$(GIT)'/usr
/share
/man
83 # don't include arch, cvs, p4, svn, email, gui tools, and gitk program
84 for i in git-archimport git-cvs git-p4 git-svn git-send-email \
85 git-gui git-citool
; do \
86 rm -f
'$(GIT)'/usr
/lib
/git-core
/$$i*; \
88 rm -f
'$(GIT)'/usr
/bin
/git-cvsserver
89 rm -f
'$(GIT)'/usr
/bin
/gitk
90 # don't include git-gui's lib
91 rm -rf
'$(GIT)'/usr
/share
/git-gui
/
92 # don't include gitk's lib
93 rm -rf
'$(GIT)'/usr
/share
/gitk
/
94 # don't include git-svn's lib
95 rm -rf
'$(GIT)'/usr
/share
/perl5
/Git
/SVN
*
96 # sanity check that #642603 fix is still in place
98 '$(GIT)'/usr
/lib
/git-core
/git-branch
) -le
10
100 override_dh_auto_install-indep
:
101 DESTDIR
='$(TMP)' $(MAKE
) install install-doc
$(OPTS
)
102 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/mw-to-git
install $(OPTS
) \
103 INSTLIBDIR
=/usr
/share
/perl5
104 $(MAKE
) -CDocumentation install-webdoc WEBDOC_DEST
='$(TMP)'/html \
106 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/subtree install-doc
$(OPTS
)
107 install -m
0644 contrib
/subtree
/git-subtree.txt
'$(TMP)'/html
108 # RelNotes are shipped in git
109 rm -rf
'$(TMP)'/html
/RelNotes
110 # don't include git-p4 man page
111 rm -f
'$(TMP)'/html
/git-p4.
*
113 override_dh_install-arch
:
115 rm -rf
'$(GIT)'/usr
/share
/git-core
/contrib
/hooks
/multimail
117 override_dh_install-indep
:
119 for i in git-archimport git-cvs git-p4 git-svn git-send-email gitk \
120 git-gui git-citool
; do \
121 rm -f
'$(GIT)'-man
/usr
/share
/man
/man1
/$$i*; \
123 rm -f
'$(GIT)'-man
/usr
/share
/man
/man3
/Git
::SVN
*.3pm
125 override_dh_installdocs-arch
:
126 dh_installdocs
--arch
-X.gitignore
127 # These licenses are replaced with symlinks in git.links.
128 diff
-q
'$(GIT)'/usr
/share
/doc
/git
/contrib
/persistent-https
/LICENSE
/usr
/share
/common-licenses
/Apache-2.0
129 diff
-bq
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/COPYING
/usr
/share
/common-licenses
/GPL-2
130 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/completion
131 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/emacs
132 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/hooks
133 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/mw-to-git
134 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree
.1
135 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.html
136 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.xml
137 find
'$(GIT)'/usr
/share
/doc
/git
/ -name .gitignore | xargs
rm -f
139 override_dh_installdocs-indep
:
140 install -d
-m0755
'$(GIT)'-core
/usr
/share
/doc
141 ln
-s git
'$(GIT)'-core
/usr
/share
/doc
/git-core
142 dh_installdocs
--indep
-X.gitignore
144 override_dh_installchangelogs
:
145 dh_installchangelogs debian
/changelog.upstream
147 override_dh_installinit
:
148 dh_installinit
-pgit-daemon-sysvinit
--name
=git-daemon
151 # Skip dh_installemacsen to avoid having to rename
152 # /etc/emacs/site-start.d/50git-core.el to
153 # /etc/emacs/site-start.d/50git-el.el.
154 override_dh_installemacsen
:
156 override_dh_compress
:
157 dh_compress
-X.txt
-Xcontrib