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.

92 lines
2.5 KiB

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