Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | SUMMARY = "lio-utils" |
| 2 | DESCRIPTION = "a simple low-level configuration tool set for the Target+iSCSI (LIO)" |
| 3 | HOMEPAGE = "http://linux-iscsi.org/index.php/Lio-utils" |
| 4 | LICENSE = "GPLv2" |
| 5 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=c3ea231a32635cbb5debedf3e88aa3df" |
| 6 | |
| 7 | PV = "4.1+git${SRCPV}" |
| 8 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 9 | SRC_URI = "git://github.com/Datera/lio-utils.git \ |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 10 | file://0001-Makefiles-Respect-environment-variables-and-add-LDFL.patch \ |
| 11 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 12 | SRCREV = "0ac9091c1ff7a52d5435a4f4449e82637142e06e" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 13 | S = "${WORKDIR}/git" |
| 14 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "distutils", "", d)} |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 16 | |
| 17 | EXTRA_OEMAKE += "DESTDIR=${D}" |
| 18 | |
| 19 | do_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 | |
| 31 | do_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 | |
Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame^] | 58 | PNBLACKLIST[lio-utils] ?= "${@bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', '', 'python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes"', d)}" |
| 59 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 60 | RDEPENDS_${PN} += "python-stringold python-subprocess python-shell \ |
| 61 | python-datetime python-textutils python-crypt python-netclient python-email \ |
| 62 | bash" |
| 63 | |
| 64 | FILES_${PN} += "${sbindir}/* /etc/init.d/* /etc/target/*" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 65 | |
| 66 | # http://errors.yoctoproject.org/Errors/Details/184712/ |
| 67 | # python-native/python: can't open file 'setup.py': [Errno 2] No such file or directory |
| 68 | CLEANBROKEN = "1" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 69 | |
| 70 | python() { |
| 71 | if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split(): |
| 72 | raise bb.parse.SkipRecipe('Requires meta-python2 to be present.') |
| 73 | } |
| 74 | |
| 75 | |