File: rules

package info (click to toggle)
git 1:2.11.0-3+deb9u4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 37,344 kB
  • sloc: ansic: 175,978; sh: 154,654; perl: 29,746; tcl: 21,549; python: 6,781; makefile: 3,405; lisp: 1,786; php: 120; asm: 98; csh: 45
file content (158 lines) | stat: -rwxr-xr-x 5,303 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#!/usr/bin/make -f

CC =gcc
CPPFLAGS :=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS :=-Wall $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
LDFLAGS :=$(shell dpkg-buildflags --get LDFLAGS)
TEST =test
OPTS =NO_OPENSSL=1 prefix=/usr gitexecdir=/usr/lib/git-core \
  libexecdir=/usr/lib/git-core \
  mandir=/usr/share/man htmldir=/usr/share/doc/git/html \
  INSTALLDIRS=vendor \
  USE_LIBPCRE=1 \
  SANE_TOOL_PATH= INSTALL=install TAR=tar \
  NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 \
  DEFAULT_PAGER=pager DEFAULT_EDITOR=editor \
  V=1 \
  CC='$(CC)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)'
DOC_OPTS =prefix=/usr htmldir=/usr/share/doc/git/html \
  V=1 \
  ASCIIDOC8=1 ASCIIDOC_NO_ROFF=1

# https://wiki.debian.org/ReproducibleBuilds/TimestampsInDocumentationGeneratedByAsciidoc
DOC_OPTS += ASCIIDOC='TZ=UTC asciidoc'

ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
  TEST =
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  MAKEFLAGS += -j$(NUMJOBS)
  # Setting this with a pattern-specific rule prevents -O from
  # affecting the top-level make, which would break realtime build
  # output (unless dh is run as +dh, which causes other problems).
  %: MAKEFLAGS += -O
endif

TMP = $(CURDIR)/debian/tmp
GIT = $(CURDIR)/debian/git

%:
	dh $@ --with apache2

override_dh_auto_configure:

build-stamp:
	-$(CC) -v
	$(MAKE) all $(OPTS)
	touch $@

override_dh_auto_build-arch: build-stamp
	$(MAKE) -C contrib/subtree all $(OPTS)
	ln -s contrib/subtree/git-subtree

override_dh_auto_test-arch:
	chmod +x t/t[0-9]*.sh
	test -z '$(TEST)' || \
	  $(MAKE) $(TEST) $(OPTS) || \
	  GIT_TEST_OPTS=--verbose $(MAKE) $(TEST) $(OPTS)
	test -z '$(TEST)' || \
	  $(MAKE) -C contrib/subtree $(TEST) $(OPTS) || \
	  GIT_TEST_OPTS=--verbose $(MAKE) -C contrib/subtree $(TEST) $(OPTS)

override_dh_auto_build-indep: build-stamp
	# git-man, git-doc
	$(MAKE) -CDocumentation man html $(DOC_OPTS)
	# git-mediawiki
	$(MAKE) -Ccontrib/mw-to-git all $(OPTS)

override_dh_auto_test-indep:

override_dh_auto_clean:
	$(MAKE) -C contrib/mw-to-git clean $(OPTS)
	$(MAKE) -C contrib/subtree clean $(OPTS)
	$(MAKE) clean $(OPTS)
	rm -f git-subtree

