summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2017-10-19 10:21:34 +0200
committerPatrice Clement <monsieurp@gentoo.org>2017-10-19 10:22:46 +0200
commiteecc53c409a999b827f8334fb0f8832de6bef34a (patch)
treecc8e889525b0522c026e4b6784f11ae5a2405892
parentdev-python/cffi: version bump to 1.11.2 (diff)
downloadgentoo-eecc53c409a999b827f8334fb0f8832de6bef34a.tar.gz
gentoo-eecc53c409a999b827f8334fb0f8832de6bef34a.tar.bz2
gentoo-eecc53c409a999b827f8334fb0f8832de6bef34a.zip
app-misc/todo: fix configuration file and display a message in the pkg_postinst phase.
Closes: https://bugs.gentoo.org/607946 Package-Manager: Portage-2.3.8, Repoman-2.3.3
-rw-r--r--app-misc/todo/todo-2.10-r2.ebuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/app-misc/todo/todo-2.10-r2.ebuild b/app-misc/todo/todo-2.10-r2.ebuild
new file mode 100644
index 000000000000..6ea3e65d4871
--- /dev/null
+++ b/app-misc/todo/todo-2.10-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1
+
+DESCRIPTION="A CLI-based TODO list manager"
+HOMEPAGE="http://todotxt.com"
+SRC_URI="https://github.com/ginatrapani/${PN}.txt-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="app-shells/bash"
+
+PATCHES=( "${FILESDIR}/${P}-fix-bash-completion.patch" )
+
+DOCS=( README.textile CONTRIBUTING.md LICENSE todo.cfg )
+
+S="${WORKDIR}/${PN}.txt-cli-${PV}"
+
+src_prepare() {
+ default
+
+ # 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() {
+ newbin "${PN}.sh" "${PN}"
+ dosym "${PN}" "/usr/bin/${PN}txt"
+ newbashcomp "${PN}_completion" "${PN}.sh"
+ bashcomp_alias "${PN}.sh" "${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 'You can then edit this file as you see fit.'
+ einfo 'Enjoy!'
+ einfo
+}