1 |
commit: eecc53c409a999b827f8334fb0f8832de6bef34a |
2 |
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 19 08:21:34 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 19 08:22:46 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eecc53c4 |
7 |
|
8 |
app-misc/todo: fix configuration file and display a message in the pkg_postinst phase. |
9 |
|
10 |
Closes: https://bugs.gentoo.org/607946 |
11 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
12 |
|
13 |
app-misc/todo/todo-2.10-r2.ebuild | 58 +++++++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 58 insertions(+) |
15 |
|
16 |
diff --git a/app-misc/todo/todo-2.10-r2.ebuild b/app-misc/todo/todo-2.10-r2.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..6ea3e65d487 |
19 |
--- /dev/null |
20 |
+++ b/app-misc/todo/todo-2.10-r2.ebuild |
21 |
@@ -0,0 +1,58 @@ |
22 |
+# Copyright 1999-2017 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=6 |
26 |
+ |
27 |
+inherit bash-completion-r1 |
28 |
+ |
29 |
+DESCRIPTION="A CLI-based TODO list manager" |
30 |
+HOMEPAGE="http://todotxt.com" |
31 |
+SRC_URI="https://github.com/ginatrapani/${PN}.txt-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
32 |
+ |
33 |
+LICENSE="GPL-3" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~amd64 ~x86" |
36 |
+IUSE="test" |
37 |
+ |
38 |
+RDEPEND="app-shells/bash" |
39 |
+ |
40 |
+PATCHES=( "${FILESDIR}/${P}-fix-bash-completion.patch" ) |
41 |
+ |
42 |
+DOCS=( README.textile CONTRIBUTING.md LICENSE todo.cfg ) |
43 |
+ |
44 |
+S="${WORKDIR}/${PN}.txt-cli-${PV}" |
45 |
+ |
46 |
+src_prepare() { |
47 |
+ default |
48 |
+ |
49 |
+ # TODO_DIR variable is bogus |
50 |
+ sed -i -e '/export TODO_DIR/d' todo.cfg || die |
51 |
+ sed -i -e '4i export TODO_DIR="$HOME/.todo"' todo.cfg || die |
52 |
+} |
53 |
+ |
54 |
+src_test() { |
55 |
+ make test || die "tests failed" |
56 |
+} |
57 |
+ |
58 |
+src_install() { |
59 |
+ newbin "${PN}.sh" "${PN}" |
60 |
+ dosym "${PN}" "/usr/bin/${PN}txt" |
61 |
+ newbashcomp "${PN}_completion" "${PN}.sh" |
62 |
+ bashcomp_alias "${PN}.sh" "${PN}txt" |
63 |
+ einstalldocs |
64 |
+} |
65 |
+ |
66 |
+pkg_postinst() { |
67 |
+ einfo |
68 |
+ einfo 'Before starting todo, make sure to create' |
69 |
+ einfo 'a .todo directory in your home directory:' |
70 |
+ einfo ' $ mkdir -p $HOME/.todo' |
71 |
+ einfo |
72 |
+ einfo 'and make sure to copy the default todo' |
73 |
+ einfo 'configuration file in the same location:' |
74 |
+ einfo " $ bzcat /usr/share/doc/${PF}/todo.cfg.bz2 > \$HOME/.todo/config" |
75 |
+ einfo |
76 |
+ einfo 'You can then edit this file as you see fit.' |
77 |
+ einfo 'Enjoy!' |
78 |
+ einfo |
79 |
+} |