Commit c94d7d0ad7

c94d7d0ad732c5bd7dd2f506545ea134d71220ac

parent: d44961c461

Unregistered key

Ulyssa <git@ulyssa.dev> · 2024-08-15 03:37 UTC
committer: <noreply@github.com>

Add metadata for `cargo-deb` and `cargo-generate-rpm` (#321)

Layout: unified · split

Cargo.toml +30
@@ -92,3 +92,33 @@ pretty_assertions = "1.4.0"
92inherits = "release" 92inherits = "release"
93incremental = false 93incremental = false
94lto = true 94lto = true
95
96[package.metadata.deb]
97section = "net"
98license-file = ["LICENSE", "0"]
99assets = [
100 # Binary:
101 ["target/release/iamb", "usr/bin/iamb", "755"],
102 # Manual pages:
103 ["docs/iamb.1", "usr/share/man/man1/iamb.1", "644"],
104 ["docs/iamb.5", "usr/share/man/man5/iamb.5", "644"],
105 # Other assets:
106 ["iamb.desktop", "usr/share/applications/iamb.desktop", "644"],
107 ["config.example.toml", "usr/share/iamb/config.example.toml", "644"],
108 ["docs/iamb.svg", "usr/share/icons/hicolor/scalable/apps/iamb.svg", "644"],
109 ["docs/iamb.metainfo.xml", "usr/share/metainfo/iamb.metainfo.xml", "644"],
110]
111
112[package.metadata.generate-rpm]
113assets = [
114 # Binary:
115 { source = "target/release/iamb", dest = "/usr/bin/iamb", mode = "755" },
116 # Manual pages:
117 { source = "docs/iamb.1", dest = "/usr/share/man/man1/iamb.1", mode = "644" },
118 { source = "docs/iamb.5", dest = "/usr/share/man/man5/iamb.5", mode = "644" },
119 # Other assets:
120 { source = "iamb.desktop", dest = "/usr/share/applications/iamb.desktop", mode = "644" },
121 { source = "config.example.toml", dest = "/usr/share/iamb/config.example.toml", mode = "644"},
122 { source = "docs/iamb.svg", dest = "/usr/share/icons/hicolor/scalable/apps/iamb.svg", mode = "644"},
123 { source = "docs/iamb.metainfo.xml", dest = "/usr/share/metainfo/iamb.metainfo.xml", mode = "644"},
124]
PACKAGING.md +1
@@ -28,6 +28,7 @@ and GCC are present.
28In addition to the compiled binary, there are other files in the repo that 28In addition to the compiled binary, there are other files in the repo that
29you'll want to install as part of a package: 29you'll want to install as part of a package:
30 30
31<!-- Please keep in sync w/ the `deb`/`generate-rpm` sections of `Cargo.toml` -->
31| Repository Path | Installed Path (may vary per OS) | 32| Repository Path | Installed Path (may vary per OS) |
32| ----------------------- | ----------------------------------------------- | 33| ----------------------- | ----------------------------------------------- |
33| /iamb.desktop | /usr/share/applications/iamb.desktop | 34| /iamb.desktop | /usr/share/applications/iamb.desktop |