~ubuntu-branches/debian/sid/git/sid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Jonathan Nieder
  • Date: 2013-06-12 07:50:53 UTC
  • mfrom: (1.2.19) (2.1.31 experimental)
  • Revision ID: package-import@ubuntu.com-20130612075053-uue9xe0dq0rvm44y
Tags: 1:1.8.3.1-1
* merge branch debian-experimental
* new upstream point release (see RelNotes/1.8.3.1.txt).
* debian/watch: use xz-compressed tarballs from kernel.org.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
3
ARCH ?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
4
 
BUILD_DOCS =$(shell if type asciidoc >/dev/null 2>&1; then echo 1; fi)
5
4
 
6
5
CC =gcc
7
6
CPPFLAGS :=$(shell dpkg-buildflags --get CPPFLAGS)
14
13
  INSTALLDIRS=vendor \
15
14
  NO_PYTHON=1 \
16
15
  USE_SRV_RR=1 \
 
16
  USE_LIBPCRE=1 \
17
17
  THREADED_DELTA_SEARCH=1 \
18
 
  NO_CROSS_DIRECTORY_HARDLINKS=1 NO_HARDLINKS=1 \
 
18
  NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 \
19
19
  DEFAULT_PAGER=pager DEFAULT_EDITOR=editor \
20
20
  CC='$(CC)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)'
21
21
DOC_OPTS =prefix=/usr htmldir=/usr/share/doc/git/html \
27
27
ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
28
28
  TEST =
29
29
endif
 
30
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
31
  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
32
  MAKEFLAGS += -j$(NUMJOBS)
 
33
endif
 
34
 
 
35
PKG_INDEP =
 
36
PKG_INDEP += git-doc
 
37
PKG_INDEP += git-arch
 
38
PKG_INDEP += git-bzr
 
39
PKG_INDEP += git-cvs
 
40
PKG_INDEP += git-svn
 
41
PKG_INDEP += git-daemon-run
 
42
PKG_INDEP += git-daemon-sysvinit
 
43
PKG_INDEP += git-email
 
44
PKG_INDEP += git-gui
 
45
PKG_INDEP += gitk
 
46
PKG_INDEP += gitweb
 
47
PKG_INDEP += git-all
 
48
PKG_INDEP += git-el
 
49
PKG_INDEP += git-man
30
50
 
31
51
TMP =$(shell pwd)/tmp
32
52
GIT =$(shell pwd)/debian/git
52
72
 
53
73
build-indep: deb-checkdir build-indep-stamp
54
74
build-indep-stamp: patch-stamp build-arch-stamp
55
 
        : 'Work around bug #478524'
56
 
        set -e; if test '$(BUILD_DOCS)' = 1; \
57
 
        then \
58
 
                $(MAKE) -CDocumentation man html $(DOC_OPTS); \
59
 
        fi
 
75
        $(MAKE) -CDocumentation man html $(DOC_OPTS)
 
76
        $(MAKE) -CDocumentation $(DOC_OPTS) \
 
77
          MAN_TXT=../debian/git-remote-bzr.txt \
 
78
          ../debian/git-remote-bzr.1 \
 
79
          ../debian/git-remote-bzr.html
 
80
        sed -e 's,/usr/bin/env python,/usr/bin/python,' \
 
81
          contrib/remote-helpers/git-remote-bzr >debian/git-remote-bzr
 
82
        sed -e 's/test_have_prereq PYTHON/true/' \
 
83
          contrib/remote-helpers/test-bzr.sh >debian/test-bzr.sh
 
84
        chmod +x debian/git-remote-bzr debian/test-bzr.sh
 
85
        test -z '$(TEST)' || \
 
86
          PATH=$(CURDIR)/debian:$(PATH) \
 
87
            $(MAKE) -C t $(OPTS) $(CURDIR)/debian/test-bzr.sh || \
 
88
          PATH=$(CURDIR)/debian:$(PATH) GIT_TEST_OPTS=--verbose \
 
89
            $(MAKE) -C t $(OPTS) $(CURDIR)/debian/test-bzr.sh
60
90
        touch build-indep-stamp
61
91
 
62
92
clean: deb-checkdir
 
93
        rm -f debian/git-remote-bzr debian/test-bzr.sh
 
94
        rm -f debian/git-remote-bzr.xml debian/git-remote-bzr.html
 
95
        rm -f Documentation/git-remote-bzr.1
63
96
        $(MAKE) clean $(OPTS)
64
97
        ! test -e patch-stamp || \
65
98
          for i in `ls -1r debian/diff/*.diff debian/diff/*.patch \
68
101
          done
69
102
        rm -rf '$(TMP)'
70
103
        rm -f patch-stamp build-arch-stamp build-indep-stamp
71
 
        rm -rf '$(GIT)' '$(GIT)'-doc '$(GIT)'-arch '$(GIT)'-cvs
72
 
        rm -rf '$(GIT)'-svn '$(GIT)'-email '$(GIT)'-el
73
 
        rm -rf '$(GIT)'-daemon-run '$(GIT)'-daemon-sysvinit '$(GIT)'-gui
74
 
        rm -rf '$(GIT)'k '$(GIT)'web '$(GIT)'-all '$(GIT)'-man '$(GIT)'-core
75
 
        rm -f debian/files debian/substvars changelog
 
104
        set -e; \
 
105
          for i in '' $(patsubst git%,%,$(PKG_INDEP)) -core; do \
 
106
            rm -rf '$(GIT)'$$i; \
 
107
          done
 
108
        rm -f debian/files debian/substvars
76
109
 
77
110
install: install-arch install-indep
 
111
git.install: install-arch
78
112
install-arch: deb-checkdir deb-checkuid build-arch-stamp
79
113
        # git
80
114
        rm -rf '$(GIT)'
84
118
        rm -f '$(GIT)'/usr/share/perl5/Error.pm
85
119
        rm -rf '$(GIT)'/usr/share/man
86
120
        chmod 644 '$(GIT)'/usr/share/perl5/Git.pm
87
 
        : 'Disable preliminary German translation.'
88
 
        rm -rf '$(GIT)'/usr/share/locale/de
 
121
        find '$(GIT)'/usr/share/perl5/Git -type d | xargs chmod 0755
 
122
        find '$(GIT)'/usr/share/perl5/Git -type f | xargs chmod 0644
89
123
        # don't include arch, cvs, svn, email, gui tools, and gitk program
90
124
        for i in git-archimport git-cvs git-svn git-send-email \
91
125
         git-gui git-citool; do \
103
137
        rm -rf '$(GIT)'/usr/share/git-gui/
104
138
        # don't include gitk's lib
105
139
        rm -rf '$(GIT)'/usr/share/gitk/
 
140
        # don't include git-svn's lib
 
141
        rm -rf '$(GIT)'/usr/share/perl5/Git/SVN*
106
142
        # bash completion
 
143
        install -d -m0755 '$(GIT)'/usr/share/bash-completion/completions
 
144
        install -m0644 contrib/completion/git-completion.bash \
 
145
          '$(GIT)'/usr/share/bash-completion/completions/git
 
146
        ln -s git '$(GIT)'/usr/share/bash-completion/completions/gitk
 
147
        # bash prompt
 
148
        install -m0644 contrib/completion/git-prompt.sh \
 
149
          '$(GIT)'/usr/lib/git-core/git-sh-prompt
107
150
        install -d -m0755 '$(GIT)'/etc/bash_completion.d
108
 
        install -m0644 contrib/completion/git-completion.bash \
109
 
          '$(GIT)'/etc/bash_completion.d/git
 
151
        install -m0644 debian/git-prompt.completion \
 
152
          '$(GIT)'/etc/bash_completion.d/git-prompt
 
153
        # sanity check that #642603 fix is still in place
 
154
        test $$(stat -c%h \
 
155
          '$(GIT)'/usr/lib/git-core/git-branch) -le 10
110
156
        # gitweb
111
157
        install -d -m0755 '$(GIT)'/usr/share/gitweb
112
158
        ln -s gitweb.cgi '$(GIT)'/usr/share/gitweb/index.cgi
113
159
        # contrib hooks
114
160
        install -d -m0755 '$(GIT)'/usr/share/git-core/contrib/hooks
115
 
        install -m0644 contrib/hooks/* \
 
161
        install -m0755 contrib/hooks/* \
116
162
          '$(GIT)'/usr/share/git-core/contrib/hooks/
117
163
        # contrib
118
164
        install -d -m0755 '$(GIT)'/usr/share/doc/git
127
173
        ln -s ../../../git-core/contrib/hooks \
128
174
          '$(GIT)'/usr/share/doc/git/contrib/
129
175
        find '$(GIT)'/usr/share/doc/git/ -name .gitignore | xargs rm -f
130
 
        # upstream changelog
131
 
        test -r changelog || ln -s debian/changelog.upstream changelog
132
176
 
133
 
install-indep:
134
 
        : 'Work around bug #478524'
135
 
        set -e; if test '$(BUILD_DOCS)' = 1; \
136
 
        then \
137
 
                $(MAKE) -f debian/rules install-indep-real; \
138
 
        fi
139
 
install-indep-real: build-arch-stamp build-indep-stamp
 
177
$(patsubst %,%.install,$(PKG_INDEP)) git-core.install: install-indep
 
178
install-indep: build-arch-stamp build-indep-stamp
140
179
        rm -rf '$(TMP)'
141
180
        install -d -m0755 '$(TMP)'
142
181
        DESTDIR='$(TMP)' $(MAKE) install install-doc $(OPTS)
148
187
        rm -rf '$(GIT)'-man
149
188
        install -d -m0755 '$(GIT)'-man/usr/share/man/man3
150
189
        DESTDIR='$(GIT)'-man $(MAKE) install-doc $(OPTS)
151
 
        install -m 0644 '$(TMP)'/usr/share/man/man3/Git.3pm \
152
 
          '$(GIT)'-man/usr/share/man/man3/Git.3pm
153
 
        rm -f '$(GIT)'-man/usr/share/man/man3/private-Error.3pm
 
190
        install -m 0644 '$(TMP)'/usr/share/man/man3/Git* \
 
191
          '$(GIT)'-man/usr/share/man/man3/
154
192
        # don't include arch, cvs, svn, email, gui, and gitk man pages
155
193
        for i in git-archimport git-cvs git-svn git-send-email gitk \
156
194
         git-gui git-citool; do \
157
195
          rm -f '$(GIT)'-man/usr/share/man/man1/$$i*; \
158
196
        done
 
197
        rm -f '$(GIT)'-man/usr/share/man/man3/Git::SVN*.3pm
159
198
        chmod 0644 '$(GIT)'-man/usr/share/man/man?/*.[0-9]*
160
199
        gzip -9 '$(GIT)'-man/usr/share/man/man?/*.[0-9]*
161
200
        # git-doc
173
212
            '$(GIT)'-$$i/usr/share/man/man1/ && \
174
213
          gzip -9 '$(GIT)'-$$i/usr/share/man/man1/*.1 || exit 1; \
175
214
        done
 
215
        install -d -m0755 '$(GIT)'-svn/usr/share/perl5/Git
 
216
        cp -R '$(TMP)'/usr/share/perl5/Git/SVN* \
 
217
          '$(GIT)'-svn/usr/share/perl5/Git/
 
218
        find '$(GIT)'-svn/usr/share/perl5/Git -type d | xargs chmod 0755
 
219
        find '$(GIT)'-svn/usr/share/perl5/Git -type f | xargs chmod 0644
 
220
        install -d -m0755 '$(GIT)'-svn/usr/share/man/man3
 
221
        install -m 0644 '$(TMP)'/usr/share/man/man3/Git::SVN*.3pm \
 
222
          '$(GIT)'-svn/usr/share/man/man3/
 
223
        gzip -9 '$(GIT)'-svn/usr/share/man/man3/*.3pm
176
224
        # git-cvs
177
225
        install -d -m0755 '$(GIT)'-cvs/usr/bin
178
226
        install -m0755 '$(TMP)'/usr/bin/git-cvsserver '$(GIT)'-cvs/usr/bin/
185
233
        install -m0644 '$(TMP)'/usr/share/man/man1/git-archimport.1 \
186
234
          '$(GIT)'-arch/usr/share/man/man1/
187
235
        gzip -9 '$(GIT)'-arch/usr/share/man/man1/*.1
 
236
        # git-bzr
 
237
        rm -rf '$(GIT)'-bzr
 
238
        install -d -m0755 '$(GIT)'-bzr/usr/lib/git-core
 
239
        install -m0755 debian/git-remote-bzr \
 
240
          '$(GIT)'-bzr/usr/lib/git-core/git-remote-bzr--git
 
241
        install -d -m0755 '$(GIT)'-bzr/usr/share/man/man1
 
242
        install -m0644 Documentation/git-remote-bzr.1 \
 
243
          '$(GIT)'-bzr/usr/share/man/man1/git-remote-bzr--git.1
 
244
        gzip -9 '$(GIT)'-bzr/usr/share/man/man1/*.1
188
245
        # git-email
189
246
        rm -rf '$(GIT)'-email
190
247
        install -d -m0755 '$(GIT)'-email/usr/lib/git-core
277
334
        rm -rf '$(GIT)'-core
278
335
        install -d -m0755 '$(GIT)'-core/usr/share/doc
279
336
        ln -s git '$(GIT)'-core/usr/share/doc/git-core
280
 
        # upstream changelog
281
 
        test -r changelog || ln -s debian/changelog.upstream changelog
 
337
 
 
338
git-core.deb-docs:
 
339
        : no doc dir
282
340
 
283
341
binary: binary-arch binary-indep
284
342
binary-arch: install-arch git.deb
286
344
        dpkg-shlibdeps '$(GIT)'/usr/bin/* '$(GIT)'/usr/lib/git-core/*
287
345
        dpkg-gencontrol -isp -pgit -P'$(GIT)'
288
346
        dpkg -b '$(GIT)' ..
289
 
binary-indep: install-indep git-doc.deb git-arch.deb git-cvs.deb git-svn.deb \
290
 
          git-daemon-run.deb git-daemon-sysvinit.deb \
291
 
          git-email.deb git-gui.deb gitk.deb gitweb.deb \
292
 
          git-all.deb git-el.deb git-man.deb git-core.deb-DEBIAN
 
347
binary-indep: install-indep $(patsubst %,%.deb,$(PKG_INDEP)) git-core.deb-DEBIAN
293
348
        rm -f debian/substvars
294
 
        for i in -doc -arch -cvs -svn -daemon-run -daemon-sysvinit \
295
 
         -email -gui k web -all -core -el -man; do \
 
349
        for i in $(patsubst git%,%,$(PKG_INDEP)) -core; do \
296
350
          dpkg-gencontrol -isp -pgit$$i -P'$(GIT)'$$i && \
297
351
          dpkg -b '$(GIT)'$$i .. || exit 1; \
298
352
        done
299
353
 
300
354
.PHONY: patch clean
301
355
.PHONY: build build-arch build-indep
302
 
.PHONY: install install-arch install-indep install-indep-real
 
356
.PHONY: install install-arch install-indep
303
357
.PHONY: binary binary-arch binary-indep
304
358
 
305
359
include debian/implicit