diff --git a/srcpkgs/bibata-cursor/template b/srcpkgs/bibata-cursor/template new file mode 100644 index 00000000000000..f08147999cb19c --- /dev/null +++ b/srcpkgs/bibata-cursor/template @@ -0,0 +1,79 @@ +# Template file for 'bibata-cursor' +pkgname=bibata-cursor +version=2.0.7 +revision=1 +hostmakedepends="python3 python3-clickgen yarn" +short_desc="Open source, compact, and material designed cursor set" +maintainer="zenobit " +license="GPL-3.0-only" +homepage="https://www.bibata.live/" +changelog="https://github.com/ful1e5/Bibata_Cursor/releases" +distfiles="https://github.com/ful1e5/Bibata_Cursor/archive/refs/tags/v${version}.tar.gz + https://github.com/ful1e5/Bibata_Cursor/releases/download/v${version}/bitmaps.zip>bitmaps.tar.gz" +checksum="1f21e5cade53d668476f973bd8ec827882a0e32c38e0e766abf007f8b3b46313 + 87898034589777e77bfa610ed42e6663a6ba57bb91116d296f800199c1bb9183" + +pre_build() { + mv Bibata_Cursor-${version}/* ./ + rm -rf themes bin Bibata_Cursor-${version} +} + +do_build() { + version="v${version}" + + get_config_path() { + local key="${1}" + local cfg_path="configs" + + if [[ $key == *"Right"* ]]; then + cfg_path="${cfg_path}/right" + else + cfg_path="${cfg_path}/normal" + fi + + echo $cfg_path + } + + with_version() { + local comment="${1}" + echo "$comment ($version)." + } + + if ! type -p ctgen >/dev/null; then + error ctgen + exit 127 # exit program with "command not found" error code + fi + + declare -A names + names["Bibata-Modern-Amber"]=$(with_version "Yellowish and rounded edge Bibata") + names["Bibata-Modern-Amber-Right"]=$(with_version "Yellowish and rounded edge right-hand Bibata") + names["Bibata-Modern-Classic"]=$(with_version "Black and rounded edge Bibata") + names["Bibata-Modern-Classic-Right"]=$(with_version "Black and rounded edge right-hand Bibata") + names["Bibata-Modern-Ice"]=$(with_version "White and rounded edge Bibata") + names["Bibata-Modern-Ice-Right"]=$(with_version "White and rounded edge right-hand Bibata") + names["Bibata-Original-Amber"]=$(with_version "Yellowish and sharp edge Bibata") + names["Bibata-Original-Amber-Right"]=$(with_version "Yellowish and sharp edge right-hand Bibata") + names["Bibata-Original-Classic"]=$(with_version "Black and sharp edge Bibata") + names["Bibata-Original-Classic-Right"]=$(with_version "Black and sharp edge right-hand Bibata") + names["Bibata-Original-Ice"]=$(with_version "White and sharp edge Bibata") + names["Bibata-Original-Ice-Right"]=$(with_version "White and sharp edge right-hand Bibata") + + # Building Bibata XCursor binaries + for key in "${!names[@]}"; do + comment="${names[$key]}" + cfg_path=$(get_config_path "$key") + + ctgen "$cfg_path/x.build.toml" -p x11 -d "bitmaps/$key" -n "$key" -c "$comment XCursors" & + PID=$! + wait $PID + done +} + +do_install() { + vmkdir usr/share/icons + vcopy themes/Bibata-* usr/share/icons +} + +post_install() { + vdoc README.md +} diff --git a/srcpkgs/python3-clickgen/template b/srcpkgs/python3-clickgen/template new file mode 100644 index 00000000000000..7ee2b726c8bf7a --- /dev/null +++ b/srcpkgs/python3-clickgen/template @@ -0,0 +1,19 @@ +# Template file for 'python3-clickgen' +pkgname=python3-clickgen +version=2.2.5 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools python3-wheel" +depends="python3-attrs python3-numpy python3-Pillow python3-toml python3-yaml" +short_desc="Hassle-free cursor building toolbox" +maintainer="zenobit " +license="MIT" +homepage="https://github.com/ful1e5/clickgen" +changelog="https://github.com/ful1e5/clickgen/releases" +distfiles="https://github.com/ful1e5/clickgen/archive/refs/tags/v${version}.tar.gz" +checksum=e76f55eacd66db11d004d2f1a33f42b12d4823d6653e8a288277b045911d51d9 + +post_install() { + vdoc README.md + vlicense LICENSE +}