~ubuntu-branches/ubuntu/hardy/git-core/hardy-updates

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2005-12-15 11:24:51 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20051215112451-ezudzum6et2166nn
Tags: 0.99.9n-1
* new upstream version: GIT 0.99.9n aka 1.0rc6.
* debian/rules: rename git program in git-core package to git-scm,
  handle /usr/bin/git program through update-alternatives (as suggested
  by Ian Beckwith, see #342363).
* debian/control: git-core: Conflicts: git (<< 4.3.20-8) (closes:
  #342363).
* debian/git-core.postinst, debian/git-core.prerm: new: run
  update-alternatives --install /usr/bin/git git /usr/bin/git-scm with
  priority 70 on configure, and --remove on remove respectively.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
endif
25
25
endif
26
26
 
27
 
DIR =$(shell pwd)/debian
28
 
GITCORE =$(DIR)/git-core
29
 
GITDOC =$(DIR)/git-doc
30
 
GITK =$(DIR)/gitk
 
27
TMP =$(shell pwd)/tmp
 
28
GIT =$(shell pwd)/debian/git
31
29
 
32
 
unpack: deb-checkdir unpack-stamp
33
 
unpack-stamp:
34
 
        tar xzf git-'$(VERSION)'.tar.gz
35
 
        rm -f git
36
 
        ln -s git-'$(VERSION)' git
 
30
patch: deb-checkdir patch-stamp
 
31
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; \
39
34
        done
40
 
        touch unpack-stamp
 
35
        touch patch-stamp
41
36
 
42
37
build: deb-checkdir build-arch-stamp build-indep-stamp
43
 
build-arch-stamp: unpack-stamp
 
38
build-arch-stamp: patch-stamp
44
39
        -gcc -v
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
53
48
 
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)'
 
50
        $(MAKE) clean
 
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
 
54
        rm -rf '$(TMP)'
 
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
59
59
 
60
60
install: install-arch install-indep
61
61
install-arch: deb-checkdir deb-checkuid build-arch-stamp
62
 
        rm -rf '$(GITCORE)'
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 \
 
62
        # git-core
 
63
        rm -rf '$(GIT)-core'
 
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*; \
 
69
        done
 
70
        rm -f '$(GIT)'-core/usr/bin/gitk
 
71
        # handle git program through alternatives mechanism (see #342363), rename
 
72
        # to git-scm
 
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; \
69
76
        done
70
 
        # man pages
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*; \
 
82
        done
 
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
 
89
        rm -rf '$(TMP)'
 
90
        install -d -m0755 '$(TMP)'
 
91
        $(MAKE) install install-doc $(OPTS) DESTDIR='$(TMP)'
 
92
        $(MAKE) -CDocumentation install-webdoc WEBDOC_DEST='$(TMP)'/html \
 
93
          2>/dev/null
82
94
        # git-doc
83
 
        rm -rf '$(GITDOC)'
84
 
        mkdir -p '$(GITDOC)'
 
95
        rm -rf '$(GIT)'-doc
 
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; \
 
106
        done
85
107
        # gitk
86
 
        rm -rf '$(GITK)'
87
 
        mkdir -p '$(GITK)'/usr/bin
88
 
        install -m0755 git/gitk '$(GITK)'/usr/bin/gitk
89
 
        # man page
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
 
108
        rm -rf '$(GIT)'k
 
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
95
117
 
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)'
107
 
        dpkg -b '$(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; \
 
130
        done
108
131
 
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
111
134
 
112
135
include debian/implicit