# Description: Powerful task manager for the command-line 
# URL: https://taskwarrior.org/
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: rust util-linux

name=task
version=3.0.2
release=1
source=(https://github.com/GothenburgBitFactory/taskwarrior/releases/download/v$version/$name-$version.tar.gz)

build() {

	sed '/integration-tests/d' -i $name-$version/Cargo.toml

	cmake -S $name-$version -B build \
		-D CMAKE_BUILD_TYPE=release \
		-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
		-D CMAKE_INSTALL_PREFIX=/usr \
		-D TASK_DOCDIR=share/task

	cmake --build build -j ${JOBS:-1}
	DESTDIR=$PKG cmake --install build

	prt-get isinst zsh || rm -r $PKG/usr/share/zsh
	rm $PKG/usr/share/task/{AUTHORS,COPYING,ChangeLog,README.md,INSTALL,LICENSE}
	rm $PKG/usr/share/task/scripts/{add-ons,vim,hooks}/README
}