forked from Proxmox/proxmox
buildsys: get crate list via cargo metadata in Makefile
so we don't have to keep this in sync manually Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
e6d1e6440d
commit
d3f2a86f80
22
Makefile
22
Makefile
@ -1,26 +1,6 @@
|
||||
# Shortcut for common operations:
|
||||
|
||||
CRATES = \
|
||||
proxmox-api-macro \
|
||||
proxmox-async \
|
||||
proxmox-borrow \
|
||||
proxmox-compression \
|
||||
proxmox-http \
|
||||
proxmox-io \
|
||||
proxmox-lang \
|
||||
proxmox-metrics \
|
||||
proxmox-rest-server \
|
||||
proxmox-router \
|
||||
proxmox-schema \
|
||||
proxmox-serde \
|
||||
proxmox-shared-memory \
|
||||
proxmox-section-config \
|
||||
proxmox-sortable-macro \
|
||||
proxmox-subscription \
|
||||
proxmox-sys \
|
||||
proxmox-tfa \
|
||||
proxmox-time \
|
||||
proxmox-uuid
|
||||
CRATES != cargo metadata --format-version=1 | jq -r .workspace_members'[]' | awk '{ print $$1 }'
|
||||
|
||||
# By default we just run checks:
|
||||
.PHONY: all
|
||||
|
@ -27,12 +27,12 @@ Adding Crates
|
||||
1) At the top level:
|
||||
- Generate the crate: ``cargo new --lib the-name``
|
||||
- Sort the crate into ``Cargo.toml``'s ``workspace.members``
|
||||
- Sort the crate into the ``Makefile``'s ``CRATES`` list.
|
||||
|
||||
2) In the new crate's ``Cargo.toml``:
|
||||
- Replace the ``author`` line with
|
||||
``authors = ["Proxmox Support Team <support@proxmox.com>"]``
|
||||
- Add ``license = "AGPL-3"``
|
||||
- In ``[package]`` set:
|
||||
authors.workspace = true
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
- Add ``exclude = [ "debian" ]``
|
||||
- Add a meaningful ``description``
|
||||
- Copy ``debian/copyright`` and ``debian/debcargo.toml`` from another subcrate.
|
||||
|
Loading…
Reference in New Issue
Block a user