summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFerenc Erki <erkiferenc@gmail.com>2020-01-12 20:46:33 +0100
committerPatrice Clement <monsieurp@gentoo.org>2020-03-09 21:45:10 +0100
commit3a09ce336f19caeca26a32ea10913766687f454a (patch)
tree2810efb7490618924fcfaafa030a6344fae2ee61 /app-misc/todo
parentapp-misc/todo: add myself as proxied maintainer. (diff)
downloadgentoo-3a09ce336f19caeca26a32ea10913766687f454a.tar.gz
gentoo-3a09ce336f19caeca26a32ea10913766687f454a.tar.bz2
gentoo-3a09ce336f19caeca26a32ea10913766687f454a.zip
app-misc/todo: bump version to 2.11.0
Closes: https://bugs.gentoo.org/705306 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Ferenc Erki <erkiferenc@gmail.com> Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'app-misc/todo')
-rw-r--r--app-misc/todo/Manifest1
-rw-r--r--app-misc/todo/files/todo-2.11.0-fix-bash-completion.patch15
-rw-r--r--app-misc/todo/todo-2.11.0.ebuild68
3 files changed, 84 insertions, 0 deletions
diff --git a/app-misc/todo/Manifest b/app-misc/todo/Manifest
index 620b2cb65da4..4be1e46c2670 100644
--- a/app-misc/todo/Manifest
+++ b/app-misc/todo/Manifest
@@ -1 +1,2 @@
DIST todo-2.10.tar.gz 56509 BLAKE2B ec89d12506b5025bab8d05bab1122d48ef2e9edb811c4091c1ff96b4b18c2ced54026d3d908a565278804c15c6fbde8aef3ae5a0cb23d4b12bb36133fce5bb2c SHA512 b14d9d13948836d971f72b941770e8e2c59d171d35f074205900619c5c3efd7ca0a482887046c1865890afb6595fe27c69677c54ea5824163d291e16fa5329d3
+DIST todo-2.11.0.tar.gz 712455 BLAKE2B f9d0fa53712a49c2f6ee94c02a62c16b8184734f7bb0c9354db9d640e2f619c75e3b3468065cb51204c7872f1f155bda51b9e3387f62f0f478f80f6a99f199b4 SHA512 5500ed1aa10eceaaa3e5116605eed4f4228337fdc0f2ceaa5b889753a60576918c0953adbfbf80c40008d6dfdf854e8a538103bfed4d1015aa1c5a9876c2e47c
diff --git a/app-misc/todo/files/todo-2.11.0-fix-bash-completion.patch b/app-misc/todo/files/todo-2.11.0-fix-bash-completion.patch
new file mode 100644
index 000000000000..254c454ab8ac
--- /dev/null
+++ b/app-misc/todo/files/todo-2.11.0-fix-bash-completion.patch
@@ -0,0 +1,15 @@
+diff --git a/todo_completion b/todo_completion
+index 644be6e..964383e 100755
+--- a/todo_completion
++++ b/todo_completion
+@@ -85,6 +85,10 @@ _todo()
+ }
+ complete -F _todo todo.sh
+
++# Gentoo bug 614400
++complete -F _todo todocli
++complete -F _todo todotxt
++
+ # If you define an alias (e.g. "t") to todo.sh, you need to explicitly enable
+ # completion for it, too:
+ #complete -F _todo t
diff --git a/app-misc/todo/todo-2.11.0.ebuild b/app-misc/todo/todo-2.11.0.ebuild
new file mode 100644
index 000000000000..4db4b749f060
--- /dev/null
+++ b/app-misc/todo/todo-2.11.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1
+
+DESCRIPTION="A CLI-based TODO list manager"
+HOMEPAGE="http://todotxt.org"
+SRC_URI="https://github.com/todotxt/${PN}.txt-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="app-shells/bash"
+
+PATCHES=( "${FILESDIR}/${P}-fix-bash-completion.patch" )
+
+DOCS=( README.md CONTRIBUTING.md LICENSE todo.cfg )
+
+S="${WORKDIR}/${PN}.txt-cli-${PV}"
+
+src_prepare() {
+ default
+
+ # fix version string
+ sed -i -e "s/@DEV_VERSION@/${PV}/" todo.sh || die
+
+ # TODO_DIR variable is bogus
+ sed -i -e '/export TODO_DIR/d' todo.cfg || die
+ sed -i -e '4i export TODO_DIR="$HOME/.todo"' todo.cfg || die
+}
+
+src_test() {
+ make test || die "tests failed"
+}
+
+src_install() {
+ dobin "${PN}.sh"
+ dosym "${PN}.sh" "/usr/bin/${PN}cli"
+ dosym "${PN}.sh" "/usr/bin/${PN}txt"
+ newbashcomp "${PN}_completion" "${PN}.sh"
+ bashcomp_alias "${PN}.sh" "${PN}cli" "${PN}txt"
+ einstalldocs
+}
+
+pkg_postinst() {
+ einfo
+ einfo 'Before starting todo, make sure to create'
+ einfo 'a .todo directory in your home directory:'
+ einfo ' $ mkdir -p $HOME/.todo'
+ einfo
+ einfo 'and make sure to copy the default todo'
+ einfo 'configuration file in the same location:'
+ einfo " $ bzcat /usr/share/doc/${PF}/todo.cfg.bz2 > \$HOME/.todo/config"
+ einfo
+ einfo 'Alternatively, you can use XDG directories instead:'
+ einfo ' $ mkdir -p $HOME/.local/share/todo'
+ einfo ' $ mkdir -p $HOME/.config/todo'
+ einfo " $ bzcat /usr/share/doc/${PF}/todo.cfg.bz2 > \$HOME/.config/todo/config"
+ einfo
+ einfo 'You can then edit this file as you see fit.'
+ einfo 'Enjoy!'
+ einfo
+}