##// END OF EJS Templates
debian: support a "chg-first" installation mechanism (hg is actually chg)...
Kyle Lippincott -
r47374:90481550 default
parent child Browse files
Show More
@@ -18,6 +18,10 b''
18 # DEB_HG_PYTHON_VERSIONS="3.7 3.8" make deb
18 # DEB_HG_PYTHON_VERSIONS="3.7 3.8" make deb
19 DEB_HG_MULTI_VERSION?=0
19 DEB_HG_MULTI_VERSION?=0
20
20
21 # Set to 1 to make /usr/bin/hg a symlink to chg, and move hg to
22 # /usr/lib/mercurial/hg.
23 DEB_HG_CHG_BY_DEFAULT?=0
24
21 CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
25 CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
22
26
23 # By default, only build for the version of python3 that the system considers
27 # By default, only build for the version of python3 that the system considers
@@ -40,6 +44,12 b' else'
40 DEB_HG_PYTHON_VERSIONS?=$(shell py3versions -vd)
44 DEB_HG_PYTHON_VERSIONS?=$(shell py3versions -vd)
41 endif
45 endif
42
46
47 ifeq ($(DEB_HG_CHG_BY_DEFAULT), 1)
48 # Important: the "real" hg must have a 'basename' of 'hg'. Otherwise, hg
49 # behaves differently when setting $HG and breaks aliases that use that.
50 export HGPATH=/usr/lib/mercurial/hg
51 endif
52
43 export HGPYTHON3=1
53 export HGPYTHON3=1
44 export PYTHON=python3
54 export PYTHON=python3
45
55
@@ -86,3 +96,8 b' override_dh_auto_install: $(DEB_HG_PYTHO'
86 cp contrib/bash_completion "$(CURDIR)"/debian/mercurial/usr/share/bash-completion/completions/hg
96 cp contrib/bash_completion "$(CURDIR)"/debian/mercurial/usr/share/bash-completion/completions/hg
87 mkdir -p "$(CURDIR)"/debian/mercurial/usr/share/zsh/vendor-completions
97 mkdir -p "$(CURDIR)"/debian/mercurial/usr/share/zsh/vendor-completions
88 cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial/usr/share/zsh/vendor-completions/_hg
98 cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial/usr/share/zsh/vendor-completions/_hg
99 if [[ "$(DEB_HG_CHG_BY_DEFAULT)" -eq 1 ]]; then \
100 mkdir -p "$(CURDIR)"/debian/mercurial/usr/lib/mercurial; \
101 mv "$(CURDIR)"/debian/mercurial/usr/bin/hg "$(CURDIR)"/debian/mercurial/usr/lib/mercurial/hg; \
102 ln -s chg "$(CURDIR)"/debian/mercurial/usr/bin/hg; \
103 fi
General Comments 0
You need to be logged in to leave comments. Login now