archrelease: copy trunk to community-any
[ArchLinux/community.git] / greetd-regreet / trunk / PKGBUILD
blob702bce094446734f95fdf9e1c4476a698d0bf699
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: Harish Rajagopal <harish dot rajagopals at gmail dot com>
4 _pkgname=ReGreet
5 pkgname=greetd-${_pkgname,,}
6 pkgver=0.1.0
7 pkgrel=1
8 pkgdesc='Clean and customizable greeter for greetd'
9 url="https://github.com/rharish101/$_pkgname"
10 license=(GPL3)
11 arch=(x86_64)
12 depends=(cage
13          gcc-libs
14          greetd
15          gtk4)
16 provides=(greetd-greeter)
17 backup=("etc/greetd/${_pkgname,,}.toml")
18 makedepends=(cargo)
19 _archive="$_pkgname-$pkgver"
20 source=("$url/archive/$pkgver/$_archive.tar.gz"
21         "${_pkgname,,}.toml")
22 sha256sums=('fa0092498329cfc1ad9d23913c00c7b89c6cb2eb791e1754411c54f1b2d35282'
23             'b80b3eb31f8cc463d512c9db0eef899bdbe232d977429a8a12e95a3b6df2e387')
25 prepare() {
26         cd "$_archive"
27         cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
30 build() {
31         cd "$_archive"
32         cargo build --frozen --release --all-features
35 check() {
36         cd "$_archive"
37         cargo test --frozen --all-features
40 package() {
41         cd "$_archive"
42         install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${_pkgname,,}"
43         install -Dm0644 -t "$pkgdir/etc/greetd/" ../"${_pkgname,,}.toml"
44         install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" "${_pkgname,,}.sample.toml"
45         install -Dm0644 systemd-tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/${_pkgname,,}.conf"