[Buildroot] [PATCH 1/1] package/open-isns: new package
TIAN Yuanhao
tianyuanhao3 at 163.com
Mon Sep 12 00:52:42 UTC 2022
Signed-off-by: TIAN Yuanhao <tianyuanhao3 at 163.com>
---
DEVELOPERS | 3 ++
package/Config.in | 1 +
package/open-isns/Config.in | 20 +++++++++++
package/open-isns/open-isns.hash | 3 ++
package/open-isns/open-isns.mk | 62 ++++++++++++++++++++++++++++++++
5 files changed, 89 insertions(+)
create mode 100644 package/open-isns/Config.in
create mode 100644 package/open-isns/open-isns.hash
create mode 100644 package/open-isns/open-isns.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index d2bd0d809a..54216450f4 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2790,6 +2790,9 @@ F: package/python-influxdb/
N: Sven Oliver Moll <svolli at svolli.de>
F: package/most/
+N: TIAN Yuanhao <tianyuanhao3 at 163.com>
+F: package/open-isns/
+
N: Theo Debrouwere <t.debrouwere at televic.com>
F: board/beagleboardx15/
F: configs/beagleboardx15_defconfig
diff --git a/package/Config.in b/package/Config.in
index d1c098c48f..de51be400b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1919,6 +1919,7 @@ menu "Networking"
source "package/nss-myhostname/Config.in"
source "package/nss-pam-ldapd/Config.in"
source "package/omniorb/Config.in"
+ source "package/open-isns/Config.in"
source "package/open62541/Config.in"
source "package/openldap/Config.in"
source "package/openmpi/Config.in"
diff --git a/package/open-isns/Config.in b/package/open-isns/Config.in
new file mode 100644
index 0000000000..d3f391342a
--- /dev/null
+++ b/package/open-isns/Config.in
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_OPEN_ISNS
+ bool "open-isns (libisns)"
+ depends on BR2_USE_MMU # fork()
+ help
+ iSNS server and client for Linux.
+
+ Note that this option only installs the libraries, and not the
+ programs.
+
+ https://github.com/open-iscsi/open-isns
+
+if BR2_PACKAGE_OPEN_ISNS
+
+config BR2_PACKAGE_OPEN_ISNS_PROGS
+ bool "open-isns programs"
+ help
+ This option tells open-isns to not only install the libraries,
+ but also the programs.
+
+endif
diff --git a/package/open-isns/open-isns.hash b/package/open-isns/open-isns.hash
new file mode 100644
index 0000000000..653fabaa9f
--- /dev/null
+++ b/package/open-isns/open-isns.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 9611344733c0cdf14395f60880950ea4c3c7d6b765565b6493ad3e1afbe216de open-isns-0.102.tar.gz
+sha256 00a89b0d18aacd4114decf79122db87bf35bddaf2bc50e383c9c9f4c263390b2 COPYING
diff --git a/package/open-isns/open-isns.mk b/package/open-isns/open-isns.mk
new file mode 100644
index 0000000000..c63e25735c
--- /dev/null
+++ b/package/open-isns/open-isns.mk
@@ -0,0 +1,62 @@
+################################################################################
+#
+# open-isns
+#
+################################################################################
+
+OPEN_ISNS_VERSION = 0.102
+OPEN_ISNS_SITE = $(call github,open-iscsi,open-isns,v$(OPEN_ISNS_VERSION))
+OPEN_ISNS_LICENSE = LGPL-2.1
+OPEN_ISNS_LICENSE_FILES = COPYING
+OPEN_ISNS_INSTALL_STAGING = YES
+
+OPEN_ISNS_CONF_OPTS = -Dslp=disabled
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+OPEN_ISNS_DEPENDENCIES += openssl
+OPEN_ISNS_CONF_OPTS += -Dsecurity=enabled
+else
+OPEN_ISNS_CONF_OPTS += -Dsecurity=disabled
+endif
+
+define OPEN_ISNS_INSTALL_STAGING_CMDS
+ $(INSTALL) -d -m 755 $(STAGING_DIR)/usr/include/libisns \
+ $(STAGING_DIR)/usr/lib
+ cp -dpf $(@D)/build/include/libisns/*.h $(@D)/include/libisns/*.h \
+ $(STAGING_DIR)/usr/include/libisns/
+ cp -dpf $(if $(BR2_STATIC_LIBS),$(@D)/build/libisns.a,$(@D)/build/libisns.so $(@D)/build/libisns.so.0) \
+ $(STAGING_DIR)/usr/lib/
+ $(INSTALL) -D -m 644 $(@D)/libisns.pc \
+ $(STAGING_DIR)/usr/lib/pkgconfig/libisns.pc
+endef
+
+define OPEN_ISNS_INSTALL_TARGET_CMDS
+ $(OPEN_ISNS_INSTALL_LIBS)
+ $(OPEN_ISNS_INSTALL_PROGS)
+endef
+
+ifeq ($(BR2_STATIC_LIBS),)
+define OPEN_ISNS_INSTALL_LIBS
+ $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/lib
+ cp -dpf $(@D)/build/libisns.so $(@D)/build/libisns.so.0 \
+ $(TARGET_DIR)/usr/lib/
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_OPEN_ISNS_PROGS),y)
+define OPEN_ISNS_INSTALL_PROGS
+ $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/isns $(TARGET_DIR)/usr/sbin
+ $(INSTALL) -d -m 700 $(TARGET_DIR)/var/lib/isns
+ $(INSTALL) -m 555 -t $(TARGET_DIR)/usr/sbin $(@D)/build/isnsadm \
+ $(@D)/build/isnsd $(@D)/build/isnsdd
+ cp -dpf $(@D)/etc/*.conf $(TARGET_DIR)/etc/isns/
+endef
+
+define OPEN_ISNS_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/lib/systemd/system
+ $(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/systemd/system \
+ $(@D)/isnsd.service $(@D)/isnsd.socket
+endef
+endif
+
+$(eval $(meson-package))
--
2.25.1
More information about the buildroot
mailing list