From 4bccbdbb2dda5ef6181c819e23c27bf90c049aa5 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 26 Apr 2024 00:31:23 +0200 Subject: [PATCH] WIP: create dpkg package --- Cargo.toml | 29 +++++++++++++++++++++++++++++ example-config.toml | 2 +- flake.nix | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index faa78e2..00ad881 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,17 @@ name = "mysqladm-rs" version = "0.1.0" edition = "2021" +# TODO: change licensing? +license = "GPL-2.0-only" +authors = ["oysteikt@pvv.ntnu.no"] +repository = "https://git.pvv.ntnu.no/Projects/mysqladm-rs" +# TODO: write a proper description +description = """\ +asdf +""" +categories = ["command-line-interface", "command-line-utilities"] +keywords = ["mysql", "cli", "administration"] +readme = "README.md" [dependencies] anyhow = "1.0.86" @@ -52,3 +63,21 @@ anyhow = "1.0.82" [dev-dependencies] regex = "1.10.6" + +# TODO: package shell completions +[package.metadata.deb] +maintainer = "Programvareverkstedet " +section = "admin" +assets = [ + [ + "target/release/mysqladm", + "usr/bin/", + "4755", + ], + [ + "example-config.toml", + "etc/mysqladm/config.toml", + "644", + ], +] +conf-files = ["etc/mysqladm/config.toml"] diff --git a/example-config.toml b/example-config.toml index c2f9e44..47fe97e 100644 --- a/example-config.toml +++ b/example-config.toml @@ -19,4 +19,4 @@ port = 3306 username = "root" password = "secret" -timeout = 2 # seconds \ No newline at end of file +timeout = 2 # seconds diff --git a/flake.nix b/flake.nix index 99f873b..3676a25 100644 --- a/flake.nix +++ b/flake.nix @@ -45,6 +45,7 @@ toolchain mysql-client cargo-nextest + cargo-deb ]; RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";