2 # Copyright (C) 2013-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=@SF
/zsh
16 PKG_HASH
:=957bcdb2c57f64c02f673693ea5a7518ef24b6557aeb3a4ce222cefa6d74acc9
17 PKG_MAINTAINER
:=Vadim A. Misbakh-Soloviov
<openwrt-zsh@mva.name
>
22 include $(INCLUDE_DIR
)/package.mk
29 DEPENDS
:=+libncurses
+libncursesw
+libpcre
+librt
30 URL
:=http
://www.zsh.org
/
33 define Package
/zsh
/description
34 Zsh is a UNIX command interpreter
(shell) usable
as an interactive
35 login
shell and
as a
shell script command processor. Of the standard
36 shells
, zsh most closely resembles ksh but includes many enhancements.
37 Zsh has command line editing
, builtin spelling correction
, programmable
38 command completion
, shell functions
(with autoloading
), a history
39 mechanism
, and a host of other features.
42 define Build
/Configure
43 $(call Build
/Configure
/Default
, \
52 --enable-runhelpdir
=$(CONFIGURE_PREFIX
)/share
/zsh
/$(PKG_VERSION
)/help \
53 --enable-fndir
=$(CONFIGURE_PREFIX
)/share
/zsh
/$(PKG_VERSION
)/functions \
54 --enable-site-fndir
=$(CONFIGURE_PREFIX
)/share
/zsh
/site-functions \
55 --enable-function-subdirs \
57 --with-term-lib
="ncursesw", \
58 zsh_cv_shared_environ
=yes \
59 zsh_cv_sys_dynamic_clash_ok
=yes\
60 zsh_cv_sys_dynamic_execsyms
=yes \
61 zsh_cv_sys_dynamic_rtld_global
=yes \
62 zsh_cv_sys_dynamic_strip_exe
=yes \
63 zsh_cv_sys_dynamic_strip_lib
=yes \
65 zsh_cv_sys_nis_plus
=no \
67 # Do not install these functions:
68 $(SED
) 's, Completion/AIX/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
69 $(SED
) 's, Completion/BSD/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
70 $(SED
) 's, Completion/Cygwin/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
71 $(SED
) 's, Completion/Darwin/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
72 $(SED
) 's, Completion/Debian/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
73 $(SED
) 's, Completion/Mandriva/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
74 $(SED
) 's, Completion/Redhat/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
75 $(SED
) 's, Completion/Solaris/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
76 $(SED
) 's, Completion/X/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
77 $(SED
) 's, Completion/openSUSE/\*/\*,,g' $(PKG_BUILD_DIR
)/config.modules
78 # After mucking with 'config.modules', one must call
79 $(MAKE
) -C
$(PKG_BUILD_DIR
) DESTDIR
="$(PKG_INSTALL_DIR)" prep
82 define Package
/zsh
/postinst
84 grep zsh
$${IPKG_INSTROOT}/etc
/shells || \
85 echo
"/usr/bin/zsh" >> $${IPKG_INSTROOT}/etc
/shells
87 # Backwards compatibility
88 if
[[ -e
/bin
/zsh
]] && ([[ ! -L
/bin
/zsh
]] ||
[[ "$(readlink -fn $${IPKG_INSTROOT}/bin/zsh)" != "../$(CONFIGURE_PREFIX)/bin/zsh" ]]); then
89 ln
-fs
"../$(CONFIGURE_PREFIX)/bin/zsh" "$${IPKG_INSTROOT}/bin/zsh"
93 define Package
/zsh
/install
94 $(INSTALL_DIR
) $(1)/bin
95 $(INSTALL_DIR
) $(1)/$(CONFIGURE_PREFIX
)/bin
96 $(INSTALL_DIR
) $(1)/$(CONFIGURE_PREFIX
)/lib
/zsh
/$(PKG_VERSION
)
97 $(INSTALL_DIR
) $(1)/$(CONFIGURE_PREFIX
)/share
/zsh
/$(PKG_VERSION
)
99 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/$(CONFIGURE_PREFIX
)/bin
/zsh
$(1)/$(CONFIGURE_PREFIX
)/bin
/
100 $(CP
) $(PKG_INSTALL_DIR
)/$(CONFIGURE_PREFIX
)/lib
/zsh
/$(PKG_VERSION
)/* $(1)/$(CONFIGURE_PREFIX
)/lib
/zsh
/$(PKG_VERSION
)/
101 $(CP
) $(PKG_INSTALL_DIR
)/$(CONFIGURE_PREFIX
)/share
/zsh
/$(PKG_VERSION
)/* $(1)/$(CONFIGURE_PREFIX
)/share
/zsh
/$(PKG_VERSION
)/
104 define Package
/zsh
/postrm
105 rm -rf
"$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/zsh/$(PKG_VERSION)"
108 $(eval
$(call BuildPackage
,zsh
))