Build a Debian package with cargo-deb
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Add everything to build a Debian package.
This commit is contained in:
finga 2023-02-07 14:23:35 +01:00
parent 869229c30e
commit 3ecc096500
3 changed files with 33 additions and 1 deletions

View file

@ -4,3 +4,4 @@ pipeline:
image: rust_full image: rust_full
commands: commands:
- cargo checkmate - cargo checkmate
- cargo deb

View file

@ -2,7 +2,7 @@
name = "remindrs" name = "remindrs"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
description = "Organize..." description = "Remind me of something."
license = "GPL-3.0-or-later" license = "GPL-3.0-or-later"
repository = "https://git.onders.org/finga/remindrs" repository = "https://git.onders.org/finga/remindrs"
readme = "../README.md" readme = "../README.md"
@ -26,3 +26,18 @@ axum = "0.6"
tower = { version = "0.4", features = ["util"] } tower = { version = "0.4", features = ["util"] }
tower-http = { version = "0.3", features = ["trace"] } tower-http = { version = "0.3", features = ["trace"] }
once_cell = "1" once_cell = "1"
[package.metadata.deb]
maintainer = "finga <finga@onders.org>"
copyright = "finga <finga@onders.org>"
extended-description = "Remind me of something."
section = "utility"
maintainer-scripts = "debian/"
systemd-units = { enable = false }
assets = [
["config.toml", "etc/remindrs/", "644"],
["target/release/remindrs", "usr/bin/", "755"],
["README.md", "usr/share/doc/remindrs/README", "644"],
["service/remindrs.service", "lib/systemd/system/", "644"],
]
conf-files = ["/etc/remindrs/config.toml"]

16
service/remindrs.service Normal file
View file

@ -0,0 +1,16 @@
[Unit]
Description=remindrs
After=syslog.target
After=network.target
Requires=postgresql.service
[Service]
RestartSec=2s
Type=simple
User=%u
Group=%g
ExecStart=remindrs
Restart=always
[Install]
WantedBy=multi-user.target