#1093717 debhelper: zig buildsystem for debhelper

Package:
debhelper
Source:
debhelper
Submitter:
Nick Black (Public gmail account)
Date:
2025-01-21 20:21:04 UTC
Severity:
normal
#1093717#5
Date:
2025-01-21 18:40:14 UTC
From:
To:
Dear Maintainer,

I hope to have the zig programming language in unstable soon; I'm uploading it
to NEW now. I'll then be packaging some zig applications. Right now, I'm
hardcoding the necessary dh overrides, but I imagine we'd want a buildsystem.
I'm not certain about that, though (rust, AFAICT, doesn't use a dh buildsystem
through cargo-deb), so I thought I'd ask here. I can probably go ahead and
implement this if there are no objections.

#1093717#10
Date:
2025-01-21 19:02:31 UTC
From:
To:
Nick Black (Public gmail account):

Hi,

The rule of thumb is that at least 10 packages in the archive should be
able to use the feature, because I am considered to be added into
`debhelper` (the source package) itself. This baseline goes back to the
original maintainer, who proposed it and I have kept it for now.

That said, you can create and prototype the build system logic outside
the `debhelper` package, such as by having the `zig` source package
provide it (or build a `dh-zig` package that contains it). This is also
an advantage for you, since you can prototype at your own pace without
being affected by `debhelper`'s policies (such as backwards compat
rules, which tends to get away for early prototyping and rapid bug fixing).

Consuming packages can then use it via:

```
%:
	dh $@ -Szig
```

(plus the relevant Build-Depends).

The only feature you cannot test here is auto-detection/auto-activation
of the build system, since `debhelper` has a curated list of build
systems it will provide auto-detection for. However, once we have an
idea of the logic here and the build system code is in sid, `debhelper`
can add it to the list of known third-party build systems with a good
auto-detection method.

As for getting started, there is a very small amount of documentation in
the bottom of doc/PROGRAMMING.md
(/usr/share/doc/debhelper/PROGRAMMING.md.gz) to get you started. The
build system classes are not that advanced, so you can probably reverse
engineer the existing code easily enough provided you understand Perl.
In any event, feel free to ask.

Best regards,
Niels

#1093717#15
Date:
2025-01-21 19:18:41 UTC
From:
To:
thanks for the thorough reply, Niels! that all sounds good.