deb: build and install chg
Differential Revision: https://phab.mercurial-scm.org/D883
--- a/contrib/debian/rules Sun Oct 01 02:53:10 2017 -0700
+++ b/contrib/debian/rules Sun Oct 01 03:31:32 2017 -0700
@@ -16,6 +16,11 @@
override_dh_install:
python$(PYVERS) setup.py install --root $(CURDIR)/debian/mercurial --install-layout=deb
+ # chg
+ make -C contrib/chg \
+ DESTDIR=$(CURDIR)/debian/mercurial \
+ PREFIX=/usr \
+ clean install
# remove arch-independent python stuff
find $(CURDIR)/debian/mercurial/usr/lib \
! -name '*.so' ! -type d -delete , \
@@ -31,6 +36,7 @@
cp contrib/hgk $(CURDIR)/debian/mercurial-common/usr/share/mercurial
mkdir -p $(CURDIR)/debian/mercurial-common/etc/mercurial/hgrc.d/
cp contrib/debian/*.rc $(CURDIR)/debian/mercurial-common/etc/mercurial/hgrc.d/
+ # completions
mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/bash-completion/completions
cp contrib/bash_completion $(CURDIR)/debian/mercurial-common/usr/share/bash-completion/completions/hg
mkdir -p $(CURDIR)/debian/mercurial-common/usr/share/zsh/vendor-completions
--- a/tests/test-debian-packages.t Sun Oct 01 02:53:10 2017 -0700
+++ b/tests/test-debian-packages.t Sun Oct 01 03:31:32 2017 -0700
@@ -24,3 +24,9 @@
zsh completions should be in the common package
$ dpkg --contents mercurial-common_*.deb | egrep 'zsh.*[^/]$'
* ./usr/share/zsh/vendor-completions/_hg (glob)
+chg should be installed alongside hg, in the 'mercurial' package
+ $ dpkg --contents mercurial_*.deb | egrep 'chg$'
+ * ./usr/bin/chg (glob)
+chg should come with a man page
+ $ dpkg --contents mercurial_*.deb | egrep 'man.*chg'
+ * ./usr/share/man/man1/chg.1.gz (glob)