libcli: Add new package
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Wed, 6 Jul 2022 23:46:56 +0000 (01:46 +0200)
committerRosen Penev <rosenp@gmail.com>
Thu, 22 Sep 2022 08:30:14 +0000 (01:30 -0700)
This package is a dependency for building mausezahn as part of the
netsniff-ng sources. mausezahn is a multicast traffic generator used by
the upcoming kernel-selftests-net-forwarding package.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
libs/libcli/Makefile [new file with mode: 0644]

diff --git a/libs/libcli/Makefile b/libs/libcli/Makefile
new file mode 100644 (file)
index 0000000..145087d
--- /dev/null
@@ -0,0 +1,57 @@
+# Copyright (C) 2022 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libcli
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/dparrish/libcli.git
+PKG_SOURCE_DATE:=2022-07-06
+PKG_SOURCE_VERSION:=V1.10.7
+PKG_MIRROR_HASH:=7698898364d91a1abf9e19c588a19c9587615106cf1caaf2a7e135f9ce1b1b45
+
+PKG_MAINTAINER:=Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+PKG_LICENSE:=LGPL-2.1
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libcli
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=libcli
+  URL:=https://dparrish.com/link/libcli
+  DEPENDS:=+libc
+endef
+
+define Package/libcli/description
+  Libcli provides a shared library for including a Cisco-like
+  command-line interface into other software.
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CC="$(TARGET_CC)" \
+               LDFLAGS="$(TARGET_LDFLAGS)" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               TESTS=0 \
+               all install
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/local/include/libcli.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libcli.so* $(1)/usr/lib/
+endef
+
+define Package/libcli/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/libcli.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libcli))