4 CPPFLAGS
:=$(shell dpkg-buildflags
--get CPPFLAGS
)
5 CFLAGS
:=-Wall
$(shell dpkg-buildflags
--get CFLAGS
) $(CPPFLAGS
)
6 LDFLAGS
:=$(shell dpkg-buildflags
--get LDFLAGS
)
9 OPTS
=NO_OPENSSL
=1 prefix=/usr gitexecdir
=/usr
/lib
/git-core \
10 libexecdir
=/usr
/lib
/git-core \
11 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 NO_PERL_CPAN_FALLBACKS
=1 \
16 DEFAULT_PAGER
=pager DEFAULT_EDITOR
=editor \
17 CC
='$(CC)' CFLAGS
='$(CFLAGS)' LDFLAGS
='$(LDFLAGS)'
19 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 ifeq (,$(findstring terse
,$(DEB_BUILD_OPTIONS
)))
30 ifneq (,$(findstring nocheck
,$(DEB_BUILD_OPTIONS
)))
33 ifneq (,$(findstring nodoc
,$(DEB_BUILD_OPTIONS
)))
36 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
37 NUMJOBS
= $(patsubst parallel
=%,%,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
38 MAKEFLAGS
+= -j
$(NUMJOBS
)
39 # Setting this with a pattern-specific rule prevents -O from
40 # affecting the top-level make, which would break realtime build
41 # output (unless dh is run as +dh, which causes other problems).
44 ifneq (,$(shell dpkg-query
-f
'$${Version}' -W libpcre2-dev
))
45 OPTS
+= USE_LIBPCRE2
=1
47 OPTS
+= USE_LIBPCRE1
=1
50 TMP
= $(CURDIR
)/debian
/tmp
51 GIT
= $(CURDIR
)/debian
/git
56 override_dh_auto_configure
:
63 override_dh_auto_build-arch
: build-stamp
64 $(MAKE
) -C contrib
/subtree
all $(OPTS
)
65 ln
-s contrib
/subtree
/git-subtree
67 override_dh_auto_test-arch
:
68 test -z
'$(TEST)' || \
69 GIT_SKIP_TESTS
="t9128 t9167" \
70 GIT_TEST_OPTS
='$(TEST_OPTS)' $(MAKE
) $(TEST
) $(OPTS
)
71 test -z
'$(TEST)' || \
72 GIT_TEST_OPTS
='$(TEST_OPTS)' \
74 t9128-git-svn-cmd-branch.sh \
75 t9167-git-svn-cmd-branch-subproject.sh \
77 test -z
'$(TEST)' || \
78 GIT_TEST_OPTS
='$(TEST_OPTS)' $(MAKE
) -C contrib
/subtree
$(TEST
) $(OPTS
)
80 override_dh_auto_build-indep
: build-stamp
82 $(MAKE
) -CDocumentation man
$(DOCS
) $(DOC_OPTS
)
84 $(MAKE
) -Ccontrib
/mw-to-git
all $(OPTS
)
86 override_dh_auto_test-indep
:
88 override_dh_auto_clean
:
89 $(MAKE
) -C contrib
/mw-to-git
clean $(OPTS
)
90 $(MAKE
) -C contrib
/subtree
clean $(OPTS
)
95 dh_clean
-Xmailinfo.c.orig
97 override_dh_auto_install-arch
:
99 DESTDIR
='$(GIT)' $(MAKE
) install $(OPTS
)
100 DESTDIR
='$(GIT)' $(MAKE
) -C contrib
/subtree
install $(OPTS
)
101 install -d
-m0755
'$(GIT)'/var
/lib
/git
102 rm -rf
'$(GIT)'/usr
/share
/man
103 # don't include arch, cvs, p4, svn, email, gui tools, and gitk program
104 for i in git-archimport git-cvs git-p4 git-svn git-send-email \
105 git-gui git-citool
; do \
106 rm -f
'$(GIT)'/usr
/lib
/git-core
/$$i*; \
108 rm -f
'$(GIT)'/usr
/bin
/git-cvsserver
109 rm -f
'$(GIT)'/usr
/bin
/gitk
110 # don't include git-gui's lib
111 rm -rf
'$(GIT)'/usr
/share
/git-gui
/
112 # don't include gitk's lib
113 rm -rf
'$(GIT)'/usr
/share
/gitk
/
114 # don't include git-svn's lib
115 rm -rf
'$(GIT)'/usr
/share
/perl5
/Git
/SVN
*
116 # sanity check that #642603 fix is still in place
118 '$(GIT)'/usr
/lib
/git-core
/git-branch
) -le
10
120 override_dh_auto_install-indep
:
121 DESTDIR
='$(TMP)' $(MAKE
) install install-doc
$(OPTS
)
122 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/mw-to-git
install $(OPTS
) \
123 INSTLIBDIR
=/usr
/share
/perl5
124 test -z
'$(DOCS)' || \
125 $(MAKE
) -CDocumentation install-webdoc WEBDOC_DEST
='$(TMP)'/html \
127 test -z
'$(DOCS)' || \
128 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/subtree install-doc
$(OPTS
)
129 install -m
0644 contrib
/subtree
/git-subtree.txt
'$(TMP)'/html
130 # RelNotes are shipped in git
131 rm -rf
'$(TMP)'/html
/RelNotes
132 # don't include git-p4 man page
133 rm -f
'$(TMP)'/html
/git-p4.
*
135 override_dh_install-arch
:
137 rm -rf
'$(GIT)'/usr
/share
/git-core
/contrib
/hooks
/multimail
139 override_dh_install-indep
:
141 for i in git-archimport git-cvs git-p4 git-svn git-send-email gitk \
142 git-gui git-citool
; do \
143 rm -f
'$(GIT)'-man
/usr
/share
/man
/man1
/$$i*; \
146 override_dh_installdocs-arch
:
147 dh_installdocs
--arch
-X.gitignore
148 # These licenses are replaced with symlinks in git.links.
149 diff
-q
'$(GIT)'/usr
/share
/doc
/git
/contrib
/persistent-https
/LICENSE
/usr
/share
/common-licenses
/Apache-2.0
150 diff
-bq
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/COPYING
/usr
/share
/common-licenses
/GPL-2
151 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/completion
152 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/emacs
153 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/hooks
154 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/mw-to-git
155 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree
.1
156 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.html
157 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.xml
158 find
'$(GIT)'/usr
/share
/doc
/git
/ -name .gitattributes | xargs
rm -f
159 find
'$(GIT)'/usr
/share
/doc
/git
/ -name .gitignore | xargs
rm -f
161 override_dh_installdocs-indep
:
162 dh_installdocs
--indep
-X.gitignore
164 override_dh_installchangelogs
:
165 dh_installchangelogs debian
/changelog.upstream
167 override_dh_installinit
:
168 dh_installinit
-pgit-daemon-sysvinit
--name
=git-daemon
171 # Skip dh_installemacsen to avoid having to rename
172 # /etc/emacs/site-start.d/50git-core.el to
173 # /etc/emacs/site-start.d/50git-el.el.
174 override_dh_installemacsen
:
176 override_dh_compress
:
177 dh_compress
-X.txt
-Xcontrib