Show More
@@ -1,38 +1,44 b'' | |||||
1 | #!/usr/bin/make -f |
|
1 | #!/usr/bin/make -f | |
2 | # Uncomment this to turn on verbose mode. |
|
2 | # Uncomment this to turn on verbose mode. | |
3 | # export DH_VERBOSE=1 |
|
3 | # export DH_VERBOSE=1 | |
4 |
|
4 | |||
5 | CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l) |
|
5 | CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l) | |
6 |
|
6 | |||
7 | %: |
|
7 | %: | |
8 | dh $@ --with python2 |
|
8 | dh $@ --with python2 | |
9 |
|
9 | |||
10 | override_dh_auto_test: |
|
10 | override_dh_auto_test: | |
11 | http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)" |
|
11 | http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)" | |
12 |
|
12 | |||
13 | override_dh_python2: |
|
13 | override_dh_python2: | |
14 | dh_python2 |
|
14 | dh_python2 | |
15 | find debian/mercurial/usr/share -type d -empty -delete |
|
15 | find debian/mercurial/usr/share -type d -empty -delete | |
16 |
|
16 | |||
17 | override_dh_install: |
|
17 | override_dh_install: | |
18 | python$(PYVERS) setup.py install --root $(CURDIR)/debian/mercurial --install-layout=deb |
|
18 | python$(PYVERS) setup.py install --root $(CURDIR)/debian/mercurial --install-layout=deb | |
|
19 | # chg | |||
|
20 | make -C contrib/chg \ | |||
|
21 | DESTDIR=$(CURDIR)/debian/mercurial \ | |||
|
22 | PREFIX=/usr \ | |||
|
23 | clean install | |||
19 | # remove arch-independent python stuff |
|
24 | # remove arch-independent python stuff | |
20 | find $(CURDIR)/debian/mercurial/usr/lib \ |
|
25 | find $(CURDIR)/debian/mercurial/usr/lib \ | |
21 | ! -name '*.so' ! -type d -delete , \ |
|
26 | ! -name '*.so' ! -type d -delete , \ | |
22 | -type d -empty -delete |
|
27 | -type d -empty -delete | |
23 | python$(PYVERS) setup.py install --root $(CURDIR)/debian/mercurial-common --install-layout=deb |
|
28 | python$(PYVERS) setup.py install --root $(CURDIR)/debian/mercurial-common --install-layout=deb | |
24 | make install-doc PREFIX=$(CURDIR)/debian/mercurial-common/usr |
|
29 | make install-doc PREFIX=$(CURDIR)/debian/mercurial-common/usr | |
25 | # remove arch-dependent python stuff |
|
30 | # remove arch-dependent python stuff | |
26 | find $(CURDIR)/debian/mercurial-common/usr/lib \ |
|
31 | find $(CURDIR)/debian/mercurial-common/usr/lib \ | |
27 | -name '*.so' ! -type d -delete , \ |
|
32 | -name '*.so' ! -type d -delete , \ | |
28 | -type d -empty -delete |
|
33 | -type d -empty -delete | |
29 | cp contrib/hg-ssh $(CURDIR)/debian/mercurial-common/usr/bin |
|
34 | cp contrib/hg-ssh $(CURDIR)/debian/mercurial-common/usr/bin | |
30 | mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/mercurial |
|
35 | mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/mercurial | |
31 | cp contrib/hgk $(CURDIR)/debian/mercurial-common/usr/share/mercurial |
|
36 | cp contrib/hgk $(CURDIR)/debian/mercurial-common/usr/share/mercurial | |
32 | mkdir -p $(CURDIR)/debian/mercurial-common/etc/mercurial/hgrc.d/ |
|
37 | mkdir -p $(CURDIR)/debian/mercurial-common/etc/mercurial/hgrc.d/ | |
33 | cp contrib/debian/*.rc $(CURDIR)/debian/mercurial-common/etc/mercurial/hgrc.d/ |
|
38 | cp contrib/debian/*.rc $(CURDIR)/debian/mercurial-common/etc/mercurial/hgrc.d/ | |
|
39 | # completions | |||
34 | mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/bash-completion/completions |
|
40 | mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/bash-completion/completions | |
35 | cp contrib/bash_completion $(CURDIR)/debian/mercurial-common/usr/share/bash-completion/completions/hg |
|
41 | cp contrib/bash_completion $(CURDIR)/debian/mercurial-common/usr/share/bash-completion/completions/hg | |
36 | mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/zsh/vendor-completions |
|
42 | mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/zsh/vendor-completions | |
37 | cp contrib/zsh_completion $(CURDIR)/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg |
|
43 | cp contrib/zsh_completion $(CURDIR)/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg | |
38 | rm $(CURDIR)/debian/mercurial-common/usr/bin/hg |
|
44 | rm $(CURDIR)/debian/mercurial-common/usr/bin/hg |
@@ -1,26 +1,32 b'' | |||||
1 | #require test-repo slow debhelper debdeps |
|
1 | #require test-repo slow debhelper debdeps | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
4 | $ testrepohgenv |
|
4 | $ testrepohgenv | |
5 |
|
5 | |||
6 | Ensure debuild doesn't run the testsuite, as that could get silly. |
|
6 | Ensure debuild doesn't run the testsuite, as that could get silly. | |
7 | $ DEB_BUILD_OPTIONS=nocheck |
|
7 | $ DEB_BUILD_OPTIONS=nocheck | |
8 | $ export DEB_BUILD_OPTIONS |
|
8 | $ export DEB_BUILD_OPTIONS | |
9 | $ OUTPUTDIR=`pwd` |
|
9 | $ OUTPUTDIR=`pwd` | |
10 | $ export OUTPUTDIR |
|
10 | $ export OUTPUTDIR | |
11 |
|
11 | |||
12 | $ cd "$TESTDIR"/.. |
|
12 | $ cd "$TESTDIR"/.. | |
13 | $ make deb > $OUTPUTDIR/build.log 2>&1 |
|
13 | $ make deb > $OUTPUTDIR/build.log 2>&1 | |
14 | $ cd $OUTPUTDIR |
|
14 | $ cd $OUTPUTDIR | |
15 | $ ls *.deb | grep -v 'dbg' |
|
15 | $ ls *.deb | grep -v 'dbg' | |
16 | mercurial-common_*.deb (glob) |
|
16 | mercurial-common_*.deb (glob) | |
17 | mercurial_*.deb (glob) |
|
17 | mercurial_*.deb (glob) | |
18 | main deb should have .so but no .py |
|
18 | main deb should have .so but no .py | |
19 | $ dpkg --contents mercurial_*.deb | egrep '(localrepo|parsers)' |
|
19 | $ dpkg --contents mercurial_*.deb | egrep '(localrepo|parsers)' | |
20 | * ./usr/lib/python2.7/dist-packages/mercurial/cext/parsers*.so (glob) |
|
20 | * ./usr/lib/python2.7/dist-packages/mercurial/cext/parsers*.so (glob) | |
21 | mercurial-common should have py but no .so or pyc |
|
21 | mercurial-common should have py but no .so or pyc | |
22 | $ dpkg --contents mercurial-common_*.deb | egrep '(localrepo|parsers.*so)' |
|
22 | $ dpkg --contents mercurial-common_*.deb | egrep '(localrepo|parsers.*so)' | |
23 | * ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py (glob) |
|
23 | * ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py (glob) | |
24 | zsh completions should be in the common package |
|
24 | zsh completions should be in the common package | |
25 | $ dpkg --contents mercurial-common_*.deb | egrep 'zsh.*[^/]$' |
|
25 | $ dpkg --contents mercurial-common_*.deb | egrep 'zsh.*[^/]$' | |
26 | * ./usr/share/zsh/vendor-completions/_hg (glob) |
|
26 | * ./usr/share/zsh/vendor-completions/_hg (glob) | |
|
27 | chg should be installed alongside hg, in the 'mercurial' package | |||
|
28 | $ dpkg --contents mercurial_*.deb | egrep 'chg$' | |||
|
29 | * ./usr/bin/chg (glob) | |||
|
30 | chg should come with a man page | |||
|
31 | $ dpkg --contents mercurial_*.deb | egrep 'man.*chg' | |||
|
32 | * ./usr/share/man/man1/chg.1.gz (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now