blob: aff872f5af2b4ba7ed59bdccd9160f84dad4899d (
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
|
# Maintainer: strat <strat@jamjar.ws>
pkgname=spicetify-themes-git
pkgver=r511.82e14ab
pkgrel=1
pkgdesc="A community-driven collection of themes for spicetify"
arch=('any')
url="https://github.com/spicetify/spicetify-themes"
license=('MIT')
groups=()
makedepends=('git')
provides=("spicetify-themes")
conflicts=("spicetify-themes")
replaces=()
backup=()
options=()
install=spicetify-themes-git.install
source=("git+$url")
noextract=()
md5sums=('SKIP')
pkgver() {
cd "$srcdir/spicetify-themes"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
depends=('spicetify-cli')
mkdir -p "$pkgdir/opt/spicetify-cli"
cp -r --no-preserve=ownership "$srcdir/spicetify-themes" "$pkgdir/opt/spicetify-cli/Themes"
echo "Removing useless files at top level..."
find "$pkgdir/opt/spicetify-cli/Themes" -maxdepth 1 \( -name ".*" -o -name "_*" -o -type f \) -exec rm -rfv {} +
echo "Removing useless files in each theme..."
find "$pkgdir/opt/spicetify-cli/Themes" -mindepth 2 ! -regex '.*\(\.css\|\.ini\|\.js\|\.woff2\|\.svg\)' -type f -exec rm -fv {} +
echo "Pruning empty directories..."
find "$pkgdir/opt/spicetify-cli/Themes" -type d -empty -exec rm -rfv {} +
}
|