aports/testing/task3/APKBUILD
Celeste bff3a068af testing/task3: add cargo fetch & use system corrosion
corrosion 0.5.0 fixes build with rust 1.79.0
2024-06-21 10:35:05 +00:00

80 lines
3.0 KiB
Plaintext

# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=task3
pkgver=3.0.2
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
gnutls-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 arcbive 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
TestCMakeLists.txt
0001-atomic-timestamp-32bit.patch
0002-enable-tests.patch
0003-use-newer-ring.patch
0004-use-system-corrosion.patch
0005-rust-1.79.0-compat.patch
"
builddir="$srcdir"/task-$pkgver
prepare() {
default_prepare
cp -r "$srcdir"/taskwarrior-$pkgver/test "$builddir"/
# TestCMakeLists.txt should be unneeded in future release >3.0.2
cp -r "$srcdir"/TestCMakeLists.txt "$builddir"/test/CMakeLists.txt
cargo fetch --target="$CTARGET" --locked
}
build() {
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
}
check() {
cmake --build build --target build_tests
# Future release >3.0.2 will use: ctest --test-dir build
cd build/test && ./run_all --verbose
}
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="
a96efe55a266640d65895799618a1abc4fe701e7281ca6075fb205c0e720f522237d7f40f67f587a8a1cdfe629cd074f310c33c37f856232a05f451302a47ed4 task-3.0.2.tar.gz
c01bedbf4593abd9dd7716fefb3a8e761e62fd8677acfa239e7cd249067c8c23677a523b1c320e85de7076b400cb5ce351fa6d4330e46b0f6246b8f099ece93b task-archive-3.0.2.tar.gz
a1027c8bcf2baa25604b0a052185418c047dc3008ba445d689cfb214910e73e820170b2a3531457cefdf2f3bf276309612cf4078bd67d30fb558184bcb4ac8ce TestCMakeLists.txt
4fefd76c0933a519a2419a06c7f7466b8ed7b08b99097f32cf255d3f2a849114dc11f1cec519f98a9af5eb67ab992cd3ce6e8abf90737201c4adbf4a232c0f40 0001-atomic-timestamp-32bit.patch
5648d3666916e2286f9ec49ff770f5d9faaa0c7fc256a79ef2101d5e7637a416e0d8bcfdf70afef84857897b6ee50b37d245132fba80b5da1dba35d4fa69195e 0002-enable-tests.patch
38748b6b00b284d603c22432054cc68d3d6d55f7ba5065ab16bc960e6cdb2213293453c2856a713f7c192eadd129da9d0af227075dc47e19cfe166925a368367 0003-use-newer-ring.patch
f27673ef30d660db34bac819679aa956059723cade6b0c22b6db0b9b72578bf2aa87e061771560398b003d1cd4e0f88d64174a30a95a9117a7a82d13e43e6b3f 0004-use-system-corrosion.patch
fe54830d9e847283d42a2441fc1e9804bce81adcdb60cb9d5b92d32cced48e5d1f554979d6b7be70b220493177770ed6a740e63b08412b0ba26c7ab8799ca730 0005-rust-1.79.0-compat.patch
"