debian: split packages into chg executable and server extension

Because Mercurial 3.7 will be shipped with the chgserver extension, we'll
need a way to install only the chg executable.
5 files changed, 26 insertions(+), 4 deletions(-)

M .hgignore
M debian/control
A => debian/mercurial-chg.install
A => debian/mercurial-chgserver.install
M debian/rules
M .hgignore +4 -1
@@ 9,7 9,10 @@ 
 # debuild
 ^debian/\.debhelper/
 ^debian/files$
-^debian/mercurial-chg[\./]
+^debian/mercurial-chg(server)?/
+^debian/mercurial-chg(server)?\.substvars$
+^debian/mercurial-chg(server)?\.[^.]+\.(debhelper|log)$
+^debian/tmp/
 ^debian/.*?-stamp$
 
 # Eclipse

          
M debian/control +18 -2
@@ 9,10 9,26 @@ Vcs-Browser: http://bitbucket.org/yuja/c
 
 Package: mercurial-chg
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends},
- mercurial (>= 3.2~)
+Depends:
+ ${shlibs:Depends},
+ ${misc:Depends},
+ mercurial (>= 3.7~) | mercurial-chgserver (= ${binary:Version})
 Description: Fast Mercurial CLI with background cmdserver
  This provides chg command as a replacement for pure hg executable.
  .
  By using background hg command server, cHg reduces the overhead of
  loading Python modules on each request.
+
+Package: mercurial-chgserver
+Architecture: any
+Depends:
+ ${shlibs:Depends},
+ ${misc:Depends},
+ ${python:Depends},
+ mercurial (>= 3.2~)
+Breaks:
+ mercurial-chg (<< 0.3~)
+Conflicts:
+ mercurial (>= 3.7~)
+Description: Mercurial command server extension for cHg
+ This provides background command server for cHg.

          
A => debian/mercurial-chg.install +2 -0
@@ 0,0 1,2 @@ 
+usr/bin
+usr/share/man

          
A => debian/mercurial-chgserver.install +1 -0
@@ 0,0 1,1 @@ 
+usr/lib/python*

          
M debian/rules +1 -1
@@ 8,4 8,4 @@ 
 	dh $@ --with python2
 
 override_dh_auto_install:
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/mercurial-chg PREFIX=/usr
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr