# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=emacs-plz-see
pkgver=0_git20231101
_gitrev=c55e6aa2971caad582df1d449e0f57604250cae1
pkgrel=0
_pkgreal=plz-see
pkgdesc="Interactive HTTP client based on Emacs-plz"
url="https://github.com/astoff/plz-see.el"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	cmd:emacs
	emacs-plz
	"
makedepends="emacs-nox"
source="https://github.com/astoff/plz-see.el/archive/$_gitrev/emacs-plz-see-$_gitrev.tar.gz"
builddir="$srcdir/plz-see.el-$_gitrev"
options="!check" # no tests provided

build() {
	emacs -batch -q -no-site-file -L . \
		-eval '(setq byte-compile-error-on-warn t)' \
		-f batch-byte-compile \
		./*.el
}

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

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

sha512sums="
21344c9771e1a79a0dc7faf8bdcb29a4a8cfb97ef34105cf4752e69a80b6c18a1d975c2e3ad70124132156e2282a10d100fb506c8bf084d80afffc9f018a8584  emacs-plz-see-c55e6aa2971caad582df1d449e0f57604250cae1.tar.gz
"
