summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1c96dbc9372ffd812a3dc39c4afb56a2d91d5fa2 (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
31
32
33
34
35
36
# Maintainer: Luis Martinez <luis dot martinez at tuta dot io>

pkgname=greetd-ddlm-git
pkgver=r4.55fadbb
pkgrel=1
pkgdesc="deathowl's dummy login manager"
arch=('x86_64')
url="https://github.com/deathowl/ddlm"
license=('unknown')
depends=('greetd')
makedepends=('cargo' 'git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url")
sha256sums=('SKIP')

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

build() {
	cd "$pkgname"
	cargo build --release --locked --all-features --target-dir=target
}

check() {
	cd "$pkgname"
	cargo test --release --locked --target-dir=target
}

package() {
	cd "$pkgname"
	install -Dm755 target/release/ddlm -t "$pkgdir/usr/bin/"
	install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}