# Maintainer: Jia Yin<yenfeng.shetiko at gmail dot com>

pkgname=sddm-minesddm-theme-git
pkgver=v2.1.0.r5.gfb750a9
pkgrel=1
pkgdesc='A Minecraft themed SDDM.'
arch=('any')
url="https://github.com/Davi-S/sddm-theme-minesddm"
license=('AGPL-3.0-only')
depends=('sddm' 'qt5-quickcontrols2' 'layer-shell-qt')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url")
sha512sums=('SKIP')
pkgver() {
  cd "$pkgname"
  git describe --long --abbrev=7 --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
  # Thanks to zephyrdrh <zephyrdrh at gmx dot de> for providing the method.
  cd "$pkgname"
  find minesddm -type f -exec install -Dm 644 "{}" "$pkgdir/usr/share/sddm/themes/{}" \;
}
