# Template file for 'darcs'
pkgname=darcs
version=2.18.5
revision=1
build_style=haskell-stack
stackage="lts-23.26"
hostmakedepends="pkg-config unzip"
makedepends="zlib-devel libcurl-devel ncurses-devel"
short_desc="Change-focused cross-platform version control system"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://darcs.net/"
distfiles="http://hackage.haskell.org/package/${pkgname}-${version}/${pkgname}-${version}.tar.gz
 https://hackage.haskell.org/package/basement-0.0.16/basement-0.0.16.tar.gz
 https://hackage.haskell.org/package/memory-0.18.0/memory-0.18.0.tar.gz
 https://hackage.haskell.org/package/cborg-0.2.10.0/cborg-0.2.10.0.tar.gz"
checksum="e310692989e313191824f532a26c5eae712217444214266503d5eb5867f951ab
 7fb77e249aef76ba5aed3059d556800ce02b614597c488ba01f0a16449146300
 fd4eb6f638e24b81b4e6cdd68772a531726f2f67686c8969d3407d82f7862e3e
 17fe070c38fc498cab49bcb9d6215b7747d53bedf96502e9bcce9cad73b9c797"
nopie_files="/usr/bin/darcs"
nocross=yes
skip_extraction="basement-0.0.16.tar.gz memory-0.18.0.tar.gz cborg-0.2.10.0.tar.gz"

post_extract() {
	vsrcextract -C basement basement-0.0.16.tar.gz
	vsrcextract -C memory memory-0.18.0.tar.gz
	vsrcextract -C cborg cborg-0.2.10.0.tar.gz
}

post_install() {
	vinstall contrib/darcs_completion 644 usr/share/bash-completion/completions

	cd .stack-work/dist/*/*/build/darcs
	vman darcs.1
}
