# Maintainer: Chih-Hsuan Yen <yan121215@archlinux.org>
# Contributor: Ye Jingchen <ye.jingchen@gmail.com>

pkgname=capitaine-cursors
pkgver=4
pkgrel=1
pkgdesc="An x-cursor theme inspired by macOS and based on KDE Breeze"
arch=(any)
url="https://github.com/keeferrourke/capitaine-cursors"
license=(LGPL3)
source=("https://github.com/keeferrourke/$pkgname/archive/r$pkgver/$pkgname-$pkgver.tar.gz")
makedepends=(inkscape xorg-xcursorgen bc)
sha256sums=('41f66e9f4d41729dc5e9185aab3bc4a719fdcca939e6f3f590b6b811b28dedd2')

build() {
  cd $pkgname-r$pkgver
  for variant in dark light ; do
    ./build.sh --max-dpi xxxhd --type $variant
  done
}

package() {
  cd $pkgname-r$pkgver
  install -Ddm755 "$pkgdir/usr/share/icons"
  cp -dr --no-preserve=ownership dist/dark/ "$pkgdir/usr/share/icons/capitaine-cursors"
  cp -dr --no-preserve=ownership dist/light/ "$pkgdir/usr/share/icons/capitaine-cursors-light"
}
