Move the four templates' static file bodies into .tpl files under
data/templates/<id>/, referenced by their manifests' files: lists —
the shell skeleton script (executable, {command}-named) with its
skeleton-only debian/install mapping, the empty template's stub README,
the makefile hello.c/Makefile skeleton with its skeleton-only install
mapping, and go's go.mod/main.go skeleton (the go directive of go.mod
stays a literal: nothing about it is answer-derived).
The empty template ends up hookless — zero Rust, its registry entry
points at no hooks — and src/new/templates/empty.rs is deleted. The
shell and go hooks shrink to their probes (plus go's {go_import_path}
context value); the makefile hooks keep only the existing-tree hint
probing the packaged Makefile for a phony install: target, since that
heuristic reads the tree and cannot be data.
29 lines
974 B
YAML
29 lines
974 B
YAML
## The `makefile` template: a generic project driven by a plain Makefile.
|
|
## debhelper's makefile buildsystem runs `make` for the build and
|
|
## `make install DESTDIR=...` when the Makefile carries an `install:`
|
|
## target (missing targets are skipped gracefully), so plain `dh $@`
|
|
## plumbing is enough here. The phony-install hint of
|
|
## src/new/templates/makefile.rs (whether dh_auto_install will run
|
|
## `make install` for an existing tree) is the only logic; the skeleton
|
|
## bodies below are static data (the install mapping is rendered for
|
|
## skeletons only, whose phony install target is known by construction).
|
|
##
|
|
## Schema: see src/new/templates/mod.rs.
|
|
|
|
id: makefile
|
|
label: Generic (Makefile)
|
|
detect:
|
|
files: [Makefile]
|
|
build_depends:
|
|
- build-essential
|
|
architecture: any
|
|
rules_dh_line: "dh $@"
|
|
files:
|
|
- path: hello.c
|
|
template: hello.c.tpl
|
|
- path: Makefile
|
|
template: Makefile.tpl
|
|
- path: debian/install
|
|
template: install.tpl
|
|
skeleton_only: true
|