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

Re: Debian packaging for packages that provide the same files



J.T. Conklin:
> [...]
> 
> A complication is that each platform config package installs the same
> set of files, so the normal package build technique of having all files
> being installed to a common staging directory and each package's files
> being selected by the debian/<package>.install doesn't work.
> 

Hi,

Not quite sure I understand exactly what the issue is, so I might miss
with this.

Are you aware that debian/<pkg>.install can be made executable and thus
arbitrary filter based on any logic you can devise in said file?

CAVEATS:
 * Requires debhelper using compat 9+ (trivially satisfied in any
   supported Debian, but ymmv if you support other targets)
 * debhelper is very strict with output of executable config files
   (e.g. it does not allow comments, empty lines and does not expand
    wildcards).

> I could have the configure script take a platform type parameter, and
> only install the files for that platform, but there doesn't seem to be
> an obvious way to plumb that in to debian/control & debian/rules; in
> particular, I don't think you can conditionalize the output package
> names listed in the control file.
> 

The only two uses in Debian, I know of, rely on the selection being done
/before/ the build starts.  Not quite sure how they well they fit you,
but they are:

 * Generating debian/control from debian/control.in
 * Using Build-Profiles to omit building some packages (using a
   "pkg.${sourcepkg}.${name_of_choice}" profile[1]).

[1] https://wiki.debian.org/BuildProfileSpec

It is primarily targeted as dealing with dependencies bootstrapping
issues, but it does list an "Extension namespace".


> Before I put this on the back burner, I thought I'd ask whether there
> are any existing packages that face this, or similar, types of issues
> that I could use as a template.
> 
> Thanks in advance,
> 
>     --jtc
> 

Hope it was useful.

Thanks,
~Niels


Reply to: