miscfiles-1.5-r1.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="3"
  4. UNI_PV=6.1.0
  5. DESCRIPTION="Miscellaneous files"
  6. HOMEPAGE="https://savannah.gnu.org/projects/miscfiles/"
  7. # http://www.unicode.org/Public/${UNI_PV}/ucd/UnicodeData.txt
  8. SRC_URI="mirror://gnu/miscfiles/${P}.tar.gz
  9. mirror://gentoo/UnicodeData-${UNI_PV}.txt.xz"
  10. LICENSE="GPL-2 unicode"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris"
  13. IUSE="minimal"
  14. # Collides with older versions/revisions
  15. RDEPEND="!<sys-freebsd/freebsd-share-7.2-r1"
  16. DEPEND="app-arch/xz-utils"
  17. src_prepare() {
  18. mv "${WORKDIR}"/UnicodeData-${UNI_PV}.txt unicode || die
  19. }
  20. src_configure() {
  21. econf --datadir="${EPREFIX}"/usr/share/misc
  22. }
  23. src_install() {
  24. emake install DESTDIR="${D}" || die
  25. dodoc NEWS ORIGIN README dict-README
  26. # not sure if this is still needed ...
  27. dodir /usr/share/dict
  28. cd "${ED}"/usr/share/misc
  29. mv $(awk '$1=="dictfiles"{$1="";$2="";print}' "${S}"/Makefile) ../dict/ || die
  30. cd ../dict
  31. ln -s web2 words || die
  32. ln -s web2a extra.words || die
  33. if use minimal ; then
  34. cd "${ED}"/usr/share/dict
  35. rm -f words extra.words
  36. gzip -9 *
  37. ln -s web2.gz words
  38. ln -s web2a.gz extra.words
  39. ln -s connectives{.gz,}
  40. ln -s propernames{.gz,}
  41. cd ..
  42. rm -r misc rfc
  43. fi
  44. }
  45. pkg_postinst() {
  46. if [[ ${ROOT} == "/" ]] && type -P create-cracklib-dict >/dev/null ; then
  47. ebegin "Regenerating cracklib dictionary"
  48. create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null
  49. eend $?
  50. fi
  51. }