-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathPKGBUILD-git
More file actions
119 lines (107 loc) · 4.11 KB
/
PKGBUILD-git
File metadata and controls
119 lines (107 loc) · 4.11 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Maintainer: Firstpick firstpick1992@proton.me
pkgname=pacsea-git
pkgver=0.8.2
pkgrel=2
pkgdesc="Fast TUI for searching, inspecting, and queueing pacman/AUR packages written in Rust (git version)"
arch=('x86_64' 'aarch64')
url="https://github.com/Firstp1ck/Pacsea"
license=('MIT')
depends=('pacman' 'curl' 'bash' 'sudo' 'coreutils' 'grep' 'xdg-utils')
optdepends=(
'paru: AUR package installation'
'yay: alternative AUR helper'
'wl-clipboard: clipboard support on Wayland'
'xclip: clipboard support on X11'
'reflector: update Arch mirrors'
'pacman-mirrors: Manjaro mirrorlist'
'rate-mirrors: Artix mirror rating'
'alacritty: run external commands in a terminal'
'kitty: run external commands in a terminal'
'ghostty: run external commands in a terminal'
'xterm: run external commands in a terminal'
'gnome-terminal: run external commands in a terminal'
'konsole: run external commands in a terminal'
'xfce4-terminal: run external commands in a terminal'
'tilix: run external commands in a terminal'
'mate-terminal: run external commands in a terminal'
'neovim: external editor'
'vim: external editor'
'emacs: external editor'
'helix: external editor'
'nano: external editor'
'klipper: clipboard manager on X11'
'clamav: malware scanning of files'
'trivy: vulnerability scanning'
'semgrep-bin: static analysis checks'
'shellcheck: lint shell scripts'
'downgrade: Downgrade of Packages'
'pacman-contrib: Used as a fallback for update checking'
)
makedepends=('cargo' 'git')
conflicts=('pacsea' 'pacsea-bin')
provides=('pacsea')
# Empty source array - using custom source() function for sparse checkout
source=()
sha256sums=()
# Custom source function to clone with sparse checkout (skip docs, CI, and dev-only paths).
fetch_source() {
cd "$srcdir" || exit 1
if [ ! -d Pacsea ]; then
git clone --filter=blob:none --sparse https://github.com/Firstp1ck/Pacsea.git Pacsea
fi
cd Pacsea || exit 1
git pull --tags origin main 2>/dev/null || true
git sparse-checkout init --no-cone
git sparse-checkout set '/*' \
'!/Images' '!/Release-docs' '!/dev' '!/.github' '!/.cursor' \
'!/AGENTS.md' '!/CLAUDE.md' '!/CHANGELOG.md' '!/CODE_OF_CONDUCT.md' \
'!/CONTRIBUTING.md' '!/SECURITY.md' \
'!/deny.toml' '!/rustfmt.toml' '!/clippy.toml' '!/Makefile' '!/.gitleaks.toml' \
'!/PKGBUILD-bin' '!/PKGBUILD-git' '!/pacsea.code-workspace' \
'!/.gitattributes' '!/.gitignore'
git checkout 2>/dev/null || true
}
pkgver() {
if [ ! -d "$srcdir/Pacsea" ]; then
fetch_source >/dev/null 2>&1
fi
cd "$srcdir/Pacsea" || exit 1
git describe --tags --long --always \
| sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
if [ ! -d "$srcdir/Pacsea" ]; then
fetch_source
fi
cd "$srcdir/Pacsea" || exit 1
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$srcdir/Pacsea" || exit 1
# Strip makepkg's cross-compiler wrappers so aws-lc-sys cmake build
# uses plain system tools and not x86_64-pc-linux-gnu-* wrappers.
unset CC CXX AR LD CFLAGS CXXFLAGS LDFLAGS CHOST
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
check() {
cd "$srcdir/Pacsea" || exit 1
unset CC CXX AR LD CFLAGS CXXFLAGS LDFLAGS CHOST
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --release --all-features -- --test-threads=1
}
package() {
cd "$srcdir/Pacsea" || exit 1
install -Dm755 "target/release/pacsea" "$pkgdir/usr/bin/pacsea"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
# Install i18n configuration
install -Dm644 "config/i18n.yml" "$pkgdir/usr/share/pacsea/config/i18n.yml"
# Install locale files
install -d "$pkgdir/usr/share/pacsea/locales"
install -m644 config/locales/*.yml "$pkgdir/usr/share/pacsea/locales/"
install -Dm644 data/pacsea.desktop "$pkgdir/usr/share/applications/pacsea.desktop"
install -Dm644 data/assets/pacsea.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/pacsea.svg"
}