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
+5
View File
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project({name} VERSION {upstream_version})
add_executable({command} hello.c)
install(TARGETS {command} RUNTIME DESTINATION bin)
+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;
}
+10 -4
View File
@@ -1,7 +1,9 @@
## The `cmake` template: a C/C++ project built with CMake through the
## debhelper cmake 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/cmake.rs.
## debhelper cmake 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/cmake.rs.
## hello.c.tpl duplicates the shared C skeleton of the other C/C++
## template directories (see meson/manifest.yml for why).
##
## Schema: see src/new/templates/mod.rs.
@@ -13,4 +15,8 @@ build_depends:
- cmake
architecture: any
rules_dh_line: "dh $@ --buildsystem=cmake"
files: []
files:
- path: CMakeLists.txt
template: CMakeLists.txt.tpl
- path: hello.c
template: hello.c.tpl