[Build-common-hackers] Re: Improving documentation

Marc Haber mh+build-common-hackers@zugschlus.de
Thu, 27 Nov 2003 15:05:08 +0100


Hi,

a few days ago, I asked a few questions, but unfortunately nobody
bothered to answer. May I ask again?

On Sun, Nov 16, 2003 at 02:52:41PM +0100, Marc Haber wrote:
> I would like to offer help for cdbs documentation. However, I can't
> deliver docs right now since I don't understand cdbs at all at the
> moment. I can use cdbs to build a package, but as soon as I need to
> deviate from the "normal" path, I am lost.
> 
> What I'd like to offer is to try to understand your answers to some of
> my questions, and to re-word them (adding necessary background
> information) for inclusion in an FAQ document which could then
> probably evolve into a fully fledged manual once I have improved my
> understanding of cdbs.
> 
> For starters, I have the following questions, and I would appreciate
> if one of you would take the time to answer.
> 
> -----------
> (1)
> Can I use the cdbs patch system for conditional patches? For example,
> if I have a dpatch patch beginning with
> 
> if [ -e /usr/include/linux/atmbr2684.h ]; then exit 0; fi
> 
> can I emulate this with cdbs? If not, does cdbs have an interface to
> call dpatch?
> -----------
> (2)
> Does cdbs always build all packages mentioned in debian/control? For
> example, exim4 has a binary package exim4-daemon-custom mentioned in
> debian/control that should not normally be built. The entry in
> debian/control is infrastructure for a custom package that a local
> administrator can choose to build from our sources.
> 
> Judging from your code, DEB_ARCH_PACKAGES could be used to do so, but
> setting that variable to the appropriate list of package names seems
> to be ignored by the patch system.
> -----------
> (3)
> Another package suffers from a sick upstream file layout, and so I'd
> need to invoke make in ./foo/src instead of in . what cdbs seems to
> do. I now could throw a ./Makefile into my package which in turns
> invokes make in ./foo/src, but that kind of negates the positive
> effects cdbs could have.
> 
> How am I supposed to handle this with cdbs?

This one has been solved in the mean time:

build/mypackage::
        ( cd foo/src && make )

install/mypackage::
        ( cd foo/src && make install )

cleanbuilddir/mypackage::
        ( cd foo/bin && rm -f binary1 binary2 )
        ( cd foo/src && make clean )

I don't know if it is the best way to do it.

I didn't dare setting DEB_BUILDDIR.

> -----------
> 
> Any hints will be appreciated, and may end up in better cdbs
> documentation.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Karlsruhe, Germany |  lose things."    Winona Ryder | Fon: *49 721 966 32 15
Nordisch by Nature |  How to make an American Quilt | Fax: *49 721 966 31 29