75 lines
2.0 KiB
Plaintext

# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: mio <miyopan@e.email>
maintainer="mio <miyopan@e.email>"
pkgname=task3
pkgver=3.4.0
pkgrel=0
pkgdesc="Command-line to-do list manager"
url="https://taskwarrior.org"
arch="all"
license="MIT"
install="$pkgname.post-install"
makedepends="
cargo
cmake
corrosion
sqlite-dev
util-linux-dev
"
checkdepends="bash python3"
subpackages="$pkgname-doc
$pkgname-bash-completion
$pkgname-fish-completion
$pkgname-zsh-completion
"
# Release tarball excludes the test suite, extract from the archive tarball
source="https://github.com/GothenburgBitFactory/taskwarrior/releases/download/v$pkgver/task-$pkgver.tar.gz
https://github.com/GothenburgBitFactory/taskwarrior/archive/v$pkgver/task-archive-$pkgver.tar.gz
"
builddir="$srcdir"/task-$pkgver
prepare() {
default_prepare
cp -r "$srcdir"/taskwarrior-$pkgver/test "$builddir"/
cargo fetch --target="$CTARGET" --locked
}
build() {
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSYSTEM_CORROSION=ON
cmake --build build
if want_check; then
cmake --build build --target test_runner --target task_executable
fi
}
check() {
# 3.3.0: abbreviation failed on CI, delete failed on builder
case "$CARCH" in
armhf|armv7|x86) ctest --test-dir build -E "abbreviation.test.py";;
loongarch64) ctest --test-dir build -E "delete.test.py";;
*) ctest --test-dir build;;
esac
}
package() {
DESTDIR="$pkgdir" cmake --install build
install -Dm644 scripts/bash/task.sh \
"$pkgdir"/usr/share/bash-completion/completions/task
install -Dm644 scripts/fish/task.fish \
"$pkgdir"/usr/share/fish/vendor_completions.d/task.fish
install -Dm644 scripts/zsh/_task \
"$pkgdir"/usr/share/zsh/site-functions/_task
}
sha512sums="
de14bddc910d92bb60c38550a22eef4e21b92bb63861bee0c84adc2f70a6e5fead06b7993ed3239d2308803dbec3139f57031655bb63821d61528dbcfd49a84e task-3.4.0.tar.gz
3477913affc8abe2b5f51a0be047e375506db02b1fa31c50f1433d1f43e76f573d196dc7e176eb4f5849db2152a66a4a2cd7abf6a28af526e4f8f85fa95da6c4 task-archive-3.4.0.tar.gz
"