4 CPPFLAGS
:=$(shell dpkg-buildflags
--get CPPFLAGS
)
5 CFLAGS
:=-Wall
$(shell dpkg-buildflags
--get CFLAGS
) $(CPPFLAGS
)
6 LDFLAGS
:=$(shell dpkg-buildflags
--get LDFLAGS
)
7 HOST_CPU
:= $(shell dpkg-architecture
-qDEB_HOST_GNU_CPU
)
10 OPTS
=NO_OPENSSL
=1 prefix=/usr gitexecdir
=/usr
/lib
/git-core \
11 libexecdir
=/usr
/lib
/git-core \
12 mandir=/usr
/share
/man htmldir
=/usr
/share
/doc
/git
/html \
14 SANE_TOOL_PATH
= INSTALL
=install TAR
=tar \
15 NO_CROSS_DIRECTORY_HARDLINKS
=1 NO_INSTALL_HARDLINKS
=1 \
16 NO_PERL_CPAN_FALLBACKS
=1 \
17 PYTHON_PATH
=/usr
/bin
/python3 \
18 DEFAULT_PAGER
=pager DEFAULT_EDITOR
=editor \
19 CC
='$(CC)' CFLAGS
='$(CFLAGS)' LDFLAGS
='$(LDFLAGS)' \
20 HOST_CPU
='$(HOST_CPU)'
22 DOC_OPTS
=prefix=/usr htmldir
=/usr
/share
/doc
/git
/html \
23 ASCIIDOC8
=1 ASCIIDOC_NO_ROFF
=1
25 # https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGeneratedByAsciidoc
26 DOC_OPTS
+= ASCIIDOC
='TZ=UTC asciidoc'
28 ifeq (,$(findstring terse
,$(DEB_BUILD_OPTIONS
)))
33 ifneq (,$(findstring nocheck
,$(DEB_BUILD_OPTIONS
)))
36 ifneq (,$(findstring nodoc
,$(DEB_BUILD_OPTIONS
)))
39 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
40 NUMJOBS
= $(patsubst parallel
=%,%,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
41 MAKEFLAGS
+= -j
$(NUMJOBS
)
42 # Setting this with a pattern-specific rule prevents -O from
43 # affecting the top-level make, which would break realtime build
44 # output (unless dh is run as +dh, which causes other problems).
47 ifneq (,$(shell dpkg-query
-f
'$${Version}' -W libpcre2-dev
))
48 OPTS
+= USE_LIBPCRE2
=1
50 OPTS
+= USE_LIBPCRE1
=1
53 TMP
= $(CURDIR
)/debian
/tmp
54 GIT
= $(CURDIR
)/debian
/git
59 override_dh_auto_configure
:
66 override_dh_auto_build-arch
: build-stamp
67 $(MAKE
) -C contrib
/subtree
all $(OPTS
)
68 ln
-s contrib
/subtree
/git-subtree
70 override_dh_auto_test-arch
:
71 test -z
'$(TEST)' || \
72 GIT_SKIP_TESTS
="t9128 t9167" \
73 GIT_TEST_OPTS
='$(TEST_OPTS)' $(MAKE
) $(TEST
) $(OPTS
)
74 test -z
'$(TEST)' || \
75 GIT_TEST_OPTS
='$(TEST_OPTS)' \
77 t9128-git-svn-cmd-branch.sh \
78 t9167-git-svn-cmd-branch-subproject.sh \
80 test -z
'$(TEST)' || \
81 GIT_TEST_OPTS
='$(TEST_OPTS)' $(MAKE
) -C contrib
/subtree
$(TEST
) $(OPTS
)
83 override_dh_auto_build-indep
: build-stamp
85 $(MAKE
) -CDocumentation man
$(DOCS
) $(DOC_OPTS
)
87 $(MAKE
) -Ccontrib
/mw-to-git
all $(OPTS
)
89 override_dh_auto_test-indep
:
91 override_dh_auto_clean
:
92 $(MAKE
) -C contrib
/mw-to-git
clean $(OPTS
)
93 $(MAKE
) -C contrib
/subtree
clean $(OPTS
)
98 dh_clean
-Xmailinfo.c.orig
100 override_dh_auto_install-arch
:
102 DESTDIR
='$(GIT)' $(MAKE
) install $(OPTS
)
103 DESTDIR
='$(GIT)' $(MAKE
) -C contrib
/subtree
install $(OPTS
)
104 install -d
-m0755
'$(GIT)'/var
/lib
/git
105 rm -rf
'$(GIT)'/usr
/share
/man
106 # don't include arch, cvs, p4, svn, email, gui tools, and gitk program
107 for i in git-archimport git-cvs git-p4 git-svn git-send-email \
108 git-gui git-citool
; do \
109 rm -f
'$(GIT)'/usr
/lib
/git-core
/$$i*; \
111 rm -f
'$(GIT)'/usr
/bin
/git-cvsserver
112 rm -f
'$(GIT)'/usr
/bin
/gitk
113 # don't include git-gui's lib
114 rm -rf
'$(GIT)'/usr
/share
/git-gui
/
115 # don't include gitk's lib
116 rm -rf
'$(GIT)'/usr
/share
/gitk
/
117 # don't include git-svn's lib
118 rm -rf
'$(GIT)'/usr
/share
/perl5
/Git
/SVN
*
119 # sanity check that #642603 fix is still in place
121 '$(GIT)'/usr
/lib
/git-core
/git-branch
) -le
10
123 override_dh_auto_install-indep
:
124 DESTDIR
='$(TMP)' $(MAKE
) install install-doc
$(OPTS
)
125 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/mw-to-git
install $(OPTS
) \
126 INSTLIBDIR
=/usr
/share
/perl5
127 test -z
'$(DOCS)' || \
128 $(MAKE
) -CDocumentation install-webdoc WEBDOC_DEST
='$(TMP)'/html \
130 test -z
'$(DOCS)' || \
131 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/subtree install-doc
$(OPTS
)
132 install -m
0644 contrib
/subtree
/git-subtree.txt
'$(TMP)'/html
133 # RelNotes are shipped in git
134 rm -rf
'$(TMP)'/html
/RelNotes
135 # don't include git-p4 man page
136 rm -f
'$(TMP)'/html
/git-p4.
*
138 override_dh_install-arch
:
140 rm -rf
'$(GIT)'/usr
/share
/git-core
/contrib
/hooks
/multimail
142 override_dh_install-indep
:
144 for i in git-archimport git-cvs git-p4 git-svn git-send-email gitk \
145 git-gui git-citool
; do \
146 rm -f
'$(GIT)'-man
/usr
/share
/man
/man1
/$$i*; \
149 override_dh_installdocs-arch
:
150 dh_installdocs
--arch
-X.gitignore
151 # These licenses are replaced with symlinks in git.links.
152 diff
-q
'$(GIT)'/usr
/share
/doc
/git
/contrib
/persistent-https
/LICENSE
/usr
/share
/common-licenses
/Apache-2.0
153 diff
-bq
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/COPYING
/usr
/share
/common-licenses
/GPL-2
154 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/completion
155 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/emacs
156 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/hooks
157 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/mw-to-git
158 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree
.1
159 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.html
160 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.xml
161 find
'$(GIT)'/usr
/share
/doc
/git
/ -name .gitattributes | xargs
rm -f
162 find
'$(GIT)'/usr
/share
/doc
/git
/ -name .gitignore | xargs
rm -f
164 override_dh_installdocs-indep
:
165 dh_installdocs
--indep
-X.gitignore
167 override_dh_installchangelogs
:
168 dh_installchangelogs debian
/changelog.upstream
170 override_dh_installinit
:
171 dh_installinit
-pgit-daemon-sysvinit
--name
=git-daemon
174 # Skip dh_installemacsen to avoid having to rename
175 # /etc/emacs/site-start.d/50git-core.el to
176 # /etc/emacs/site-start.d/50git-el.el.
177 override_dh_installemacsen
:
179 override_dh_compress
:
180 dh_compress
-X.txt
-Xcontrib