app-text/stardict: documentation fixes
authorAndrew Savchenko <bircoph@gentoo.org>
Sat, 3 Dec 2016 06:51:22 +0000 (09:51 +0300)
committerAndrew Savchenko <bircoph@gentoo.org>
Sat, 3 Dec 2016 16:47:34 +0000 (19:47 +0300)
- install all docs, but omit zero or dummy files;
- install tools docs on demand;
- install examples on demand.

Package-Manager: portage-2.3.2
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
app-text/stardict/stardict-3.0.6-r3.ebuild

index 2ee16b3d25bb49357ee4ce88f8493a8ba4093997..03ccdc0868d1d49a60244cfee535908fcbe01a46 100644 (file)
@@ -21,9 +21,9 @@ SRC_URI="mirror://sourceforge/${PN}-4/${P}.tar.bz2
 LICENSE="CPL-1.0 GPL-3 LGPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="advertisement debug dictdotcn espeak +gucharmap +htmlparse
-man +powerwordparse pronounce qqwry spell tools updateinfo
-+wikiparse +wordnet +xdxfparse"
+IUSE="advertisement debug dictdotcn espeak examples +gucharmap
++htmlparse man +powerwordparse pronounce qqwry spell tools
+updateinfo +wikiparse +wordnet +xdxfparse"
 
 RESTRICT="test"
 
@@ -55,6 +55,9 @@ DEPEND="${COMMON_DEPEND}
        virtual/pkgconfig
 "
 
+# docs are messy, installed manually below
+DOCS=""
+
 src_prepare() {
        # From Fedora
        # Remove unneeded sigc++ header files to make it sure
@@ -101,7 +104,19 @@ src_configure() {
 src_install() {
        gnome2_src_install
 
-       dodoc dict/doc/{Documentation,FAQ,HACKING,HowToCreateDictionary,Skins,StarDictFileFormat,Translation}
+       dodoc AUTHORS ChangeLog README
+
+       docinto dict
+       dodoc dict/{AUTHORS,ChangeLog,README,TODO}
+       dodoc dict/doc/{Documentation,FAQ,HowToCreateDictionary,Skins,StarDictFileFormat,TextualDictionaryFileFormat,Translation}
+
+       docinto lib
+       dodoc lib/{AUTHORS,ChangeLog,README}
+
+       if use examples; then
+               insinto /usr/share/doc/${PF}/dict
+               doins dict/doc/stardict-textual-dict*
+       fi
 
        if use qqwry; then
                insinto /usr/share/${PN}/data
@@ -133,10 +148,14 @@ src_install() {
                for app in ${apps}; do
                        newbin tools/src/${app} ${PN}_${app}
                done
+
+               docinto tools
+               dodoc tools/{AUTHORS,ChangeLog,README}
        fi
 }
 
 pkg_postinst() {
+       elog
        elog "Note: festival text to speech (TTS) plugin is not built. To use festival"
        elog 'TTS plugin, please, emerge festival and enable "Use TTS program." at:'
        elog '"Preferences -> Dictionary -> Sound" and fill in "Commandline" with:'
@@ -144,8 +163,12 @@ pkg_postinst() {
        elog
        elog "You will now need to install ${PN} dictionary files. If"
        elog "you have not, execute the below to get a list of dictionaries:"
-       elog
        elog "  emerge -s ${PN}-"
+       elog
+       elog "Additionally you may install any stardict dictionary from the net"
+       elog "by unpacking it to:"
+       elog "  /usr/share/stardict/dic"
+       elog
 
        gnome2_pkg_postinst
 }