You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.7 KiB

  1. #
  2. # Copyright (C) 2013-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=zsh
  9. PKG_VERSION:=5.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@SF/zsh
  13. PKG_MD5SUM:=afe96fde08b70e23c1cab1ca7a68fb34
  14. PKG_MAINTAINER:=Vadim A. Misbakh-Soloviov <openwrt-zsh@mva.name>
  15. PKG_LICENSE:=ZSH
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/zsh
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. SUBMENU:=Shells
  22. TITLE:=The Z shell
  23. DEPENDS:=+libncurses +libncursesw +libpcre +librt
  24. URL:=http://www.zsh.org/
  25. endef
  26. define Package/zsh/description
  27. Zsh is a UNIX command interpreter (shell) usable as an interactive
  28. login shell and as a shell script command processor. Of the standard
  29. shells, zsh most closely resembles ksh but includes many enhancements.
  30. Zsh has command line editing, builtin spelling correction, programmable
  31. command completion, shell functions (with autoloading), a history
  32. mechanism, and a host of other features.
  33. endef
  34. define Build/Configure
  35. $(call Build/Configure/Default, \
  36. --bindir=/bin \
  37. --disable-etcdir \
  38. --disable-gdbm \
  39. --enable-pcre \
  40. --enable-multibyte \
  41. --enable-function-subdirs \
  42. --with-tcsetpgrp \
  43. --with-term-lib="ncursesw", \
  44. zsh_cv_sys_nis=no \
  45. zsh_cv_sys_nis_plus=no \
  46. )
  47. # Do not install these functions:
  48. $(SED) 's, Completion/AIX/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  49. $(SED) 's, Completion/BSD/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  50. $(SED) 's, Completion/Cygwin/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  51. $(SED) 's, Completion/Darwin/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  52. $(SED) 's, Completion/Debian/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  53. $(SED) 's, Completion/Mandriva/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  54. $(SED) 's, Completion/Redhat/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  55. $(SED) 's, Completion/Solaris/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  56. $(SED) 's, Completion/X/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  57. $(SED) 's, Completion/openSUSE/\*/\*,,g' $(PKG_BUILD_DIR)/config.modules
  58. # After mucking with 'config.modules', one must call
  59. $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" prep
  60. endef
  61. define Package/zsh/postinst
  62. #!/bin/sh
  63. grep zsh $${IPKG_INSTROOT}/etc/shells || \
  64. echo "/bin/zsh" >> $${IPKG_INSTROOT}/etc/shells
  65. endef
  66. define Package/zsh/install
  67. $(INSTALL_DIR) $(1)/bin
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/zsh $(1)/bin/
  69. $(INSTALL_DIR) $(1)/usr/share/zsh/$(PKG_VERSION)
  70. $(CP) $(PKG_INSTALL_DIR)/usr/share/zsh/$(PKG_VERSION)/* $(1)/usr/share/zsh/$(PKG_VERSION)/
  71. endef
  72. $(eval $(call BuildPackage,zsh))