summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 950146ddc1d31f0fa317b34198f0bbf60dd1572b (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=r281.78f0d09
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}"
	RUSTC_BOOTSTRAP=1 cargo build --release --locked # enable nightly async_closure feature
}

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"
}