add some post install messages
authorCiaran McCreesh <ciaranm@gentoo.org>
Wed, 28 Sep 2005 19:59:46 +0000 (19:59 +0000)
committerCiaran McCreesh <ciaranm@gentoo.org>
Wed, 28 Sep 2005 19:59:46 +0000 (19:59 +0000)
eclass/vim-spell.eclass

index bd826606a0721ac66fbbdd46f19509335b0dbd55..7448ea2e2f2726e814d1941b5868de2bba41b8bf 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vim-spell.eclass,v 1.2 2005/09/28 19:13:13 ciaranm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vim-spell.eclass,v 1.3 2005/09/28 19:59:46 ciaranm Exp $
 
 #
 # Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
@@ -55,7 +55,9 @@
 # spell files. It's best to let upstream know if you've generated spell files
 # for another language rather than keeping them Gentoo-specific.
 
-EXPORT_FUNCTIONS src_install
+inherit eutils
+
+EXPORT_FUNCTIONS src_install pkg_postinst
 
 IUSE=""
 DEPEND="|| ( >=app-editors/vim-7_alpha
@@ -94,3 +96,24 @@ vim-spell_src_install() {
        [[ -z "${had_spell_file}" ]] && die "Didn't install any spell files?"
 }
 
+vim-spell_pkg_postinst() {
+       target="/usr/share/vim/vimfiles/spell/"
+       echo
+       einfo "To enable ${VIM_SPELL_LANGUAGE} spell checking, use"
+       einfo "    :setlocal spell spelllang=${VIM_SPELL_CODE}"
+       echo
+       einfo "The following (Vim internal, not file) encodings are supported for"
+       einfo "this language:"
+       for f in "${ROOT}/${target}/${VIM_SPELL_CODE}".*.spl ; do
+               enc="${f##*/${VIM_SPELL_CODE}.}"
+               enc="${enc%.spl}"
+               [[ -z "${enc}" ]] && continue
+               einfo "    ${enc}"
+       done
+       echo
+       einfo "For further documentation, use:"
+       einfo "    :help spell"
+       echo
+       epause
+}
+