blob: a785592f3b2f793beabb9cd5c3fd2ae347fa78d5 (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Maintainer: Cherry <arch@sparklet.org>
# shellcheck disable=SC2034,SC2154
_pkgname=windot
pkgname=$_pkgname-git
pkgver=0.2.1.r93
pkgrel=1
arch=(x86_64)
url="https://github.com/Lamby777/windot"
source=("$_pkgname::git+https://github.com/Lamby777/windot.git")
pkgdesc="A simple emoji picker."
md5sums=('SKIP')
depends=('gtk4' 'libadwaita')
makedepends=('cargo' 'git' 'pkgconf')
conflicts=('windot')
provides=("windot=${pkgver}")
# Fetch the current version using the latest commit hash
pkgver() {
cd "$srcdir/$_pkgname"
# get the crate version using grep and sed
cargo_ver=$(grep '^version =' Cargo.toml | sed -E 's/version = "(.*)"/\1/')
# use the latest commit's rev#
git_rev=$(git rev-list --count HEAD)
# requires the rev first for version sorting purposes
echo "$cargo_ver.r$git_rev"
}
prepare() {
cd "$srcdir/$_pkgname"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$srcdir/$_pkgname"
make
}
package() {
cd "$srcdir/$_pkgname"
export RUSTUP_TOOLCHAIN=stable
make install DESTDIR="$pkgdir/" prefix="/usr"
}
|