forked from Szerwigi1410/brokefetch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPKGBUILD
More file actions
48 lines (42 loc) · 1.17 KB
/
PKGBUILD
File metadata and controls
48 lines (42 loc) · 1.17 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
# Maintainer: Oliwier <szerwigi14@gmail.com>
pkgname=brokefetch-git
pkgver=2025.08.16.rc40647b
pkgrel=1
pkgdesc="brokefetch is the only system info tool that doesn't pretend your life is okay. (git version)"
arch=('any')
url="https://github.com/Szerwigi1410/brokefetch"
license=('MIT')
depends=('bash')
source=("$pkgname::git+$url")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/$pkgname"
local hash date
hash=$(git rev-parse --short HEAD)
date=$(git log -1 --format=%cd --date=format:'%Y.%m.%d')
echo "${date}.r${hash}"
}
prepare() {
echo "🧹 Preparing brokefetch script..."
cp "$srcdir/$pkgname/brokefetch.sh" "$srcdir/"
}
package() {
echo "📦 Installing brokefetch..."
install -Dm755 "$srcdir/brokefetch.sh" "$pkgdir/usr/bin/brokefetch"
}
clean() {
echo "💣 Nuking old build artifacts..."
rm -f "$PWD"/*.pkg.tar.* "$PWD"/*.log
}
post_install() {
echo "♻️ Removing any old system binary..."
if [[ -f /usr/bin/brokefetch ]]; then
rm -f /usr/bin/brokefetch
fi
}
post_upgrade() {
echo "🔄 Updating... removing outdated brokefetch..."
if [[ -f /usr/bin/brokefetch ]]; then
rm -f /usr/bin/brokefetch
fi
}