>>>>> "Lisandro" == Lisandro Damián Nicanor Pérez Meyer <perezme...@gmail.com> 
>>>>> writes:

    Lisandro> On Tuesday 01 September 2015 19:49:06 Dmitry Shachnev wrote:
    >> On Tue, 01 Sep 2015 10:56:17 +0200, Gergely Nagy wrote:
    >> > This can easily be done with dh-exec now, with much nicer syntax than
    >> > what I proposed two years ago:
    >> > 
    >> > Instead of foo.install-common, foo.install.$os, foo.install.$arch, one
    >> 
    >> > can use a single executable foo.install file, with some special markup:
    >> Yes, we (the Qt maintainers) have already been thinking about using 
dh-exec.
    >> We don't want to change existing packages as our current code works fine,
    >> but we will definitely look at it if we need it in our next packages.
    >> > Since I have a little bit of free time, how about this:
    >> > 
    >> > If foo.install.common exists, auto-include foo.install.$arch and
    >> > foo.install.$os (if they exist), provided that foo.install is 
executable
    >> > and uses dh-exec.
    >> > 
    >> > Alternatively, an executable foo.install, and executable
    >> > foo.install.$arch/$os could also be a trigger, so foo.install.common
    >> > wouldn't be required, and could be rolled into foo.install.
    >> 
    >> I don't think this is needed. A single file with architecture- or
    >> OS-specific lines is much simplier to use and maintain.

    Lisandro> Just for the record: we are currently using a hacked -common 
-arch approach, 
    Lisandro> but having a special syntax in .install files would be just 
awesome.

    Lisandro> Having the possibility to add negations like [!linux] would also 
be just cool. 
    Lisandro> Ie, much in the current way we can manage build dependencies.

That works right now with dh-exec. It supports all wildcards
dpkg-architecture does (it uses that under the hood). Support for the
syntax is in stable too, and dh-exec is trivial to backport to
oldstable, if so need be.

So, you can write this right now:

,----
| #! /usr/bin/dh-exec
| [hurd-i386] this-is-hurd-i386-only
| [linux-any] this-is-linux-only
| [!kfreebsd-amd64] this-is-not-for-kfreebsd-amd64
| [any-i386 any-powerpc] this-is-complicated
`----

This works for all debhelper scripts one can make executable, not only
foo.install files. (Though I've no idea why it would be useful anywhere
else, but hey!)

-- 
|8]

Reply via email to