1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit bash-completion-r1
8 DESCRIPTION="A CLI-based TODO list manager"
9 HOMEPAGE="http://todotxt.org"
10 SRC_URI="https://github.com/todotxt/${PN}.txt-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14 KEYWORDS="~amd64 ~x86"
16 RESTRICT="!test? ( test )"
18 RDEPEND="app-shells/bash"
20 PATCHES=( "${FILESDIR}/${P}-fix-bash-completion.patch" )
22 DOCS=( README.md CONTRIBUTING.md LICENSE todo.cfg )
24 S="${WORKDIR}/${PN}.txt-cli-${PV}"
30 sed -i -e "s/@DEV_VERSION@/${PV}/" todo.sh || die
32 # TODO_DIR variable is bogus
33 sed -i -e '/export TODO_DIR/d' todo.cfg || die
34 sed -i -e '4i export TODO_DIR="$HOME/.todo"' todo.cfg || die
38 make test || die "tests failed"
43 dosym "${PN}.sh" "/usr/bin/${PN}cli"
44 dosym "${PN}.sh" "/usr/bin/${PN}txt"
45 newbashcomp "${PN}_completion" "${PN}.sh"
46 bashcomp_alias "${PN}.sh" "${PN}cli" "${PN}txt"
52 einfo 'Before starting todo, make sure to create'
53 einfo 'a .todo directory in your home directory:'
54 einfo ' $ mkdir -p $HOME/.todo'
56 einfo 'and make sure to copy the default todo'
57 einfo 'configuration file in the same location:'
58 einfo " $ bzcat /usr/share/doc/${PF}/todo.cfg.bz2 > \$HOME/.todo/config"
60 einfo 'Alternatively, you can use XDG directories instead:'
61 einfo ' $ mkdir -p $HOME/.local/share/todo'
62 einfo ' $ mkdir -p $HOME/.config/todo'
63 einfo " $ bzcat /usr/share/doc/${PF}/todo.cfg.bz2 > \$HOME/.config/todo/config"
65 einfo 'You can then edit this file as you see fit.'