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)'
19 DOC_OPTS
=prefix=/usr htmldir
=/usr
/share
/doc
/git
/html \
21 ASCIIDOC8
=1 ASCIIDOC_NO_ROFF
=1
23 # https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGeneratedByAsciidoc
24 DOC_OPTS
+= ASCIIDOC
='TZ=UTC asciidoc'
26 ifneq (,$(findstring nocheck
,$(DEB_BUILD_OPTIONS
)))
29 ifneq (,$(findstring nodoc
,$(DEB_BUILD_OPTIONS
)))
32 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
33 NUMJOBS
= $(patsubst parallel
=%,%,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
34 MAKEFLAGS
+= -j
$(NUMJOBS
)
35 # Setting this with a pattern-specific rule prevents -O from
36 # affecting the top-level make, which would break realtime build
37 # output (unless dh is run as +dh, which causes other problems).
41 TMP
= $(CURDIR
)/debian
/tmp
42 GIT
= $(CURDIR
)/debian
/git
47 override_dh_auto_configure
:
54 override_dh_auto_build-arch
: build-stamp
55 $(MAKE
) -C contrib
/subtree
all $(OPTS
)
56 ln
-s contrib
/subtree
/git-subtree
58 override_dh_auto_test-arch
:
59 test -z
'$(TEST)' || \
60 GIT_SKIP_TESTS
="t9128 t9167" \
61 GIT_TEST_OPTS
=--verbose
$(MAKE
) $(TEST
) $(OPTS
)
62 test -z
'$(TEST)' || \
63 GIT_TEST_OPTS
=--verbose \
65 t9128-git-svn-cmd-branch.sh \
66 t9167-git-svn-cmd-branch-subproject.sh \
68 test -z
'$(TEST)' || \
69 GIT_TEST_OPTS
=--verbose
$(MAKE
) -C contrib
/subtree
$(TEST
) $(OPTS
)
71 override_dh_auto_build-indep
: build-stamp
73 $(MAKE
) -CDocumentation man
$(DOCS
) $(DOC_OPTS
)
75 $(MAKE
) -Ccontrib
/mw-to-git
all $(OPTS
)
77 override_dh_auto_test-indep
:
79 override_dh_auto_clean
:
80 $(MAKE
) -C contrib
/mw-to-git
clean $(OPTS
)
81 $(MAKE
) -C contrib
/subtree
clean $(OPTS
)
85 override_dh_auto_install-arch
:
87 DESTDIR
='$(GIT)' $(MAKE
) install $(OPTS
)
88 DESTDIR
='$(GIT)' $(MAKE
) -C contrib
/subtree
install $(OPTS
)
89 install -d
-m0755
'$(GIT)'/var
/lib
/git
90 rm -f
'$(GIT)'/usr
/share
/perl5
/Error.pm
91 rm -rf
'$(GIT)'/usr
/share
/man
92 # don't include arch, cvs, p4, svn, email, gui tools, and gitk program
93 for i in git-archimport git-cvs git-p4 git-svn git-send-email \
94 git-gui git-citool
; do \
95 rm -f
'$(GIT)'/usr
/lib
/git-core
/$$i*; \
97 rm -f
'$(GIT)'/usr
/bin
/git-cvsserver
98 rm -f
'$(GIT)'/usr
/bin
/gitk
99 # don't include git-gui's lib
100 rm -rf
'$(GIT)'/usr
/share
/git-gui
/
101 # don't include gitk's lib
102 rm -rf
'$(GIT)'/usr
/share
/gitk
/
103 # don't include git-svn's lib
104 rm -rf
'$(GIT)'/usr
/share
/perl5
/Git
/SVN
*
105 # sanity check that #642603 fix is still in place
107 '$(GIT)'/usr
/lib
/git-core
/git-branch
) -le
10
109 override_dh_auto_install-indep
:
110 DESTDIR
='$(TMP)' $(MAKE
) install install-doc
$(OPTS
)
111 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/mw-to-git
install $(OPTS
) \
112 INSTLIBDIR
=/usr
/share
/perl5
113 test -z
'$(DOCS)' || \
114 $(MAKE
) -CDocumentation install-webdoc WEBDOC_DEST
='$(TMP)'/html \
116 test -z
'$(DOCS)' || \
117 DESTDIR
='$(TMP)' $(MAKE
) -Ccontrib
/subtree install-doc
$(OPTS
)
118 install -m
0644 contrib
/subtree
/git-subtree.txt
'$(TMP)'/html
119 # RelNotes are shipped in git
120 rm -rf
'$(TMP)'/html
/RelNotes
121 # don't include git-p4 man page
122 rm -f
'$(TMP)'/html
/git-p4.
*
124 override_dh_install-arch
:
126 rm -rf
'$(GIT)'/usr
/share
/git-core
/contrib
/hooks
/multimail
128 override_dh_install-indep
:
130 for i in git-archimport git-cvs git-p4 git-svn git-send-email gitk \
131 git-gui git-citool
; do \
132 rm -f
'$(GIT)'-man
/usr
/share
/man
/man1
/$$i*; \
134 rm -f
'$(GIT)'-man
/usr
/share
/man
/man3
/Git
::SVN
*.3pm
136 override_dh_installdocs-arch
:
137 dh_installdocs
--arch
-X.gitignore
138 # These licenses are replaced with symlinks in git.links.
139 diff
-q
'$(GIT)'/usr
/share
/doc
/git
/contrib
/persistent-https
/LICENSE
/usr
/share
/common-licenses
/Apache-2.0
140 diff
-bq
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/COPYING
/usr
/share
/common-licenses
/GPL-2
141 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/completion
142 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/emacs
143 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/hooks
144 rm -rf
'$(GIT)'/usr
/share
/doc
/git
/contrib
/mw-to-git
145 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree
.1
146 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.html
147 rm -f
'$(GIT)'/usr
/share
/doc
/git
/contrib
/subtree
/git-subtree.xml
148 find
'$(GIT)'/usr
/share
/doc
/git
/ -name .gitignore | xargs
rm -f
150 override_dh_installdocs-indep
:
151 install -d
-m0755
'$(GIT)'-core
/usr
/share
/doc
152 ln
-s git
'$(GIT)'-core
/usr
/share
/doc
/git-core
153 dh_installdocs
--indep
-X.gitignore
155 override_dh_installchangelogs
:
156 dh_installchangelogs debian
/changelog.upstream
158 override_dh_installinit
:
159 dh_installinit
-pgit-daemon-sysvinit
--name
=git-daemon
162 # Skip dh_installemacsen to avoid having to rename
163 # /etc/emacs/site-start.d/50git-core.el to
164 # /etc/emacs/site-start.d/50git-el.el.
165 override_dh_installemacsen
:
167 override_dh_compress
:
168 dh_compress
-X.txt
-Xcontrib