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