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>"]
5edition = "2018" 5edition = "2018"
6license = "ISC" 6license = "ISC"
7resolver = "2" 7resolver = "2"
8description = "WeeChat plugin for the Matrix protocol"
9
10[package.metadata.deb]
11maintainer = "Damir Jelić <poljar@termina.org.uk>"
12copyright = "2019-2024, Damir Jelić <poljar@termina.org.uk>"
13extended-description = """\
14WeeChat plugin for the Matrix protocol built with the Matrix Rust SDK.
15Provides native Matrix support within WeeChat, allowing you to chat
16on Matrix from your favourite IRC client."""
17section = "net"
18priority = "optional"
19depends = "$auto, weechat-plugins"
20assets = [
21 ["target/release/libmatrix.so", "usr/lib/weechat/plugins/matrix.so", "755"],
22]
8 23
9[lib] 24[lib]
10name = "matrix" 25name = "matrix"
Makefile +7 −1
@@ -6,7 +6,7 @@ SOURCES := $(wildcard src/*.rs src/bar_items/*.rs src/commands/*.rs src/room/*.r
6 6
7PROFILE ?= release 7PROFILE ?= release
8 8
9.PHONY: install install-dir lint all help 9.PHONY: install install-dir lint all help deb
10 10
11all: help 11all: help
12 12
@@ -27,3 +27,9 @@ install-dir: ## Create plugins directory
27 27
28lint: ## Lint issues with clippy 28lint: ## Lint issues with clippy
29 cargo clippy 29 cargo clippy
30
31deb: ## 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:
74Rename `target/release/libmatrix.dylib` to `matrix.dylib` before copying it to 74Rename `target/release/libmatrix.dylib` to `matrix.dylib` before copying it to
75your WeeChat plugin directory. 75your WeeChat plugin directory.
76 76
77# Debian / Ubuntu package
78
79A `.deb` package can be built using `cargo-deb`. This requires
80[Rust installed](https://rustup.rs/) (via rustup, the recommended method).
81
82First ensure `cargo-deb` is available:
83
84 cargo install cargo-deb
85
86Then build the package with:
87
88 make deb
89
90The 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
79Restart WeeChat after installing the plugin, or load it manually: 96Restart WeeChat after installing the plugin, or load it manually: