##// END OF EJS Templates
packaging: distinguish clean and build steps from install in Debian
Denis Laxalde -
r43625:cdf6db1f stable
parent child Browse files
Show More
@@ -1,47 +1,55 b''
1 1 #!/usr/bin/make -f
2 2 # Uncomment this to turn on verbose mode.
3 3 # export DH_VERBOSE=1
4 4
5 5 CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
6 6
7 7 export HGPYTHON3=1
8 8 export PYTHON=python3
9 9
10 10 %:
11 11 dh $@ --with python3
12 12
13 13 override_dh_auto_test:
14 14 http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
15 15
16 16 override_dh_python3:
17 17 dh_python3 --shebang=/usr/bin/python3
18 18 find debian/mercurial/usr/share -type d -empty -delete
19 19
20 override_dh_auto_clean:
21 $(MAKE) cleanbutpackages
22 $(MAKE) -C contrib/chg clean
23
24 override_dh_auto_build:
25 $(MAKE) all
26 $(MAKE) -C contrib/chg all
27
20 28 override_dh_install:
21 29 python3 setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
22 30 # chg
23 31 make -C contrib/chg \
24 32 DESTDIR="$(CURDIR)"/debian/mercurial \
25 33 PREFIX=/usr \
26 clean install
34 install
27 35 # remove arch-independent python stuff
28 36 find "$(CURDIR)"/debian/mercurial/usr/lib \
29 37 ! -name '*.so' ! -type d -delete , \
30 38 -type d -empty -delete
31 39 python3 setup.py install --root "$(CURDIR)/debian/mercurial-common" --install-layout=deb
32 40 make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
33 41 # remove arch-dependent python stuff
34 42 find "$(CURDIR)"/debian/mercurial-common/usr/lib \
35 43 -name '*.so' ! -type d -delete , \
36 44 -type d -empty -delete
37 45 cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial-common/usr/bin
38 46 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
39 47 cp contrib/hgk "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
40 48 mkdir -p "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
41 49 cp contrib/packaging/debian/*.rc "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
42 50 # completions
43 51 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions
44 52 cp contrib/bash_completion "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions/hg
45 53 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions
46 54 cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg
47 55 rm "$(CURDIR)"/debian/mercurial-common/usr/bin/hg
General Comments 0
You need to be logged in to leave comments. Login now