# Template file for 'Dwarf-Therapist'
#
# MUST BE BUMPED TOGETHER WITH "dwarffortress" TO A SUPPORTED DF RELEASE

pkgname=Dwarf-Therapist
version=42.1.21
revision=1
build_style=cmake
makedepends="qt5-declarative-devel libcap-devel hicolor-icon-theme"
depends="dwarffortress"
short_desc="Management tool designed to run side-by-side with Dwarf Fortress"
maintainer="Rutpiv <roger_freitas@live.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/Dwarf-Therapist/Dwarf-Therapist/"
distfiles="https://github.com/Dwarf-Therapist/Dwarf-Therapist/archive/v${version}.tar.gz"
checksum=654a3eedb805ec796440da2af9939960a77e20f6cb6fcc15f3d580db50a31bcb
make_check=no # No tests available.

post_build() {
	vsed -i dist/xdg/applications/dwarftherapist.desktop \
			 -e 's|^Exec=dwarftherapist$|Exec=ptrace_cap_wrapper dwarftherapist|'
}

post_install() {
	vbin dist/ptrace_scope/patch_df_ptracer
	vbin dist/ptrace_scope/ptrace_cap_wrapper
}
