zilch-git

LOW
maintainer dreieck 0 votes scanned 2026-08-20 17:11:42.006138
View on AUR
Why flagged

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

PKGBUILD

1# Maintainer: dreieck (https://aur.archlinux.org/account/dreieck)
2
3_pkgname="zilch"
4pkgname="${_pkgname}-git"
5pkgver=1.1.0.r48.20260805.48af27a
6pkgrel=2
7pkgdesc="Small, fast, self-contained android de-bloat tool. Follow-up of 'droidrunco'."
8arch=(
9 "aarch64"
10 "armv7h"
11 "armv8h"
12 "loong64"
13 "i686"
14 "x86_64"
15)
16url="https://github.com/lavafroth/zilch"
17_url_main_upstream_source="https://github.com/lavafroth/zilch.git"
18license=(
19 'GPL-3.0-or-later'
20)
21provides=(
22 "${_pkgname}=${pkgver}"
23)
24conflicts=(
25 "${_pkgname}"
26 "${_pkgname}-bin"
27)
28replaces=()
29makedepends=(
30 "git"
31 "cargo"
32 "libgcc"
33 "libudev"
34)
35depends=(
36 'glibc'
37 'libgcc_s.so' # 'libgcc'
38 'libudev.so' # 'libudev'
39)
40optdepends=()
41source=(
42 "${_pkgname}::git+${_url_main_upstream_source}" # Main upstream source.
43)
44sha256sums=(
45 'SKIP' # Main upstream source.
46)
47_cargo_build_options=(
48 --frozen
49 --release
50 --all-features
51)
52options+=('!lto') # Needed to workaround linking issue.
53#options+=('!lto' 'debug' '!strip')
54
55
56prepare() {
57 cd "${srcdir}/${_pkgname}"
58
59 export RUSTUP_HOME="${srcdir}/.rustup"
60 export RUSTUP_TOOLCHAIN=stable
61 export CARGO_HOME="${srcdir}/.cargo"
62 export CARGO_TARGET_DIR=target
63
64 printf '%s\n' " --> Generating git log ..."
65 git log > git.log
66
67 printf '%s\n' " --> Downloading rust dependencies ..."
68 cargo fetch --locked --target host-tuple
69}
70
71
72
73pkgver() {
74 cd "${srcdir}/${_pkgname}"
75
76 _ver="$(git describe --tags | sed -E -e 's|^[vV]||' -e 's|\-g[0-9a-f]*$||' -e 's|-([0-9]+)$|+\1|')"
77 _rev="$(git rev-list --count HEAD)"
78 _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
79 _hash="$(git rev-parse --short HEAD)"
80
81 if [ -z "${_ver}" ]; then
82 error "Version could not be determined."
83 return 1
84 else
85 printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
86 fi
87}
88
89
90
91build() {
92 cd "${srcdir}/${_pkgname}"
93
94 export RUSTUP_HOME="${srcdir}/.rustup"
95 export RUSTUP_TOOLCHAIN=stable
96 export CARGO_HOME="${srcdir}/.cargo"
97 export CARGO_TARGET_DIR=target
98
99 printf '%s\n' " --> Building ..."
100 cargo build "${_cargo_build_options[@]}"
101}
102
103
104package() {
105 cd "${srcdir}/${_pkgname}"
106
107 export RUSTUP_HOME="${srcdir}/.rustup"
108 export RUSTUP_TOOLCHAIN=stable
109 export CARGO_HOME="${srcdir}/.cargo"
110 export CARGO_TARGET_DIR=target
111
112
113 printf '%s\n' " --> Installing main application ..."
114 install -Dvm755 -t "${pkgdir}/usr/bin" target/release/zilch
115
116 printf '%s\n' " --> Installing basic documentation ..."
117 install -Dvm644 -t "${pkgdir}/usr/share/doc/${_pkgname}" git.log README.md
118 install -Dvm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/assets" assets/*
119
120 printf '%s\n' " --> Installing license ..."
121 install -Dvm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
122}
123

Scan history

Scanned at (UTC)SeverityRules
2026-08-20 17:11:42 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion