aspell-dict.eclass 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # @DEAD
  4. # Removal on 2017-05-01.
  5. # @ECLASS: aspell-dict.eclass
  6. # @MAINTAINER:
  7. # maintainer-needed@gentoo.org
  8. # @AUTHOR:
  9. # Original author: Seemant Kulleen
  10. # @BLURB: An eclass to streamline the construction of ebuilds for new aspell dicts
  11. # @DESCRIPTION:
  12. # The aspell-dict eclass is designed to streamline the construction of
  13. # ebuilds for the new aspell dictionaries (from gnu.org) which support
  14. # aspell-0.50. Support for aspell-0.60 has been added by Sergey Ulanov.
  15. # @ECLASS-VARIABLE: ASPELL_LANG
  16. # @REQUIRED
  17. # @DESCRIPTION:
  18. # Which language is the dictionary for? It's used for the DESCRIPTION of the
  19. # package.
  20. # @ECLASS-VARIABLE: ASPOSTFIX
  21. # @REQUIRED
  22. # @DESCRIPTION:
  23. # What major version of aspell is this dictionary for?
  24. case ${EAPI} in
  25. 0|1) EXPORT_FUNCTIONS src_compile src_install ;;
  26. *) EXPORT_FUNCTIONS src_configure src_compile src_install ;;
  27. esac
  28. #MY_P=${PN}-${PV%.*}-${PV#*.*.}
  29. MY_P=${P%.*}-${PV##*.}
  30. MY_P=aspell${ASPOSTFIX}-${MY_P/aspell-/}
  31. SPELLANG=${PN/aspell-/}
  32. S="${WORKDIR}/${MY_P}"
  33. DESCRIPTION="${ASPELL_LANG} language dictionary for aspell"
  34. HOMEPAGE="http://aspell.net"
  35. SRC_URI="mirror://gnu/aspell/dict/${SPELLANG}/${MY_P}.tar.bz2"
  36. IUSE=""
  37. SLOT="0"
  38. if [ x${ASPOSTFIX} = x6 ] ; then
  39. RDEPEND=">=app-text/aspell-0.60"
  40. DEPEND="${RDEPEND}"
  41. else
  42. RDEPEND=">=app-text/aspell-0.50"
  43. DEPEND="${RDEPEND}"
  44. fi
  45. # @FUNCTION: aspell-dict_src_configure
  46. # @DESCRIPTION:
  47. # The aspell-dict src_configure function which is exported.
  48. aspell-dict_src_configure() {
  49. ./configure || die
  50. }
  51. # @FUNCTION: aspell-dict_src_compile
  52. # @DESCRIPTION:
  53. # The aspell-dict src_compile function which is exported.
  54. aspell-dict_src_compile() {
  55. case ${EAPI} in
  56. 0|1) aspell-dict_src_configure ;;
  57. esac
  58. emake || die
  59. }
  60. # @FUNCTION: aspell-dict_src_install
  61. # @DESCRIPTION:
  62. # The aspell-dict src_install function which is exported.
  63. aspell-dict_src_install() {
  64. make DESTDIR="${D}" install || die
  65. for doc in README info ; do
  66. [ -s "$doc" ] && dodoc $doc
  67. done
  68. }