blob: ea54e75523b9688e58368b6ef57b896cc33b466d [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "lio-utils"
2DESCRIPTION = "a simple low-level configuration tool set for the Target+iSCSI (LIO)"
3HOMEPAGE = "http://linux-iscsi.org/index.php/Lio-utils"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://debian/copyright;md5=c3ea231a32635cbb5debedf3e88aa3df"
6
7PV = "4.1+git${SRCPV}"
8
Brad Bishop19323692019-04-05 15:28:33 -04009SRC_URI = "git://github.com/Datera/lio-utils.git \
Brad Bishop7f28bc52017-12-03 23:42:40 -050010 file://0001-Makefiles-Respect-environment-variables-and-add-LDFL.patch \
11 "
Brad Bishop19323692019-04-05 15:28:33 -040012SRCREV = "0ac9091c1ff7a52d5435a4f4449e82637142e06e"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050013S = "${WORKDIR}/git"
14
15inherit distutils
16
17EXTRA_OEMAKE += "DESTDIR=${D}"
18
19do_compile() {
20 cd ${S}/tcm-py
21 distutils_do_compile
22
23 cd ${S}/lio-py
24 distutils_do_compile
25
26 if test -d ${S}/tools; then
27 oe_runmake -C ${S}/tools
28 fi
29}
30
31do_install() {
32 cd ${S}/tcm-py
33 distutils_do_install
34
35 cd ${S}/lio-py
36 distutils_do_install
37
38 SITE_PACKAGES=${D}/${PYTHON_SITEPACKAGES_DIR}
39 install -d ${D}/${sbindir}
40 for var in tcm_node tcm_dump tcm_loop tcm_fabric lio_dump lio_node; do
41 if [ ! -h ${D}/${sbindir}/${var} ];then
42 chmod a+x ${SITE_PACKAGES}/${var}.py
43 ln -s ${PYTHON_SITEPACKAGES_DIR}/${var}.py ${D}/${sbindir}/${var}
44 fi
45 done
46
47 if test -d ${S}/tools; then
48 oe_runmake -C ${S}/tools install
49 fi
50
51 install -d ${D}/etc/target/
52 install -d ${D}/etc/init.d/
53 install -m 755 ${S}/scripts/rc.target ${D}/etc/init.d/
54 install -m 755 ${S}/conf/tcm_start.default ${D}/etc/target/tcm_start.sh
55 install -m 755 ${S}/conf/lio_start.default ${D}/etc/target/lio_start.sh
56}
57
58RDEPENDS_${PN} += "python-stringold python-subprocess python-shell \
59 python-datetime python-textutils python-crypt python-netclient python-email \
60 bash"
61
62FILES_${PN} += "${sbindir}/* /etc/init.d/* /etc/target/*"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080063
64# http://errors.yoctoproject.org/Errors/Details/184712/
65# python-native/python: can't open file 'setup.py': [Errno 2] No such file or directory
66CLEANBROKEN = "1"