# Maintainer: Valeria Fadeeva <valeria@fadeeva.me>

_gitname="$(basename $(pwd))"
pkgname=("melawy-$_gitname")
pkgver=1.1
pkgrel=1
pkgdesc="$(head -n 2 README.md | tail -n 1)"
url="https://github.com/Melawy/$_gitname"
arch=("any")
license=("AGPL3")
depends=()
optdepends=()
makedepends=("git")
options=("!strip")
backup=()
provides=("${pkgname}")
conflicts=("${pkgname}")
source=("git+$url.git")
sha256sums=("SKIP")
validpgpkeys=('95F48000540A4DB146583A47C49B5E77FD80302D')

# pkgver() {
#   cd "$srcdir/Melawy-icon-theme"
#   git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
# }

# pkgver() {
# 	cd "$srcdir/$_gitname"
# 	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
# }

pkgver() {
	cd "$srcdir/$_gitname"
	printf "1.%s" "$(git rev-list --count HEAD)"
}

package() {
  install -d "$pkgdir/usr/share/icons"
  cp -r "$srcdir/$_gitname/Melawy-$_gitname" "$pkgdir/usr/share/icons/"
}
