Commit 8ae7928380
8ae792838054568fd59817b4de6affe364c72f80
parent: 10389ff7e2
Unsigned
Sandro Santilli <strk@kbt.io> · 2026-06-29 20:33 UTC
Add deb Makefile target
Uses cargo-deb.
Adds 'Debian / Ubuntu package' section in README.md.
Add description and [package.metadata.deb] to Cargo.toml with proper
section, dependencies and asset paths
Layout: unified · split
Cargo.toml
+15
| @@ -5,6 +5,21 @@ authors = ["Damir Jelić <poljar@termina.org.uk>"] |
| 5 | edition = "2018" |
5 | edition = "2018" |
| 6 | license = "ISC" |
6 | license = "ISC" |
| 7 | resolver = "2" |
7 | resolver = "2" |
| |
8 | description = "WeeChat plugin for the Matrix protocol" |
| |
9 | |
| |
10 | [package.metadata.deb] |
| |
11 | maintainer = "Damir Jelić <poljar@termina.org.uk>" |
| |
12 | copyright = "2019-2024, Damir Jelić <poljar@termina.org.uk>" |
| |
13 | extended-description = """\ |
| |
14 | WeeChat plugin for the Matrix protocol built with the Matrix Rust SDK. |
| |
15 | Provides native Matrix support within WeeChat, allowing you to chat |
| |
16 | on Matrix from your favourite IRC client.""" |
| |
17 | section = "net" |
| |
18 | priority = "optional" |
| |
19 | depends = "$auto, weechat-plugins" |
| |
20 | assets = [ |
| |
21 | ["target/release/libmatrix.so", "usr/lib/weechat/plugins/matrix.so", "755"], |
| |
22 | ] |
| 8 | |
23 | |
| 9 | [lib] |
24 | [lib] |
| 10 | name = "matrix" |
25 | name = "matrix" |
Makefile
+7 −1
| @@ -6,7 +6,7 @@ SOURCES := $(wildcard src/*.rs src/bar_items/*.rs src/commands/*.rs src/room/*.r |
| 6 | |
6 | |
| 7 | PROFILE ?= release |
7 | PROFILE ?= release |
| 8 | |
8 | |
| 9 | .PHONY: install install-dir lint all help |
9 | .PHONY: install install-dir lint all help deb |
| 10 | |
10 | |
| 11 | all: help |
11 | all: help |
| 12 | |
12 | |
| @@ -27,3 +27,9 @@ install-dir: ## Create plugins directory |
| 27 | |
27 | |
| 28 | lint: ## Lint issues with clippy |
28 | lint: ## Lint issues with clippy |
| 29 | cargo clippy |
29 | cargo clippy |
| |
30 | |
| |
31 | deb: ## Build a .deb package |
| |
32 | cargo deb |
| |
33 | @echo "" |
| |
34 | @echo "Package built: target/debian/weechat-matrix_*.deb" |
| |
35 | @echo "Install with: sudo dpkg -i target/debian/weechat-matrix_*.deb" |
README.md
+17
| @@ -74,6 +74,23 @@ extension enabled before it loads the plugin: |
| 74 | Rename `target/release/libmatrix.dylib` to `matrix.dylib` before copying it to |
74 | Rename `target/release/libmatrix.dylib` to `matrix.dylib` before copying it to |
| 75 | your WeeChat plugin directory. |
75 | your WeeChat plugin directory. |
| 76 | |
76 | |
| |
77 | # Debian / Ubuntu package |
| |
78 | |
| |
79 | A `.deb` package can be built using `cargo-deb`. This requires |
| |
80 | [Rust installed](https://rustup.rs/) (via rustup, the recommended method). |
| |
81 | |
| |
82 | First ensure `cargo-deb` is available: |
| |
83 | |
| |
84 | cargo install cargo-deb |
| |
85 | |
| |
86 | Then build the package with: |
| |
87 | |
| |
88 | make deb |
| |
89 | |
| |
90 | The resulting `.deb` package is placed in `target/debian/`. Install it with: |
| |
91 | |
| |
92 | sudo dpkg -i target/debian/weechat-matrix_*.deb |
| |
93 | |
| 77 | # Loading the plugin |
94 | # Loading the plugin |
| 78 | |
95 | |
| 79 | Restart WeeChat after installing the plugin, or load it manually: |
96 | Restart WeeChat after installing the plugin, or load it manually: |