1 |
commit: 418fd8b269aec9a48b349f65087e54f0425b50a8 |
2 |
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 26 20:51:13 2022 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 26 21:03:03 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=418fd8b2 |
7 |
|
8 |
app-misc/todo: update EAPI 7 -> 8 |
9 |
|
10 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
11 |
|
12 |
app-misc/todo/todo-2.12.0-r2.ebuild | 64 +++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 64 insertions(+) |
14 |
|
15 |
diff --git a/app-misc/todo/todo-2.12.0-r2.ebuild b/app-misc/todo/todo-2.12.0-r2.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..0f9cee042d49 |
18 |
--- /dev/null |
19 |
+++ b/app-misc/todo/todo-2.12.0-r2.ebuild |
20 |
@@ -0,0 +1,64 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+inherit bash-completion-r1 |
27 |
+ |
28 |
+DESCRIPTION="A CLI-based TODO list manager" |
29 |
+HOMEPAGE="http://todotxt.org" |
30 |
+SRC_URI="https://github.com/todotxt/${PN}.txt-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
31 |
+ |
32 |
+LICENSE="GPL-3" |
33 |
+SLOT="0" |
34 |
+KEYWORDS="~amd64 ~x86" |
35 |
+IUSE="test" |
36 |
+RESTRICT="!test? ( test )" |
37 |
+ |
38 |
+RDEPEND="app-shells/bash" |
39 |
+ |
40 |
+DOCS=( README.md LICENSE todo.cfg ) |
41 |
+ |
42 |
+S="${WORKDIR}/${PN}.txt-cli-${PV}" |
43 |
+ |
44 |
+src_prepare() { |
45 |
+ default |
46 |
+ |
47 |
+ # fix version string |
48 |
+ sed -i -e "s/@DEV_VERSION@/${PV}/" todo.sh || die |
49 |
+ |
50 |
+ # TODO_DIR variable is bogus |
51 |
+ sed -i -e '/export TODO_DIR/d' todo.cfg || die |
52 |
+ sed -i -e '4i export TODO_DIR="$HOME/.todo"' todo.cfg || die |
53 |
+} |
54 |
+ |
55 |
+src_install() { |
56 |
+ dobin "${PN}.sh" |
57 |
+ newbashcomp "${PN}_completion" "${PN}.sh" |
58 |
+ einstalldocs |
59 |
+} |
60 |
+ |
61 |
+pkg_postinst() { |
62 |
+ einfo |
63 |
+ einfo 'Before starting todo, make sure to create' |
64 |
+ einfo 'a .todo directory in your home directory:' |
65 |
+ einfo ' $ mkdir -p $HOME/.todo' |
66 |
+ einfo |
67 |
+ einfo 'and make sure to copy the default todo' |
68 |
+ einfo 'configuration file in the same location:' |
69 |
+ einfo " $ bzcat /usr/share/doc/${PF}/todo.cfg.bz2 > \$HOME/.todo/config" |
70 |
+ einfo |
71 |
+ einfo 'Alternatively, you can use XDG directories instead:' |
72 |
+ einfo ' $ mkdir -p $HOME/.local/share/todo' |
73 |
+ einfo ' $ mkdir -p $HOME/.config/todo' |
74 |
+ einfo " $ bzcat /usr/share/doc/${PF}/todo.cfg.bz2 > \$HOME/.config/todo/config" |
75 |
+ einfo |
76 |
+ einfo 'You can then edit this file as you see fit.' |
77 |
+ einfo 'Enjoy!' |
78 |
+ einfo |
79 |
+ ewarn 'The Gentoo-specific todocli and todotxt aliases have been removed.' |
80 |
+ ewarn 'If you still need them, add the following lines to your ~/.bashrc:' |
81 |
+ ewarn |
82 |
+ ewarn 'alias todocli=todo.sh' |
83 |
+ ewarn 'complete -F _todo todocli' |
84 |
+} |