2 # Copyright (C) 2011-2017 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
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
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
28 PKG_BUILD_DEPENDS
:=tcsh
/host
31 include $(INCLUDE_DIR
)/host-build.mk
32 include $(INCLUDE_DIR
)/package.mk
33 include $(INCLUDE_DIR
)/nls.mk
39 TITLE
:=Enhanced Berkeley UNIX C
shell
40 DEPENDS
:=+libncurses
$(ICONV_DEPENDS
)
41 URL
:=https
://www.tcsh.org
/
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.
57 $(call Host
/Compile
/Default
,gethost
)
61 mkdir
-p
$(STAGING_DIR_HOSTPKG
)/usr
/bin
62 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/gethost
$(STAGING_DIR_HOSTPKG
)/usr
/bin
/tcsh-gethost
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
)
77 define Package
/tcsh
/postinst
79 grep tcsh
$${IPKG_INSTROOT}/etc
/shells ||
{ \
82 } >> $${IPKG_INSTROOT}/etc
/shells
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
91 $(eval
$(call HostBuild
))
92 $(eval
$(call BuildPackage
,tcsh
))