aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-05-26 19:34:53 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-05-26 19:35:39 +0200
commitcdaa392bd5a5eaae0bd59c829288fa7dd634802b (patch)
tree1f6c8efe1889c4f6b0b87fb1a15317b0c2beab77
parentb37e40d814de32be141db4366c744f8b6c91f70f (diff)
downloadaports-cdaa392bd5a5eaae0bd59c829288fa7dd634802b.tar.gz
aports-cdaa392bd5a5eaae0bd59c829288fa7dd634802b.tar.bz2
aports-cdaa392bd5a5eaae0bd59c829288fa7dd634802b.tar.xz
community/todo.txt-cli: fix and improve abuild
-rw-r--r--community/todo.txt-cli/APKBUILD33
-rw-r--r--community/todo.txt-cli/README.alpine8
2 files changed, 22 insertions, 19 deletions
diff --git a/community/todo.txt-cli/APKBUILD b/community/todo.txt-cli/APKBUILD
index 0c3f2e0092..2c1cdac5c5 100644
--- a/community/todo.txt-cli/APKBUILD
+++ b/community/todo.txt-cli/APKBUILD
@@ -1,6 +1,7 @@
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=todo.txt-cli
+_pkgname=${pkgname/-/_}
pkgver=2.11.0
pkgrel=0
pkgdesc="A simple and extensible shell script for managing your todo.txt file."
@@ -8,35 +9,29 @@ url="https://github.com/todotxt/todo.txt-cli"
arch="noarch"
license="GPL-3.0-or-later"
depends="bash"
-subpackages="$pkgname-bash-completion:bashcomp $pkgname-doc"
-source="https://github.com/todotxt/$pkgname/releases/download/v$pkgver/${pkgname/-/_}-$pkgver.tar.gz"
-
-builddir="$srcdir"/${pkgname/-/_}-$pkgver
+subpackages="$pkgname-bash-completion:_bashcomp $pkgname-doc"
+source="https://github.com/todotxt/$pkgname/releases/download/v$pkgver/$_pkgname-$pkgver.tar.gz
+ README.alpine"
+builddir="$srcdir/$_pkgname-$pkgver"
package() {
cd "$builddir"
- install -D -m644 todo.cfg $pkgdir/etc/todo.cfg
- install -D -m755 todo.sh $pkgdir/usr/bin/todo.sh
- mkdir -p "$pkgdir"/usr/share/doc/$pkgname
- cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <<EOF
- To use todo.txt-cli fully:
- -------------------------
- * copy /etc/todo.cfg in ~/.todo/config file
+ install -D -m644 todo.cfg "$pkgdir"/etc/todo.cfg
+ install -D -m755 todo.sh "$pkgdir"/usr/bin/todo.sh
- * alias the command "todo.sh" with "t" by adding to ~/.profile (if ash) or ~/bashrc (if bash):
- alias t='todo.sh'
-EOF
+ install -D -m644 "$srcdir"/README.alpine \
+ "$pkgdir"/usr/share/doc/$pkgname/README.alpine
}
-bashcomp() {
- depends=""
+_bashcomp() {
pkgdesc="Bash completions for $pkgname"
+ depends=""
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
install -Dm644 "$builddir"/todo_completion \
- "$subpkgdir"/usr/share/bash-completion/completions/${pkgname} || return 1
+ "$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}
-
-sha512sums="7c570b6c4ad3db4b894bde66078376cef79c8325c9b0d638b168152a68020638dd4db9a88e386d877d01296bee0a4cde2a14a88229a0aac5653fc94c4cdf064a todo.txt_cli-2.11.0.tar.gz"
+sha512sums="7c570b6c4ad3db4b894bde66078376cef79c8325c9b0d638b168152a68020638dd4db9a88e386d877d01296bee0a4cde2a14a88229a0aac5653fc94c4cdf064a todo.txt_cli-2.11.0.tar.gz
+91c1933cba346d207a5619c3ec51fe6a3b5c256f50d86bdc63debc4d246444cf59f126b49d54be47e2e1623c98312b799a0c183e96de1b22d1bb845cff5dadb3 README.alpine"
diff --git a/community/todo.txt-cli/README.alpine b/community/todo.txt-cli/README.alpine
new file mode 100644
index 0000000000..286400f63a
--- /dev/null
+++ b/community/todo.txt-cli/README.alpine
@@ -0,0 +1,8 @@
+To use todo.txt-cli fully:
+--------------------------
+
+* copy /etc/todo.cfg in ~/.todo/config file
+
+* alias the command "todo.sh" with "t" by adding to ~/.profile (if ash) or ~/bashrc (if bash):
+
+ alias t='todo.sh'