27
DIR =$(shell pwd)/debian
28
GITCORE =$(DIR)/git-core
29
GITDOC =$(DIR)/git-doc
28
GIT =$(shell pwd)/debian/git
32
unpack: deb-checkdir unpack-stamp
34
tar xzf git-'$(VERSION)'.tar.gz
36
ln -s git-'$(VERSION)' git
30
patch: deb-checkdir patch-stamp
37
32
for i in `ls -t debian/diff/*.diff || :`; do \
38
(cd git && patch -p0) <$$i || exit 1; \
33
patch -p1 <$$i || exit 1; \
42
37
build: deb-checkdir build-arch-stamp build-indep-stamp
43
build-arch-stamp: unpack-stamp
38
build-arch-stamp: patch-stamp
45
40
# don't run git-rev-list --merge-order tests
46
rm -f git/t/t6001-rev-list-merge-order.sh
47
$(MAKE) -Cgit all test CC='$(CC)' CFLAGS='$(CFLAGS)' $(OPTS)
48
$(MAKE) -Cgit/Documentation man
41
rm -f t/t6001-rev-list-merge-order.sh
42
$(MAKE) all test CC='$(CC)' CFLAGS='$(CFLAGS)' $(OPTS)
43
$(MAKE) -CDocumentation man
49
44
touch build-arch-stamp
50
build-indep-stamp: unpack-stamp
51
$(MAKE) -Cgit/Documentation html gitk.1
45
build-indep-stamp: build-arch-stamp
46
$(MAKE) -CDocumentation man html
52
47
touch build-indep-stamp
54
49
clean: deb-checkdir deb-checkuid
55
rm -rf git-'$(VERSION)' git
56
rm -f unpack-stamp build-arch-stamp build-indep-stamp
57
rm -rf '$(GITCORE)' '$(GITDOC)' '$(GITK)'
51
rm -f git-send-email compat/subprocess.pyc
52
! test -e patch-stamp || \
53
for i in `ls -tr debian/diff/*.diff || :`; do patch -p1 -R <$$i; done
55
rm -f patch-stamp build-arch-stamp build-indep-stamp
56
rm -rf '$(GIT)'-core '$(GIT)'-doc '$(GIT)'-arch '$(GIT)'-cvs \
57
'$(GIT)'-svn '$(GIT)'-email '$(GIT)'k
58
58
rm -f debian/files debian/substvars changelog
60
60
install: install-arch install-indep
61
61
install-arch: deb-checkdir deb-checkuid build-arch-stamp
63
mkdir -p '$(GITCORE)'/usr
64
$(MAKE) -Cgit install $(OPTS) DESTDIR='$(GITCORE)'
65
# don't include gitk program
66
rm -f '$(GITCORE)'/usr/bin/gitk
67
for i in '$(GITCORE)'/usr/bin/*; do \
64
install -d -m0755 '$(GIT)'-core/usr/bin
65
$(MAKE) install install-doc $(OPTS) DESTDIR='$(GIT)'-core
66
# don't include arch, cvs, svn, email tools, and gitk program
67
for i in git-arch git-cvs git-svn git-send-email; do \
68
rm -f '$(GIT)'-core/usr/bin/$$i*; \
70
rm -f '$(GIT)'-core/usr/bin/gitk
71
# handle git program through alternatives mechanism (see #342363), rename
73
mv -f '$(GIT)'-core/usr/bin/git '$(GIT)'-core/usr/bin/git-scm
74
for i in '$(GIT)'-core/usr/bin/*; do \
68
75
test "`head -c2 $$i`" = '#!' || $(STRIP) -R .comment -R .note $$i; \
71
mkdir -p '$(GITCORE)'/usr/share/man/man1
72
install -m0644 git/Documentation/*.1 '$(GITCORE)'/usr/share/man/man1/
73
# don't include gitk man page
74
rm -f '$(GITCORE)'/usr/share/man/man1/gitk.1
75
gzip -9 '$(GITCORE)'/usr/share/man/man1/*.1
76
mkdir -p '$(GITCORE)'/usr/share/man/man7
77
install -m0644 git/Documentation/*.7 '$(GITCORE)'/usr/share/man/man7/
78
gzip -9 '$(GITCORE)'/usr/share/man/man7/*.7
77
install -d -m0755 '$(GIT)'-core/usr/share
78
mv -f '$(GIT)'-core/usr/man '$(GIT)'-core/usr/share/
79
# don't include arch, cvs, svn, email, and gitk man pages
80
for i in git-arch git-cvs git-svn git-send-email; do \
81
rm -f '$(GIT)'-core/usr/share/man/man1/$$i*; \
83
rm -f '$(GIT)'-core/usr/share/man/man1/gitk.1
84
chmod 0644 '$(GIT)'-core/usr/share/man/man?/*.[0-9]
85
gzip -9 '$(GIT)'-core/usr/share/man/man?/*.[0-9]
79
86
# no upstream changelog
80
87
cp /dev/null changelog
81
install-indep: deb-checkdir deb-checkuid build-indep-stamp
88
install-indep: build-arch-stamp build-indep-stamp
90
install -d -m0755 '$(TMP)'
91
$(MAKE) install install-doc $(OPTS) DESTDIR='$(TMP)'
92
$(MAKE) -CDocumentation install-webdoc WEBDOC_DEST='$(TMP)'/html \
96
install -d -m0755 '$(GIT)'-doc
97
# git-arch, git-cvs, git-svn, git-email
98
for i in arch cvs svn email; do \
99
rm -rf '$(GIT)'-$$i && \
100
install -d -m0755 '$(GIT)'-$$i/usr/bin && \
101
install -m0755 '$(TMP)'/usr/bin/git-*$$i* '$(GIT)'-$$i/usr/bin/ && \
102
install -d -m0755 '$(GIT)'-$$i/usr/share/man/man1 && \
103
install -m0644 '$(TMP)'/usr/man/man1/git-*$$i* \
104
'$(GIT)'-$$i/usr/share/man/man1/ && \
105
gzip -9 '$(GIT)'-$$i/usr/share/man/man1/*.1 || exit 1; \
87
mkdir -p '$(GITK)'/usr/bin
88
install -m0755 git/gitk '$(GITK)'/usr/bin/gitk
90
mkdir -p '$(GITK)'/usr/share/man/man1
91
install -m0644 git/Documentation/gitk.1 '$(GITK)'/usr/share/man/man1/
92
gzip -9 '$(GITK)'/usr/share/man/man1/*.1
109
install -d -m0755 '$(GIT)'k/usr/bin
110
install -m0755 '$(TMP)'/usr/bin/gitk '$(GIT)'k/usr/bin/gitk
111
install -d -m0755 '$(GIT)'k/usr/share/man/man1
112
install -m0644 '$(TMP)'/usr/man/man1/gitk.1 \
113
'$(GIT)'k/usr/share/man/man1/
114
gzip -9 '$(GIT)'k/usr/share/man/man1/*.1
93
115
# no upstream changelog
94
116
cp /dev/null changelog
96
118
binary: binary-arch binary-indep
97
119
binary-arch: install-arch git-core.deb
98
120
rm -f debian/substvars
99
dpkg-shlibdeps '$(GITCORE)'/usr/bin/*
100
dpkg-gencontrol -isp -pgit-core -P'$(GITCORE)'
101
dpkg -b '$(GITCORE)' ..
102
binary-indep: install-indep git-doc.deb gitk.deb
121
dpkg-shlibdeps '$(GIT)'-core/usr/bin/*
122
dpkg-gencontrol -isp -pgit-core -P'$(GIT)'-core
123
dpkg -b '$(GIT)'-core ..
124
binary-indep: install-indep git-doc.deb git-arch.deb git-cvs.deb git-svn.deb \
125
git-email.deb gitk.deb
103
126
rm -f debian/substvars
104
dpkg-gencontrol -isp -pgit-doc -P'$(GITDOC)'
105
dpkg -b '$(GITDOC)' ..
106
dpkg-gencontrol -isp -pgitk -P'$(GITK)'
127
for i in -doc -arch -cvs -svn -email k; do \
128
dpkg-gencontrol -isp -pgit$$i -P'$(GIT)'$$i && \
129
dpkg -b '$(GIT)'$$i .. || exit 1; \
109
.PHONY: unpack build clean install install-arch install-indep binary \
132
.PHONY: patch build clean install install-arch install-indep binary \
110
133
binary-arch binary-indep
112
135
include debian/implicit