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>"]
55edition = "2018"
66license = "ISC"
77resolver = "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]
823
924[lib]
1025name = "matrix"
Makefile +7 −1
@@ -6,7 +6,7 @@ SOURCES := $(wildcard src/*.rs src/bar_items/*.rs src/commands/*.rs src/room/*.r
66
77PROFILE ?= release
88
9.PHONY: install install-dir lint all help
9.PHONY: install install-dir lint all help deb
1010
1111all: help
1212
@@ -27,3 +27,9 @@ install-dir: ## Create plugins directory
2727
2828lint: ## Lint issues with clippy
2929 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:
7474Rename `target/release/libmatrix.dylib` to `matrix.dylib` before copying it to
7575your WeeChat plugin directory.
7676
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
7794# Loading the plugin
7895
7996Restart WeeChat after installing the plugin, or load it manually: