# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=emacs-git-timemachine
pkgver=4.13_git20240427
_gitrev=3780835fcd67c3703ffa768206121851e6895ece
pkgrel=0
_pkgreal=git-timemachine
pkgdesc="Step through Git revisions of a file"
url="https://codeberg.org/pidu/git-timemachine"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	cmd:emacs
	cmd:git
	"
makedepends="emacs-nox"
source="$pkgname-$_gitrev.tar.gz::https://codeberg.org/pidu/git-timemachine/archive/$_gitrev.tar.gz"
builddir="$srcdir/$_pkgreal"
options="!check" # no tests provided

build() {
	emacs -batch -q -no-site-file -L . \
		-f batch-byte-compile \
		./*.el
}

package() {
	install -Dvm644 ./*.el ./*.elc \
		-t "$pkgdir"/usr/share/emacs/site-lisp/

	cd "$pkgdir"/usr/share/emacs/site-lisp
	emacs -batch -q -no-site-file \
		-eval "(loaddefs-generate \".\" \"$_pkgreal-loaddefs.el\")"
}

sha512sums="
84ea57ab5ae40a4a3002d70a4940b43c204e8b62809b690683143499b6a89c19d57c9fba87aaa639b8f5448ef9acae02d6751ea46c03b9ef800657924d3c43e2  emacs-git-timemachine-3780835fcd67c3703ffa768206121851e6895ece.tar.gz
"
