# Template file for 'unison'
pkgname=unison
version=2.53.3
revision=1
hostmakedepends="ocaml"
short_desc="File-synchronization tool"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="GPL-3.0-or-later"
homepage="https://www.cis.upenn.edu/~bcpierce/unison/"
distfiles="https://github.com/bcpierce00/unison/archive/v${version}.tar.gz"
checksum=aaea04fc5bc76dcfe8627683c9659ee4c194d4f992cc8aaa15bbb2820fc8de46
nocross="OCaml does not cross compile"

do_build() {
	CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true
	CFLAGS= make ${makejobs} -C man
}

do_check() {
	mkdir -p ./tmp
	HOME="${PWD}/tmp" TMPDIR="${PWD}/tmp" ./src/unison -selftest
}

do_install() {
	vbin src/unison
	vbin src/unison-fsmonitor
	vman man/unison.1
}
