[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Architecture: all (was Re: dh $@ --with cli --with python2 --parallel)



On 08/09/2011 20:42, Mathieu Malaterre wrote:
> Loong Jin,
> 
> On Wed, Sep 7, 2011 at 6:07 PM, Chow Loong Jin <hyperair@ubuntu.com> wrote:
> [...]
>> For example:
>> ===========================8<===================================
>> ifeq ($(shell dh_listpackages | grep -q cil && echo yes),yes)
>> WITH_CLI = --with cli
>> DEB_WRAP_CSHARP = 1
>> else
>> WITH_CLI =
>> DEB_WRAP_CSHARP = 0
>> endif
>>
>> %:
>>        dh $@ $(WITH_CLI) --with python2 --parallel
>> ===========================>8===================================
>>
>> You'll of course have to split out the mono build-deps into Build-Depends-Indep.
>> Take a look at libgpod[1,2] for an example, though in my case I didn't use
>> dh_listpackages, but set an environment variable depending on whether
>> binary-arch or binary-indep was called.
>>
>>
>> [1]
>> http://anonscm.debian.org/gitweb/?p=pkg-gtkpod/packages/libgpod.git;a=blob;f=debian/control
>> [2]
>> http://anonscm.debian.org/gitweb/?p=pkg-gtkpod/packages/libgpod.git;a=blob;f=debian/rules
> 
> 
> Wow ! Your example is just fantastic ! Just one note though, are you sure about:
> 
>  Package: libgpod-cil
>  Section: cli-mono
>  Architecture: all
> 
> I was told that my arch should not be set to all since mono is not
> available on -say- hppa. Policy requires it should be 'any' (*) ?
> (*) http://pkg-mono.alioth.debian.org/cli-policy/ch-packaging.html#s-architecture

According to your link, -cil packages with 100% managed code (i.e. only
.dll/.exe files to be used with mono), architecture should be set to all. And
that is the case for libgpod-cil.

However, it's not the same for your package, as you have some .so files inside
your -cil packages, so you'd have two options:
- Split out the glue libraries in the -cil package (.so files?) into a
  separate, Arch: any package.

- Keep your architecture narrowing as is, and forget what I mentioned about
  shifting the mono-specific build-deps to Build-Depends-Indep. dh_listpackages
  should list -cil packages for the relevant architectures, so the example
  debian/rules snippet I previously posted should work.

-- 
Kind regards,
Loong Jin

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: