gst1-plugins-base: update to 1.22.8
[feed/packages.git] / utils / tcsh / Makefile
1 #
2 # Copyright (C) 2011-2017 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
9 PKG_NAME:=tcsh
10 PKG_VERSION:=6.22.04
11 PKG_RELEASE:=2
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:= \
15 https://astron.com/pub/tcsh/ \
16 https://astron.com/pub/tcsh/old \
17 https://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh \
18 https://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/old
19 PKG_HASH:=eb16356243218c32f39e07258d72bf8b21e62ce94bb0e8a95e318b151397e231
20
21 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
22 PKG_LICENSE:=BSD-3-Clause
23 PKG_LICENSE_FILES:=Copyright
24 PKG_CPE_ID:=cpe:/a:tcsh:tcsh
25
26 PKG_FIXUP:=autoreconf
27 PKG_INSTALL:=1
28 PKG_BUILD_DEPENDS:=tcsh/host
29 PKG_BUILD_PARALLEL:=1
30
31 include $(INCLUDE_DIR)/host-build.mk
32 include $(INCLUDE_DIR)/package.mk
33 include $(INCLUDE_DIR)/nls.mk
34
35 define Package/tcsh
36 SECTION:=utils
37 CATEGORY:=Utilities
38 SUBMENU:=Shells
39 TITLE:=Enhanced Berkeley UNIX C shell
40 DEPENDS:=+libncurses $(ICONV_DEPENDS)
41 URL:=https://www.tcsh.org/
42 endef
43
44 define Package/tcsh/description
45 Tcsh is an enhanced, but completely compatible
46 version of the Berkeley UNIX C shell (csh). It
47 is a command language interpreter usable both
48 as an interactive login shell and a shell
49 script command processor. It includes a
50 command-line editor, programmable word
51 completion, spelling correction, a history
52 mechanism, job control and a C-like syntax.
53 endef
54
55
56 define Host/Compile
57 $(call Host/Compile/Default,gethost)
58 endef
59
60 define Host/Install
61 mkdir -p $(STAGING_DIR_HOSTPKG)/usr/bin
62 $(INSTALL_BIN) $(HOST_BUILD_DIR)/gethost $(STAGING_DIR_HOSTPKG)/usr/bin/tcsh-gethost
63 endef
64
65 define Build/Compile
66 #Build sh.err.h and tc.const.h for target build
67 $(call Build/Compile/Default,sh.err.h)
68 $(call Build/Compile/Default,tc.const.h)
69 #Copy gethost (host tool to generate header file) from hostpkg dir
70 $(CP) $(STAGING_DIR_HOSTPKG)/usr/bin/tcsh-gethost $(PKG_BUILD_DIR)/gethost
71 #Make-touch header generator binary to prevent recompiling during target build
72 $(call Build/Compile/Default,-t gethost)
73 #Build tcsh for target
74 $(call Build/Compile/Default)
75 endef
76
77 define Package/tcsh/postinst
78 #!/bin/sh
79 grep tcsh $${IPKG_INSTROOT}/etc/shells || { \
80 echo "/bin/tcsh"
81 echo "/bin/csh"
82 } >> $${IPKG_INSTROOT}/etc/shells
83 endef
84
85 define Package/tcsh/install
86 $(INSTALL_DIR) $(1)/bin
87 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tcsh $(1)/bin/
88 ln -sf tcsh $(1)/bin/csh
89 endef
90
91 $(eval $(call HostBuild))
92 $(eval $(call BuildPackage,tcsh))