nanoblogger-3.5_rc1.ebuild 2.2 KB

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