new: port the meson, cmake and autotools template bodies to manifests

This commit is contained in:
2026-09-18 15:08:27 +02:00
parent e6f2012835
commit fa399f64b2
14 changed files with 203 additions and 145 deletions
+8
View File
@@ -0,0 +1,8 @@
#include <stdio.h>
/* Placeholder for {name}, generated by `pkh new`. */
int main(void)
{
printf("Hello from {command}!\n");
return 0;
}
+16 -4
View File
@@ -1,7 +1,15 @@
## The `meson` template: a C/C++ project built with Meson through the
## debhelper meson buildsystem. The logic half — the project() probe, the
## skeleton bodies and the wizard's pkg-config opt-in (appended to
## Build-Depends) — lives in src/new/templates/meson.rs.
## debhelper meson buildsystem. The skeleton bodies below are static data;
## the logic half — the project() probe and the wizard's pkg-config
## opt-in (appended to Build-Depends) — lives in src/new/templates/meson.rs.
##
## hello.c.tpl is deliberately duplicated (byte-identical) across the
## makefile, cmake and autotools template directories: every template
## directory is self-contained — the registry embeds each directory's
## bodies under its own entry — so a shared body would need
## cross-directory references the manifest schema has no machinery for.
## The duplication replaces the Rust hello_c() helper meson.rs used to
## lend cmake.rs and autotools.rs.
##
## Schema: see src/new/templates/mod.rs.
@@ -13,4 +21,8 @@ build_depends:
- meson
architecture: any
rules_dh_line: "dh $@ --buildsystem=meson"
files: []
files:
- path: meson.build
template: meson.build.tpl
- path: hello.c
template: hello.c.tpl
+3
View File
@@ -0,0 +1,3 @@
project('{name}', version: '{upstream_version}', license: '{license}', default_options: ['c_std=c11'])
executable('{command}', 'hello.c', install: true)