xref: /OK3568_Linux_fs/buildroot/package/targetcli-fb/targetcli-fb.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# targetcli-fb
4#
5################################################################################
6
7# When upgrading the version, be sure to also upgrade python-rtslib-fb
8# and python-configshell-fb at the same time.
9TARGETCLI_FB_VERSION = 2.1.fb41
10TARGETCLI_FB_SITE = $(call github,open-iscsi,targetcli-fb,v$(TARGETCLI_FB_VERSION))
11TARGETCLI_FB_LICENSE = Apache-2.0
12TARGETCLI_FB_LICENSE_FILES = COPYING
13TARGETCLI_FB_SETUP_TYPE = setuptools
14TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six
15
16define TARGETCLI_FB_INSTALL_INIT_SYSV
17	$(INSTALL) -m 0755 -D package/targetcli-fb/S50target \
18		$(TARGET_DIR)/etc/init.d/S50target
19endef
20
21define TARGETCLI_FB_INSTALL_INIT_SYSTEMD
22	$(INSTALL) -m 0644 -D package/targetcli-fb/target.service \
23		$(TARGET_DIR)/usr/lib/systemd/system/target.service
24endef
25
26# Targetcli stores its configuration in /etc/target/saveconfig.json
27# and complains if the /etc/target/ directory does not exist.
28define TARGETCLI_FB_INSTALL_CONF_DIR
29	$(INSTALL) -m 0755 -d $(TARGET_DIR)/etc/target
30endef
31
32TARGETCLI_FB_POST_INSTALL_TARGET_HOOKS += TARGETCLI_FB_INSTALL_CONF_DIR
33
34$(eval $(python-package))
35