1
0

Makefile 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #
  2. # Copyright (C) 2016 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. PKG_NAME:=klish
  9. PKG_VERSION:=2.1.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://libcode.org/attachments/download/66/
  13. PKG_LICENSE:=BSD-3-Clause
  14. PKG_LICENSE_FILES:=LICENCE
  15. PKG_MAINTAINER:=Takashi Umeno <umeno.takashi@gmail.com>
  16. PKG_MD5SUM:=7dfe46d474c02c86946c1d7a461ae549
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/klish/default
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. SUBMENU:=Shells
  23. TITLE:=Kommand Line Interface SHell ($(1))
  24. URL:=http://libcode.org/projects/klish/
  25. endef
  26. define Package/klish
  27. $(call Package/klish/default,main tool)
  28. DEPENDS:=+libstdcpp +libxml2
  29. endef
  30. define Package/klish/description
  31. The klish is a framework for implementing a CISCO-like CLI on a UNIX
  32. systems. It is configurable by XML files. The KLISH stands for Kommand
  33. Line Interface Shell.
  34. The klish is a fork of clish 0.7.3 developed by Graeme McKerrell.
  35. It defines new features but it's compatible (as much as possible) with
  36. clish's XML configuration files.
  37. klish is able to run using clish XML configuration files although
  38. current clish users may expect some changes in behavior.
  39. Konf and konfd are klish utilities that are used to store configuration
  40. informations in a way which is similar to what's found on CISCO devices.
  41. More information about these tools is to be found on the klish web site.
  42. endef
  43. define Build/Configure
  44. $(call Build/Configure/Default, \
  45. --with-libxml2 \
  46. )
  47. endef
  48. define Package/klish/install
  49. $(INSTALL_DIR) $(1)/usr/bin
  50. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clish $(1)/usr/bin/
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konf $(1)/usr/bin/
  52. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konfd $(1)/usr/bin/
  53. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigexec $(1)/usr/bin/
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  56. endef
  57. $(eval $(call BuildPackage,klish))
  58. define Package/klish-xml-files
  59. SECTION:=utils
  60. CATEGORY:=Utilities
  61. DEPENDS:=klish
  62. TITLE:=klish sample XML files
  63. URL:=http://code.google.com/p/klish/
  64. endef
  65. define Package/klish-xml-files/description
  66. This is a set of sample XML files for klish.
  67. endef
  68. define Package/klish-xml-files/install
  69. $(INSTALL_DIR) $(1)/etc/clish
  70. $(CP) $(PKG_BUILD_DIR)/xml-examples/clish $(1)/etc/clish/
  71. $(CP) $(PKG_BUILD_DIR)/xml-examples/klish $(1)/etc/clish/
  72. $(CP) $(PKG_BUILD_DIR)/xml-examples/lua $(1)/etc/clish/
  73. $(CP) $(PKG_BUILD_DIR)/xml-examples/test $(1)/etc/clish/
  74. endef
  75. $(eval $(call BuildPackage,klish-xml-files))