blob: 79514bf5a484155af5ccf868a0baf38094c6d3f1 (
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
|
# Maintainer: Stevan <stevp003@gmail.com>
pkgname=phasefetch
pkgver=1.0.3
pkgrel=1
pkgdesc="Calculates the current moon phase and writes corresponding art to a file, designed for use with FastFetch"
arch=("any")
url="https://github.com/SteveMCWin/phasefetch"
license=("MIT")
depends=("bash" "awk" "file" "coreutils")
optdepends=("imagemagick: tint PNG moon images with --color"
"fastfetch: display moon phase in terminal fetch")
source=("$pkgname-$pkgver.tar.gz::https://github.com/SteveMCWin/$pkgname/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('3fc46ea5c7cfe4c452fd3701d62ed438c00ac32e8f8acbe08ac7a3f0ba8d790f')
package() {
cd "$srcdir/$pkgname-$pkgver"
# Install the script as the binary
install -Dm755 phasefetch.sh "$pkgdir/usr/bin/$pkgname"
# Install mode data directories
for mode_dir in */; do
mode_name="${mode_dir%/}"
# Only install directories that look like mode folders
if [ -f "$mode_dir/full_moon" ] || [ -f "$mode_dir/new_moon" ]; then
install -dm755 "$pkgdir/usr/share/$pkgname/$mode_name"
for file in "$mode_dir"*; do
install -Dm644 "$file" "$pkgdir/usr/share/$pkgname/$mode_name/$(basename "$file")"
done
fi
done
# Install license
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Install readme
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
|