summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a9ec90bf27fab9f8feb6ece68e06d6a894ee3251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Maintainer: Jonas Witschel <diabonas@archlinux.org>
pkgname=weechat-matrix-rs-git
pkgver=r405.2b093a7
pkgrel=1
pkgdesc='Rust rewrite of the Python weechat-matrix script'
arch=('x86_64')
url='https://github.com/poljar/weechat-matrix-rs'
license=('ISC')
depends=('openssl' 'weechat')
makedepends=('git' 'clang' 'cmake' 'rust')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+$url.git")
sha512sums=('SKIP')

pkgver() {
	cd "${pkgname%-git}"
	printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "${pkgname%-git}"
	cargo build --release --locked
}

package() {
	cd "${pkgname%-git}"
	install -Dm755 target/release/libmatrix.so "$pkgdir/usr/lib/weechat/plugins/matrix.so"
	install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}