nanoblogger-3.3.ebuild 2.1 KB

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