Skip to content

Commit c50f950

Browse files
committed
New package: bibata-cursor-2.0.7
1 parent be43129 commit c50f950

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

srcpkgs/bibata-cursor/template

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Template file for 'bibata-cursor'
2+
pkgname=bibata-cursor
3+
version=2.0.7
4+
revision=1
5+
hostmakedepends="python3 python3-clickgen yarn"
6+
short_desc="Open source, compact, and material designed cursor set"
7+
maintainer="zenobit <zenobit@disroot.org>"
8+
license="GPL-3.0-only"
9+
homepage="https://www.bibata.live/"
10+
changelog="https://github.com/ful1e5/Bibata_Cursor/releases"
11+
distfiles="https://github.com/ful1e5/Bibata_Cursor/archive/refs/tags/v${version}.tar.gz
12+
https://github.com/ful1e5/Bibata_Cursor/releases/download/v${version}/bitmaps.zip"
13+
checksum="1f21e5cade53d668476f973bd8ec827882a0e32c38e0e766abf007f8b3b46313
14+
87898034589777e77bfa610ed42e6663a6ba57bb91116d296f800199c1bb9183"
15+
16+
pre_build() {
17+
mv bitmaps "Bibata_Cursor-$version/"
18+
cd "Bibata_Cursor-$version" && rm -rf themes bin
19+
}
20+
21+
22+
do_build() {
23+
cd "Bibata_Cursor-$version"
24+
version="v2.0.6"
25+
26+
get_config_path() {
27+
local key="${1}"
28+
local cfg_path="configs"
29+
30+
if [[ $key == *"Right"* ]]; then
31+
cfg_path="${cfg_path}/right"
32+
else
33+
cfg_path="${cfg_path}/normal"
34+
fi
35+
36+
echo $cfg_path
37+
}
38+
39+
with_version() {
40+
local comment="${1}"
41+
echo "$comment ($version)."
42+
}
43+
44+
if ! type -p ctgen >/dev/null; then
45+
error ctgen
46+
exit 127 # exit program with "command not found" error code
47+
fi
48+
49+
declare -A names
50+
names["Bibata-Modern-Amber"]=$(with_version "Yellowish and rounded edge Bibata")
51+
names["Bibata-Modern-Amber-Right"]=$(with_version "Yellowish and rounded edge right-hand Bibata")
52+
names["Bibata-Modern-Classic"]=$(with_version "Black and rounded edge Bibata")
53+
names["Bibata-Modern-Classic-Right"]=$(with_version "Black and rounded edge right-hand Bibata")
54+
names["Bibata-Modern-Ice"]=$(with_version "White and rounded edge Bibata")
55+
names["Bibata-Modern-Ice-Right"]=$(with_version "White and rounded edge right-hand Bibata")
56+
names["Bibata-Original-Amber"]=$(with_version "Yellowish and sharp edge Bibata")
57+
names["Bibata-Original-Amber-Right"]=$(with_version "Yellowish and sharp edge right-hand Bibata")
58+
names["Bibata-Original-Classic"]=$(with_version "Black and sharp edge Bibata")
59+
names["Bibata-Original-Classic-Right"]=$(with_version "Black and sharp edge right-hand Bibata")
60+
names["Bibata-Original-Ice"]=$(with_version "White and sharp edge Bibata")
61+
names["Bibata-Original-Ice-Right"]=$(with_version "White and sharp edge right-hand Bibata")
62+
63+
# Building Bibata XCursor binaries
64+
for key in "${!names[@]}"; do
65+
comment="${names[$key]}"
66+
cfg_path=$(get_config_path "$key")
67+
68+
ctgen "$cfg_path/x.build.toml" -p x11 -d "bitmaps/$key" -n "$key" -c "$comment XCursors" &
69+
PID=$!
70+
wait $PID
71+
done
72+
}
73+
74+
do_install() {
75+
cd "Bibata_Cursor-$version"
76+
install -d "$DESTDIR/usr/share/icons"
77+
cp -r themes/Bibata-* "$DESTDIR/usr/share/icons/"
78+
}

0 commit comments

Comments
 (0)