aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Polański <michal@polanski.me>2020-01-21 20:07:46 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-01-21 23:50:05 +0100
commita83b742f7efc57a05c370ca3e1e91fb822904fef (patch)
tree524555d2b1ffc3d15c98786e45782eb657676a6d
parent6931ef423015f3d79ee7c5e7d735b7ee51760466 (diff)
downloadaports-a83b742f7efc57a05c370ca3e1e91fb822904fef.tar.bz2
aports-a83b742f7efc57a05c370ca3e1e91fb822904fef.tar.xz
main/task: modernize
- add shell completion subpackages - use RelWithDebInfo build type - update url to https - simplify package
-rw-r--r--main/task/APKBUILD73
1 files changed, 41 insertions, 32 deletions
diff --git a/main/task/APKBUILD b/main/task/APKBUILD
index e43004d9a7..03bee6af7b 100644
--- a/main/task/APKBUILD
+++ b/main/task/APKBUILD
@@ -1,48 +1,57 @@
+# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=task
pkgver=2.5.1
-pkgrel=0
-pkgdesc="A command-line to do list manager"
-url="http://taskwarrior.org"
+pkgrel=1
+pkgdesc="A command-line to-do list manager"
+url="https://taskwarrior.org"
arch="all"
license="MIT"
-depends=""
-depends_dev=""
-makedepends="$depends_dev cmake gnutls-dev util-linux-dev"
-install=""
-subpackages="$pkgname-doc"
+makedepends="cmake gnutls-dev util-linux-dev"
+subpackages="$pkgname-doc
+ $pkgname-bash-completion:bashcomp:noarch
+ $pkgname-fish-completion:fishcomp:noarch
+ $pkgname-zsh-completion:zshcomp:noarch"
source="https://taskwarrior.org/download/task-$pkgver.tar.gz
- musl-fix.patch
- "
-
-_builddir="$srcdir"/task-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+ musl-fix.patch"
build() {
- cd "$_builddir"
cmake . \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- || return 1
- make || return 1
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
}
package() {
- cd "$_builddir"
- make install DESTDIR="$pkgdir"
+ make DESTDIR="$pkgdir" install
+}
+
+bashcomp() {
+ pkgdesc="Bash completions for $pkgname"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ install -Dm644 "$builddir"/scripts/bash/$pkgname.sh \
+ "$subpkgdir"/usr/share/bash-completion/completions/$pkgname
+}
+
+fishcomp() {
+ pkgdesc="Fish completions for $pkgname"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel fish"
+
+ install -Dm644 "$builddir"/scripts/fish/$pkgname.fish \
+ "$subpkgdir"/usr/share/fish/completions/$pkgname.fish
+}
+
+zshcomp() {
+ pkgdesc="Zsh completions for $pkgname"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel zsh"
+
+ install -Dm644 "$builddir"/scripts/zsh/_$pkgname \
+ "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
}
-md5sums="bcd984a00d6d1eb6b40faf567419f784 task-2.5.1.tar.gz
-b26dba3e7e248ec8c22d820bc7b269c4 musl-fix.patch"
-sha256sums="d87bcee58106eb8a79b850e9abc153d98b79e00d50eade0d63917154984f2a15 task-2.5.1.tar.gz
-49b486a30c18660bb6b2544e920f0015db81a8cebee1bc22a3684ada2c0430ab musl-fix.patch"
sha512sums="ec17e5cefff55ecd2c1cb717801c02683d94030906c8d86450c3c79c0bc5a18d82559a5e9e26a91411a1025a241b78ddbc1de51cafc1a2dd531e8229e5e61c10 task-2.5.1.tar.gz
f82f9883ef6c885635890453fbb5c1dc4d4bf4b69926962a643bcaeadeb80874200329c3916b9796d26fd5f28eb9ad20f50fe7e4adc9f9ca635aa4b50be81911 musl-fix.patch"