##// END OF EJS Templates
packaging: use /usr/bin/python3 shebang for scripts in Debian...
Denis Laxalde -
r43618:a882c088 stable
parent child Browse files
Show More
@@ -1,47 +1,47
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 dh_python3
17 dh_python3 --shebang=/usr/bin/python3
18 18 find debian/mercurial/usr/share -type d -empty -delete
19 19
20 20 override_dh_install:
21 21 python3 setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
22 22 # chg
23 23 make -C contrib/chg \
24 24 DESTDIR="$(CURDIR)"/debian/mercurial \
25 25 PREFIX=/usr \
26 26 clean install
27 27 # remove arch-independent python stuff
28 28 find "$(CURDIR)"/debian/mercurial/usr/lib \
29 29 ! -name '*.so' ! -type d -delete , \
30 30 -type d -empty -delete
31 31 python3 setup.py install --root "$(CURDIR)/debian/mercurial-common" --install-layout=deb
32 32 make install-doc PREFIX="$(CURDIR)"/debian/mercurial-common/usr
33 33 # remove arch-dependent python stuff
34 34 find "$(CURDIR)"/debian/mercurial-common/usr/lib \
35 35 -name '*.so' ! -type d -delete , \
36 36 -type d -empty -delete
37 37 cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial-common/usr/bin
38 38 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
39 39 cp contrib/hgk "$(CURDIR)"/debian/mercurial-common/usr/share/mercurial
40 40 mkdir -p "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
41 41 cp contrib/packaging/debian/*.rc "$(CURDIR)"/debian/mercurial-common/etc/mercurial/hgrc.d/
42 42 # completions
43 43 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions
44 44 cp contrib/bash_completion "$(CURDIR)"/debian/mercurial-common/usr/share/bash-completion/completions/hg
45 45 mkdir -p "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions
46 46 cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial-common/usr/share/zsh/vendor-completions/_hg
47 47 rm "$(CURDIR)"/debian/mercurial-common/usr/bin/hg
General Comments 0
You need to be logged in to leave comments. Login now