From 9bfa89a5553de66a896eb6abb62baaaddb095ab5 Mon Sep 17 00:00:00 2001 From: strawberry Date: Sat, 18 May 2024 22:32:02 -0400 Subject: [PATCH] adjust debian metadata, set crane workspace name Signed-off-by: strawberry --- .github/workflows/ci.yml | 3 ++- Cargo.toml | 3 +++ src/bin/Cargo.toml | 13 +++++++------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 143dfc56..fd13c073 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -213,7 +213,8 @@ jobs: mkdir -v -p target/$CARGO_DEB_TARGET_TUPLE/release/ cp -v -f result/bin/conduit target/release/conduwuit cp -v -f result/bin/conduit target/$CARGO_DEB_TARGET_TUPLE/release/conduwuit - direnv exec . cargo deb --verbose --no-build --no-strip --target=$CARGO_DEB_TARGET_TUPLE --output target/release/${{ matrix.target }}.deb + # -p conduit is the main crate name + direnv exec . cargo deb --verbose --no-build --no-strip -p conduit --target=$CARGO_DEB_TARGET_TUPLE --output target/release/${{ matrix.target }}.deb mv -v target/release/conduwuit static-${{ matrix.target }} mv -v target/release/${{ matrix.target }}.deb ${{ matrix.target }}.deb diff --git a/Cargo.toml b/Cargo.toml index 2e2153a9..798cd0f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,9 @@ homepage = "https://conduwuit.puppyirl.gay/" repository = "https://github.com/girlbossceo/conduwuit" readme = "README.md" +[workspace.metadata.crane] +name = "conduit" + # 1.1.17 seems broken on nix from a permission error? [workspace.dependencies.libz-sys] version = "=1.1.16" diff --git a/src/bin/Cargo.toml b/src/bin/Cargo.toml index e50dba24..282f6aac 100644 --- a/src/bin/Cargo.toml +++ b/src/bin/Cargo.toml @@ -11,25 +11,26 @@ readme.workspace = true version.workspace = true edition.workspace = true rust-version.workspace = true +metadata.crane.workspace = true [package.metadata.deb] name = "conduwuit" maintainer = "strawberry " copyright = "2024, strawberry " -license-file = ["LICENSE", "3"] +license-file = ["../../LICENSE", "3"] depends = "$auto, ca-certificates" extended-description = """\ a cool hard fork of Conduit, a Matrix homeserver written in Rust""" section = "net" priority = "optional" conf-files = ["/etc/conduwuit/conduwuit.toml"] -maintainer-scripts = "debian/" +maintainer-scripts = "../../debian/" systemd-units = { unit-name = "conduwuit", start = false } assets = [ - ["debian/README.md", "usr/share/doc/conduwuit/README.Debian", "644"], - ["README.md", "usr/share/doc/conduwuit/", "644"], - ["target/release/conduwuit", "usr/sbin/conduwuit", "755"], - ["conduwuit-example.toml", "etc/conduwuit/conduwuit.toml", "640"], + ["../../debian/README.md", "usr/share/doc/conduwuit/README.Debian", "644"], + ["../../README.md", "usr/share/doc/conduwuit/", "644"], + ["../../target/release/conduwuit", "usr/sbin/conduwuit", "755"], + ["../../conduwuit-example.toml", "etc/conduwuit/conduwuit.toml", "640"], ] [features]