aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPhilip Prindeville <philipp@redfish-solutions.com>2023-10-09 18:37:34 -0600
committerPhilip Prindeville <philipp@redfish-solutions.com>2023-12-05 09:44:52 -0700
commitfbb4be3de4c2240f4acf54af3a9064d391e5a3ef (patch)
treeb8317a86559786fa3357dc7e8f60000c90c2d24b /utils
parenta0c6ba40d9ad56b050dd01761ef6a526e472185c (diff)
cligen: Initial packaging
CLIgen is a Command-Line Interface generator Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Diffstat (limited to 'utils')
1 files changed, 60 insertions, 0 deletions
diff --git a/utils/cligen/Makefile b/utils/cligen/Makefile
new file mode 100644
index 000000000..40a058fe2
--- /dev/null
+++ b/utils/cligen/Makefile
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2020-2023 Olof Hagsand and Rubicon Communications, LLC(Netgate)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=cligen
+PKG_VERSION:=6.5.0
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Olof Hagsand <olof@hagsand.se>, Philip Prindeville <philipp@redfish-solutions.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/clicon/$(PKG_NAME)/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=8b3943430f7aa9eea6a5f7cf1ace5b68eb382380cf68f41ae3ef5e032e08816f
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=LICENSE.md
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/cligen
+ SECTION:=utils
+ CATEGORY:=Utilities
+ URL:=https://www.cligen.se
+ TITLE:=CLIgen is a Command-Line Interface generator
+ DEPENDS:=libxml2
+endef
+
+define Package/cligen/description
+ CLIgen is a Command-Line Interface generator
+endef
+
+CONFIGURE_ARGS+= \
+ --exec-prefix=/usr
+
+CONFIGURE_ARGS:=$(filter-out --disable-dependency-tracking,$(CONFIGURE_ARGS))
+
+INSTALLFLAGS:=-s --strip-program=$(TARGET_CROSS)strip
+
+CONFIGURE_VARS+= \
+ INSTALLFLAGS="$(INSTALLFLAGS)"
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/cligen $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcligen.so* $(1)/usr/lib/
+endef
+
+define Package/cligen/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcligen.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,cligen))