1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit bash-completion-r1
9 DESCRIPTION="Small and simple weblog engine written in Bash for the command-line"
10 HOMEPAGE="http://nanoblogger.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
15 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~x86"
17 RDEPEND="app-shells/bash"
19 S="${WORKDIR}/${MY_P}"
21 HTML_DOCS=( docs/nanoblogger.html )
26 -e 's|^\(NB_BASE_DIR=\).*$|\1"/usr/share/nanoblogger"|' \
27 -e 's|^\(NB_CFG_DIR=\).*$|\1"/etc"|' \
28 -e "s|\$NB_BASE_DIR.*\(nano.*html\)|/usr/share/doc/${PF}/html/\1|" \
29 nb || die "sed nb failed"
34 insinto /usr/share/nanoblogger
35 doins -r default moods plugins lib lang docs welcome-to-nb.txt
39 dobashcomp "${FILESDIR}"/nb.bashcomp
44 elog "Documentation for getting started with nanoblogger may be found at"
45 elog "/usr/share/doc/${PF}/html/nanoblogger.html or by running 'nb --manual;."
47 elog "To create and configure a new weblog, run the following as your user:"
48 elog " nb -b /some/dir -a"
49 elog "where /some/dir is a directory that DOES NOT exist."
51 elog "To prevent having to specify your blog directory every time you use"
52 elog "nanoblogger (with the -b switch), you can set a default value in your"
53 elog "~/.nb.conf. For example:"
54 elog ' BLOG_DIR="$HOME/public_html/blog"'
56 elog "If you are upgrading nanoblogger from a previous version, follow"
57 elog "these directions (as stated in the manual):"
58 elog " 1. create a new weblog directory using nanoblogger (skip configuration):"
59 elog " nb [-b blog_dir] -a"
60 elog " 2. copy old data directry to new weblog:"
61 elog " cp -r [old_blog_dir]/data [newblog_dir]"
62 elog " 3. edit new blog.conf to your liking and rebuild weblog:"
63 elog " nb [-b blog_dir] --configure -u all"
65 elog "You also should remove your [newblog_dir]/data/cat_1.db and run:"
67 elog "after copying your old entries from [oldblog_dir]/data to"
68 elog "[newblog_dir]/data."