# Maintainer: Eshan Roy <eshan@snigdhaos.org>

pkgname=('snigdhaos-grub-theme')
org=Snigdha-OS
branch=master
pkgver=r4.ddadd07
pkgrel=1
pkgdesc='Grub Theme For Snigdha OS'
arch=('any')
url="https://github.com/$org/$pkgname"
license=('GPL')
makedepends=('git')
source=("grub-theme::git+$url.git")
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}"/grub-theme || exit
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
	depends=('grub')
	install=$pkgname.install
	provides=('snigdhaos-grub-theme')
	cd grub-theme/snigdhaos-live || exit
	sed -i -e 's,.*text = "Welcome to Snigdha OS".*,#text = "Welcome to Snigdha OS",' theme.txt #remove welcome message
	find . -type f -exec install -D -m644 {} "${pkgdir}"/usr/share/grub/themes/snigdhaos-grub-theme/{} \;
}
