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