zsh_5.9.bb 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. SUMMARY = "UNIX Shell similar to the Korn shell"
  2. DESCRIPTION = "Zsh is a shell designed for interactive use, although it is also a \
  3. powerful scripting language. Many of the useful features of bash, \
  4. ksh, and tcsh were incorporated into zsh; many original features were added."
  5. HOMEPAGE = "http://www.zsh.org"
  6. SECTION = "base/shell"
  7. LICENSE = "zsh"
  8. LIC_FILES_CHKSUM = "file://LICENCE;md5=1a4c4cda3e8096d2fd483ff2f4514fec"
  9. DEPENDS = "ncurses bison-native libcap libpcre gdbm groff-native"
  10. SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.xz"
  11. SRC_URI[sha256sum] = "9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5"
  12. inherit autotools gettext update-alternatives manpages
  13. EXTRA_AUTORECONF += "--exclude=aclocal"
  14. EXTRA_OECONF = " \
  15. --bindir=${base_bindir} \
  16. --enable-etcdir=${sysconfdir} \
  17. --enable-fndir=${datadir}/${BPN}/${PV}/functions \
  18. --enable-site-fndir=${datadir}/${BPN}/site-functions \
  19. --with-term-lib='ncursesw ncurses' \
  20. --with-tcsetpgrp \
  21. --enable-cap \
  22. --enable-multibyte \
  23. --disable-gdbm \
  24. --disable-dynamic \
  25. zsh_cv_shared_environ=yes \
  26. "
  27. # Configure respects --bindir from EXTRA_OECONF, but then Src/Makefile will read bindir from environment
  28. export bindir = "${base_bindir}"
  29. EXTRA_OEMAKE = "-e MAKEFLAGS="
  30. ALTERNATIVE:${PN} = "sh"
  31. ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
  32. ALTERNATIVE_TARGET[sh] = "${base_bindir}/${BPN}"
  33. ALTERNATIVE_PRIORITY = "90"
  34. # Needed for manpages.bbclass, but they're always installed
  35. PACKAGECONFIG[manpages] = ""
  36. do_install:append() {
  37. sed -i -e '1!b; s:^#!.*[ /]zsh:#!${bindir}/zsh:; s#/usr/local/bin#${bindir}#;' \
  38. `find ${D}/usr/share/zsh/${PV}/functions -type f`
  39. }
  40. pkg_postinst:${PN} () {
  41. touch $D${sysconfdir}/shells
  42. for i in zsh sh
  43. do
  44. grep -q "bin/$i" $D${sysconfdir}/shells || \
  45. printf >> $D${sysconfdir}/shells \
  46. "${bindir}/$i\n${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/$i\n', '', d)}"
  47. done
  48. }