summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 238f02f9510613aaaf8a43ed00f18d5b2b3d9685 (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
# Maintainer: Jasper <j@sperp.dev>

pkgname=glimpse-git
pkgver=r66.1cb3747
pkgrel=1
pkgdesc="A simple GTK3 launcher/finder utility."
depends=('xdg-utils' 'gtk3' 'sqlite')
makedepends=('rust' 'cargo' 'git')
license=('GPL3')
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/jaspwr/glimpse"

source=("$pkgname::git+https://github.com/jaspwr/glimpse#branch=main")
sha256sums=('SKIP')

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

prepare() {
    cd "$pkgname"
    cargo fetch --target "$CARCH-unknown-linux-gnu"
}

build() {
    cd "$pkgname"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --release
}

package() {
    cd "$pkgname"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/glimpse"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/glimpse-indexer"
}