override_dh_auto_install-arch:
	# git
	DESTDIR='$(GIT)' $(MAKE) install $(OPTS)
	DESTDIR='$(GIT)' $(MAKE) -C contrib/subtree install $(OPTS)
	install -d -m0755 '$(GIT)'/var/lib/git
	rm -f '$(GIT)'/usr/share/perl5/Error.pm
	rm -rf '$(GIT)'/usr/share/man
	# don't include arch, cvs, p4, svn, email, gui tools, and gitk program
	for i in git-archimport git-cvs git-p4 git-svn git-send-email \
	 git-gui git-citool; do \
	  rm -f '$(GIT)'/usr/lib/git-core/$$i*; \
	done
	rm -f '$(GIT)'/usr/bin/git-cvsserver
	rm -f '$(GIT)'/usr/bin/gitk
	# don't include git-gui's lib
	rm -rf '$(GIT)'/usr/share/git-gui/
	# don't include gitk's lib
	rm -rf '$(GIT)'/usr/share/gitk/
	# don't include git-svn's lib
	rm -rf '$(GIT)'/usr/share/perl5/Git/SVN*
	# sanity check that #642603 fix is still in place
	test $$(stat -c%h \
	  '$(GIT)'/usr/lib/git-core/git-branch) -le 10

override_dh_auto_install-indep:
	DESTDIR='$(TMP)' $(MAKE) install install-doc $(OPTS)
	DESTDIR='$(TMP)' $(MAKE) -Ccontrib/mw-to-git install $(OPTS) \
	  INSTLIBDIR=/usr/share/perl5
	$(MAKE) -CDocumentation install-webdoc WEBDOC_DEST='$(TMP)'/html \
	  2>/dev/null
	DESTDIR='$(TMP)' $(MAKE) -Ccontrib/subtree install-doc $(OPTS)
	install -m 0644 contrib/subtree/git-subtree.txt '$(TMP)'/html
	# RelNotes are shipped in git
	rm -rf '$(TMP)'/html/RelNotes
	# don't include git-p4 man page
	rm -f '$(TMP)'/html/git-p4.*

override_dh_install-arch:
	dh_install --arch
	rm -rf '$(GIT)'/usr/share/git-core/contrib/hooks/multimail

override_dh_install-indep:
	dh_install --indep
	for i in git-archimport git-cvs git-p4 git-svn git-send-email gitk \
	 git-gui git-citool; do \
	  rm -f '$(GIT)'-man/usr/share/man/man1/$$i*; \
	done
	rm -f '$(GIT)'-man/usr/share/man/man3/Git::SVN*.3pm

override_dh_installdocs-arch:
	dh_installdocs --arch -X.gitignore
	# These licenses are replaced with symlinks in git.links.
	diff -q '$(GIT)'/usr/share/doc/git/contrib/persistent-https/LICENSE /usr/share/common-licenses/Apache-2.0
	diff -bq '$(GIT)'/usr/share/doc/git/contrib/subtree/COPYING /usr/share/common-licenses/GPL-2
	rm -rf '$(GIT)'/usr/share/doc/git/contrib/completion
	rm -rf '$(GIT)'/usr/share/doc/git/contrib/emacs
	rm -rf '$(GIT)'/usr/share/doc/git/contrib/hooks
	rm -rf '$(GIT)'/usr/share/doc/git/contrib/mw-to-git
	rm -f '$(GIT)'/usr/share/doc/git/contrib/subtree/git-subtree.1
	rm -f '$(GIT)'/usr/share/doc/git/contrib/subtree/git-subtree.html
	rm -f '$(GIT)'/usr/share/doc/git/contrib/subtree/git-subtree.xml
	find '$(GIT)'/usr/share/doc/git/ -name .gitignore | xargs rm -f

override_dh_installdocs-indep:
	install -d -m0755 '$(GIT)'-core/usr/share/doc
	ln -s git '$(GIT)'-core/usr/share/doc/git-core
	dh_installdocs --indep -X.gitignore

override_dh_installchangelogs:
	dh_installchangelogs debian/changelog.upstream

override_dh_installinit:
	dh_installinit -pgit-daemon-sysvinit --name=git-daemon
	dh_installinit

# Skip dh_installemacsen to avoid having to rename
# /etc/emacs/site-start.d/50git-core.el to
# /etc/emacs/site-start.d/50git-el.el.
override_dh_installemacsen:

override_dh_compress:
	dh_compress -X.txt -Xcontrib