net-misc/networkmanager: ppc64 stable wrt bug #692932
[gentoo.git] / www-apps / nanoblogger / nanoblogger-3.5_rc1-r1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit bash-completion-r1
7
8 MY_P="${P/_/-}"
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"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~x86"
16
17 RDEPEND="app-shells/bash"
18
19 S="${WORKDIR}/${MY_P}"
20
21 HTML_DOCS=( docs/nanoblogger.html )
22
23 src_prepare() {
24         default
25         sed -i \
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"
30 }
31
32 src_install() {
33         dobin nb
34         insinto /usr/share/nanoblogger
35         doins -r default moods plugins lib lang docs welcome-to-nb.txt
36         insinto /etc
37         doins nb.conf
38         einstalldocs
39         dobashcomp "${FILESDIR}"/nb.bashcomp
40 }
41
42 pkg_postinst() {
43         elog
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;."
46         elog
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."
50         elog
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"'
55         elog
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"
64         elog
65         elog "You also should remove your [newblog_dir]/data/cat_1.db and run:"
66         elog "          nb -u all"
67         elog "after copying your old entries from [oldblog_dir]/data to"
68         elog "[newblog_dir]/data."
69         elog
70 }