diff options
author | Adrian Perez de Castro | 2020-09-04 00:50:57 +0300 |
---|---|---|
committer | Adrian Perez de Castro | 2020-09-04 01:10:37 +0300 |
commit | 78af83d052c7b17cb97116e2065870381e7e0a1c (patch) | |
tree | c854a7cb06162ea2665311d6484dfe21ad844e16 | |
download | aur-78af83d052c7b17cb97116e2065870381e7e0a1c.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | build.patch | 35 |
4 files changed, 151 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b56f20054934 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = xcursor-cz-viator + pkgver = 20200713 + pkgrel = 1 + url = https://github.com/charakterziffer/cursor-toolbox + arch = any + license = GPL3 + makedepends = inkscape + makedepends = xorg-xcursorgen + makedepends = python2 + makedepends = patch + source = xcursor-cz-viator-20200713::git+https://github.com/charakterziffer/cursor-toolbox#commit=fb8f37fa75fbae9df22a8976432214a46b77ce1e + source = build.patch + sha512sums = SKIP + sha512sums = f49a595211dd9207dfae371b2b24b55a3500c26e5e5c63c7f1f6efc286333bfd14bd4b6e03dfeb526af4584bdce5d574402fdd8c3ab50019256fa980761961b3 + +pkgname = xcursor-cz-viator-hourglass-white + +pkgname = xcursor-cz-viator-hourglass-black + +pkgname = xcursor-cz-viator-ring-white + +pkgname = xcursor-cz-viator-ring-black + +pkgname = xcursor-cz-viator-rotor-white + +pkgname = xcursor-cz-viator-rotor-black + +pkgname = xcursor-cz-viator-windmill-white + +pkgname = xcursor-cz-viator-windmill-black + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..cf38c0be5848 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!/PKGBUILD +!/.SRCINFO +!/.gitignore +!/build.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..95b893522263 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,80 @@ +# Maintainer: Adrian Perez de Castro <aperez@igalia.com> +pkgdesc='' +pkgbase=xcursor-cz-viator +pkgname=(xcursor-cz-viator-{hourglass,ring,rotor,windmill}-{white,black}) +pkgver=20200713 +pkgrel=1 +_commit=fb8f37fa75fbae9df22a8976432214a46b77ce1e +license=(GPL3) +url=https://github.com/charakterziffer/cursor-toolbox +arch=(any) +makedepends=(inkscape xorg-xcursorgen python2 patch) +depends=() +source=("${pkgbase}-${pkgver}::git+${url}#commit=${_commit}" build.patch) +sha512sums=('SKIP' + 'f49a595211dd9207dfae371b2b24b55a3500c26e5e5c63c7f1f6efc286333bfd14bd4b6e03dfeb526af4584bdce5d574402fdd8c3ab50019256fa980761961b3') + +prepare () { + cd "${pkgbase}-${pkgver}" + patch -p1 < "${srcdir}/build.patch" +} + +build () { + cd "${pkgbase}-${pkgver}" + local spinner color suffix + + for color in white black ; do + if [[ ${color} = white ]] ; then + suffix='' + else + suffix='-black' + fi + + msg2 "Rendering color: ${color}" + python2 render-pngs.py "svgs/template${suffix}.svg" + + for spinner in hourglass ring rotor windmill ; do + msg2 "Rendering variant: ${spinner} ${color}" + python2 render-pngs.py "svgs/spinner-${spinner}${suffix}.svg" + + themetitle="cz-Viator-${spinner}-${color}" ./make.sh + done + done +} + +_package () { + install -dm755 "${pkgdir}/usr/share/icons" + cp -a "${pkgbase}-${pkgver}/cz-Viator-$1-$2" "${pkgdir}/usr/share/icons/" +} + +package_xcursor-cz-viator-hourglass-white () { + _package hourglass white +} + +package_xcursor-cz-viator-hourglass-black () { + _package hourglass black +} + +package_xcursor-cz-viator-ring-white () { + _package ring white +} + +package_xcursor-cz-viator-ring-black () { + _package ring black +} + +package_xcursor-cz-viator-rotor-white () { + _package rotor white +} + +package_xcursor-cz-viator-rotor-black () { + _package rotor black +} + +package_xcursor-cz-viator-windmill-white () { + _package windmill white +} + +package_xcursor-cz-viator-windmill-black () { + _package windmill black +} diff --git a/build.patch b/build.patch new file mode 100644 index 000000000000..04d185a1df16 --- /dev/null +++ b/build.patch @@ -0,0 +1,35 @@ +diff --git a/make.sh b/make.sh +index c9bfebc..3e76e8d 100755 +--- a/make.sh ++++ b/make.sh +@@ -3,7 +3,7 @@ + # Copyright (C) 2018 Gerhard Großmann + + # Set the name of your cursor theme +-themetitle='My Cursor Theme' ++: ${themetitle:='My Cursor Theme'} + + + # For the folder name: Replace forbidden charakters with “-” +diff --git a/render-pngs.py b/render-pngs.py +index 0e19b8c..f99f7b6 100755 +--- a/render-pngs.py ++++ b/render-pngs.py +@@ -65,14 +65,14 @@ class SVGRect: + dbg("New SVGRect: (%s)" % name) + + def renderFromSVG(self, svgFName, sliceFName): +- rc = os.system('inkscape --without-gui --export-id="%s" --export-filename="pngs/24/%s" --export-type=png "%s"' % (self.name, sliceFName, svgFName)) ++ rc = os.system('inkscape --export-id="%s" --export-filename="pngs/24/%s" --export-type=png "%s"' % (self.name, sliceFName, svgFName)) + if rc > 0: + fatalError('ABORTING: Inkscape failed to render the slice.') + + # Not only render 24x4 PNGs, but also 32x32 and 48x48 + +- rc = os.system('inkscape --export-type=png -w 32 -h 32 --without-gui --export-id="%s" --export-filename="pngs/32/%s" "%s"' % (self.name, sliceFName, svgFName)) +- rc = os.system('inkscape --export-type=png -w 48 -h 48 --without-gui --export-id="%s" --export-filename="pngs/48/%s" "%s"' % (self.name, sliceFName, svgFName)) ++ rc = os.system('inkscape --export-type=png -w 32 -h 32 --export-id="%s" --export-filename="pngs/32/%s" "%s"' % (self.name, sliceFName, svgFName)) ++ rc = os.system('inkscape --export-type=png -w 48 -h 48 --export-id="%s" --export-filename="pngs/48/%s" "%s"' % (self.name, sliceFName, svgFName)) + + class SVGHandler(handler.ContentHandler): + """Base class for SVG parsers""" |