[Distutils] Generating two Debian packages with stdeb

Jan Dittberner jan at dittberner.info
Wed Nov 21 11:39:02 CET 2012


On Wed, Nov 21, 2012 at 11:03:45AM +0100, Edward Ekelund wrote:
> I have modified the debian/control file to produce two .debs. I have
> no idea, however, how to correctly use override_dh_autobuild in
> debian/rules to put files in the appropriate sub directories. My
> google-fu seems weak, and I haven't been able to find an answer on
> the internet either.
> 
> Could you provide a simple example for how I should do it?

use override_dh_autoinstall

-- 8< --- example: debian/rules -------------------------------------------
#!/usr/bin/make -f

override_dh_auto_install:
        python setup.py install --install-layout=deb \
            --root $(CURDIR)/debian/python-xyzclient
        mkdir -p $(CURDIR)/debian/python-xyzserver/usr/share/pyshared/xyz
        mv \
          $(CURDIR)/debian/python-xyzclient/usr/share/pyshared/xyz/server.py \
          $(CURDIR)/debian/python-xyzserver/usr/share/pyshared/xyz/
        ...

%:
        dh $@ --with python2 --buildsystem=python_distutils
-- 8< ---------------------------------------------------------------------

override_dh_autobuild would be too early, sorry for the confusion. You
basically prepare the files for each binary package in a separate
subdirectory of your debian/ directory. Debhelper's dh sequencer takes care
of building the proper binary packages. Be aware that package names like
python-xyzserver and python-xyzclient are not compliant with the Debian
Python policy (they should be named python-<modulename> and you should have
separate modules for client and server to allow this split in a policy
conforming way).


Regards
Jan

-- 
Jan Dittberner - Debian Developer
GPG-key: 4096R/558FB8DD 2009-05-10
         B2FF 1D95 CE8F 7A22 DF4C  F09B A73E 0055 558F B8DD
http://www.dittberner.info/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20121121/7df9cbb3/attachment.pgp>


More information about the Distutils-SIG mailing list