blob: a44f492d716318cbbdbdd81d4aebf5e689e537d3 (
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
50
51
52
53
54
55
56
57
58
59
60
61
|
# Maintainer: Robin <NurRobin@users.noreply.github.com>
pkgname=nursearch
pkgver=0.3.0
pkgrel=1
pkgdesc='Small local GTK4 app launcher with a plugin platform'
arch=('x86_64')
url='https://github.com/NurRobin/nursearch'
license=('MIT')
depends=('gtk4' 'sqlite' 'xdg-utils')
makedepends=('cargo')
optdepends=(
'fd: faster file search plugin backend'
'kdotool: KDE Plasma Wayland window switcher plugin'
'wl-clipboard: clipboard history plugin'
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('0b7429d6f1d5c758b83bd866c7c524e9e36b6ce2a79cbf65b47f499f5fbc1040')
prepare() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --release --locked --workspace
}
check() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo test --release --locked --workspace
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 target/release/nursearch "$pkgdir/usr/bin/nursearch"
install -Dm755 target/release/nursearch-plugins "$pkgdir/usr/bin/nursearch-plugins"
local plugin_bin
for plugin_bin in clipboard demo emoji files web windows; do
install -Dm755 "target/release/nursearch-$plugin_bin" \
"$pkgdir/usr/lib/nursearch/nursearch-$plugin_bin"
done
local plugin
for plugin in clipboard demo emoji files web windows; do
install -Dm644 "plugins/$plugin/nursearch-plugin.toml" \
"$pkgdir/usr/share/nursearch/plugins/$plugin/nursearch-plugin.toml"
sed -i "s#entry = \\[\"../../target/debug/nursearch-$plugin\"\\]#entry = [\"/usr/lib/nursearch/nursearch-$plugin\"]#" \
"$pkgdir/usr/share/nursearch/plugins/$plugin/nursearch-plugin.toml"
done
install -Dm644 nursearch.desktop "$pkgdir/usr/share/applications/nursearch.desktop"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|