summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 60cd353e0b880c63cb0b7e6c34cd124e89553339 (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
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
# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
pkgdesc='Understated cursor theme'
pkgbase=xcursor-cz-viator
pkgname=(xcursor-cz-viator-{hourglass,ring,rotor,windmill}-{white,black} xcursor-cz-hickson)
pkgver=20230203
pkgrel=1
_commit=9b6bc8874d9de7fa264dcf1571d2e7e51d75e06f
license=(GPL3)
url=https://github.com/charakterziffer/cursor-toolbox
arch=(any)
makedepends=(git inkscape xorg-xcursorgen python patch)
depends=()
source=("${pkgbase}::git+${url}#commit=${_commit}" build.patch)
sha512sums=('SKIP'
            'c2b8792e0a9afd639864608dc674acbc1a368d9a83cd46dd3422403961af2b001c3eb004269eb701fcd34f4cfceaca5912a751a6ecd68ad08901ec94e0afb972')

prepare () {
	cd "${pkgbase}"
	patch -p1 < "${srcdir}/build.patch"
}

build () {
	cd "${pkgbase}"
	local spinner color suffix

	for color in white black ; do
		if [[ ${color} = white ]] ; then
			suffix=''
		else
			suffix='-black'
		fi

		msg2 "Rendering color variant: ${color}"
		python render-pngs.py "svgs/template${suffix}.svg"

		for spinner in hourglass ring rotor windmill ; do
			msg2 "Rendering variant: ${spinner} ${color}"
			python render-pngs.py "svgs/spinner-${spinner}${suffix}.svg"

			themetitle="cz-Viator-${spinner}-${color}" ./make.sh
		done
	done

	msg2 "Rendering variant: Hickson"
	python render-pngs.py "more-themes/cz-Hickson/cz-Hickson.svg"
	themetitle="cz-Hickson" ./make.sh
}

_package () {
	install -dm755 "${pkgdir}/usr/share/icons"
	cp -a "${pkgbase}/$1" "${pkgdir}/usr/share/icons/"
}

_package_viator_variant () {
	_package "cz-Viator-$1-$2"
}

package_xcursor-cz-viator-hourglass-white () {
	pkgdesc="${pkgdesc} - white, hourglass wait icon"
	_package_viator_variant hourglass white
}

package_xcursor-cz-viator-hourglass-black () {
	pkgdesc="${pkgdesc} - black, hourglass wait icon"
	_package_viator_variant hourglass black
}

package_xcursor-cz-viator-ring-white () {
	pkgdesc="${pkgdesc} - white, ring wait icon"
	_package_viator_variant ring white
}

package_xcursor-cz-viator-ring-black () {
	pkgdesc="${pkgdesc} - black, ring wait icon"
	_package_viator_variant ring black
}

package_xcursor-cz-viator-rotor-white () {
	pkgdesc="${pkgdesc} - white, rotor wait icon"
	_package_viator_variant rotor white
}

package_xcursor-cz-viator-rotor-black () {
	pkgdesc="${pkgdesc} - black, rotor wait icon"
	_package_viator_variant rotor black
}

package_xcursor-cz-viator-windmill-white () {
	pkgdesc="${pkgdesc} - white, windmill wait icon"
	_package_viator_variant windmill white
}

package_xcursor-cz-viator-windmill-black () {
	pkgdesc="${pkgdesc} - black, windmill wait icon"
	_package_viator_variant windmill black
}

package_xcursor-cz-hickson () {
	pkgdesc="${pkgdesc} - tailless"
	_package cz-Hickson
}