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
/libexec
/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 PYTHON_PATH
=/usr
/bin
/python3 \
17 DEFAULT_PAGER
=pager DEFAULT_EDITOR
=editor \
18 CC
='$(CC)' CFLAGS
='$(CFLAGS)' LDFLAGS
='$(LDFLAGS)' \
19 HOST_CPU
='$(HOST_CPU)'
21 DOC_OPTS
=prefix=/usr htmldir
=/usr
/share
/doc
/git
/html \
22 ASCIIDOC8
=1 ASCIIDOC_NO_ROFF
=1
24 # https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGeneratedByAsciidoc
25 DOC_OPTS
+= ASCIIDOC
='TZ=UTC asciidoc'
27 ifeq (,$(findstring terse
,$(DEB_BUILD_OPTIONS
)))
32 ifneq (,$(findstring nocheck
,$(DEB_BUILD_OPTIONS
)))
35 ifneq (,$(findstring nodoc
,$(DEB_BUILD_OPTIONS
)))
38 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
39 NUMJOBS
= $(patsubst parallel
=%,%,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
40 MAKEFLAGS
+= -j
$(NUMJOBS
)
41 # Setting this with a pattern-specific rule prevents -O from
42 # affecting the top-level make, which would break realtime build
43 # output (unless dh is run as +dh, which causes other problems).
46 ifneq (,$(shell dpkg-query
-f
'$${Version}' -W libpcre2-dev
))
47 OPTS
+= USE_LIBPCRE2
=1
49 OPTS
+= USE_LIBPCRE1
=1
52 TMP
= $(CURDIR
)/debian
/tmp
53 GIT
= $(CURDIR
)/debian
/git
56 dh
$@
--with apache2
--without autoreconf
58 override_dh_auto_configure
:
65 override_dh_auto_build-arch
: build-stamp
66 $(MAKE
) -C contrib
/subtree
all $(OPTS
)
67 ln
-s contrib
/subtree
/git-subtree
69 override_dh_auto_test-arch
:
70 test -z
'$(TEST)' || \
71 GIT_SKIP_TESTS
="t9128 t9167" \
72 GIT_TEST_OPTS
='$(TEST_OPTS)' $(MAKE
) $(TEST
) $(OPTS
)
73 test -z
'$(TEST)' || \
74 GIT_TEST_OPTS
='$(TEST_OPTS)' \
76 t9128-git-svn-cmd-branch.sh \
77 t9167-git-svn-cmd-branch-subproject.sh \
79 test -z
'$(TEST)' || \
80 GIT_TEST_OPTS
='$(TEST_OPTS)' $(MAKE
) -C contrib
/subtree
$(TEST
) $(OPTS
)
82 override_dh_auto_build-indep
: build-stamp
84 $(MAKE
) -CDocumentation man
$(DOCS
) $(DOC_OPTS
)
86 $(MAKE
) -Ccontrib
/mw-to-git
all $(OPTS
)
88 override_dh_auto_test-indep
:
90 override_dh_auto_clean
:
91 $(MAKE
) -C contrib
/mw-to-git
clean $(OPTS
)
92 $(MAKE
) -C contrib
/subtree
clean $(OPTS
)
97 dh_clean
-Xmailinfo.c.orig
99 override_dh_auto_install-arch
:
101 DESTDIR
='$(GIT)' $(MAKE
) install $(OPTS
)
102 DESTDIR
='$(GIT)' $(MAKE
) -C contrib
/subtree
install $(OPTS
)
103 install -d
-m0755
'$(GIT)'/var
/lib
/git
104 rm -rf
'$(GIT)'/usr
/share
/man
105 # don't include arch, cvs, p4, svn, email, gui tools, and gitk program
106 for i in git-archimport git-cvs git-p4 git-svn git-send-email \
107 git-gui git-citool
; do \
108 rm -f
'$(GIT)'/usr
/libexec
/git-core
/$$i*; \
110 rm -f
'$(GIT)'/usr
/bin
/git-cvsserver
111 rm -f
'$(GIT)'/usr
/bin
/gitk
112 # don't include git-gui's lib
113 rm -rf
'$(GIT)'/usr
/share
/git-gui
/
114 # don't include gitk's lib
115 rm -rf
'$(GIT)'/usr
/share
/gitk
/
116 # don't include git-svn's lib
117 rm -rf
'$(GIT)'/usr
/share
/perl5
/Git
/SVN
*
118 # sanity check that #642603 fix is still in place
120 '$(GIT)'/usr
/libexec
/git-core
/git-branch
) -le
10
122 override_dh_auto_install-indep
:
123 DESTDIR
='$(TMP)' $(MAKE
) install install-doc
$(OPTS
)
124 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/mw-to-git
install $(OPTS
) \
125 INSTLIBDIR
=/usr
/share
/perl5
126 test -z
'$(DOCS)' || \
127 $(MAKE
) -CDocumentation install-webdoc WEBDOC_DEST
='$(TMP)'/html \
129 test -z
'$(DOCS)' || \
130 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/subtree install-doc
$(OPTS
)
131 install -m
0644 contrib
/subtree
/git-subtree.txt
'$(TMP)'/html
132 # RelNotes are shipped in git
133 rm -rf
'$(TMP)'/html
/RelNotes
134 # don't include git-p4 man page
135 rm -f
'$(TMP)'/html
/git-p4.
*
137 override_dh_install-arch
:
139 rm -rf
'$(GIT)'/usr
/share
/git-core
/contrib
/hooks
/multimail
141 override_dh_install-indep
:
143 for i in git-archimport git-cvs git-p4 git-svn git-send-email gitk \
144 git-gui git-citool
; do \
145 rm -f
'$(GIT)'-man
/usr
/share
/man
/man1
/$$i*; \
148 override_dh_installdocs-arch
:
149 dh_installdocs
--arch
-X.gitignore
150 # These licenses are replaced with symlinks in git.links.
151 diff
-q
'$(GIT)'/usr
/share
/doc
/git
/contrib
/persistent-https
/LICENSE
/usr
/share
/common-licenses
/Apache-2.0
152 diff
-bq
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/COPYING
/usr
/share
/common-licenses
/GPL-2
153 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/completion
154 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/emacs
155 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/hooks
156 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/mw-to-git
157 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree
.1
158 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.html
159 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.xml
160 find
'$(GIT)'/usr
/share
/doc
/git
/ -name .gitattributes | xargs
rm -f
161 find
'$(GIT)'/usr
/share
/doc
/git
/ -name .gitignore | xargs
rm -f
163 override_dh_installdocs-indep
:
164 dh_installdocs
--indep
-X.gitignore
166 override_dh_installchangelogs
:
167 dh_installchangelogs debian
/changelog.upstream
169 override_dh_installinit
:
170 dh_installinit
-pgit-daemon-sysvinit
--name
=git-daemon
173 # Skip dh_installemacsen to avoid having to rename
174 # /etc/emacs/site-start.d/50git-core.el to
175 # /etc/emacs/site-start.d/50git-el.el.
176 override_dh_installemacsen
:
178 override_dh_compress
:
179 dh_compress
-X.txt
-Xcontrib