lio-utils_4.1.bb 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. PV = "4.1+git${SRCPV}"
  7. SRC_URI = "git://github.com/Datera/lio-utils.git \
  8. file://0001-Makefiles-Respect-environment-variables-and-add-LDFL.patch \
  9. "
  10. SRCREV = "0ac9091c1ff7a52d5435a4f4449e82637142e06e"
  11. S = "${WORKDIR}/git"
  12. inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "distutils", "", d)}
  13. EXTRA_OEMAKE += "DESTDIR=${D}"
  14. do_compile() {
  15. cd ${S}/tcm-py
  16. distutils_do_compile
  17. cd ${S}/lio-py
  18. distutils_do_compile
  19. if test -d ${S}/tools; then
  20. oe_runmake -C ${S}/tools
  21. fi
  22. }
  23. do_install() {
  24. cd ${S}/tcm-py
  25. distutils_do_install
  26. cd ${S}/lio-py
  27. distutils_do_install
  28. SITE_PACKAGES=${D}/${PYTHON_SITEPACKAGES_DIR}
  29. install -d ${D}/${sbindir}
  30. for var in tcm_node tcm_dump tcm_loop tcm_fabric lio_dump lio_node; do
  31. if [ ! -h ${D}/${sbindir}/${var} ];then
  32. chmod a+x ${SITE_PACKAGES}/${var}.py
  33. ln -s ${PYTHON_SITEPACKAGES_DIR}/${var}.py ${D}/${sbindir}/${var}
  34. fi
  35. done
  36. if test -d ${S}/tools; then
  37. oe_runmake -C ${S}/tools install
  38. fi
  39. install -d ${D}/etc/target/
  40. install -d ${D}/etc/init.d/
  41. install -m 755 ${S}/scripts/rc.target ${D}/etc/init.d/
  42. install -m 755 ${S}/conf/tcm_start.default ${D}/etc/target/tcm_start.sh
  43. install -m 755 ${S}/conf/lio_start.default ${D}/etc/target/lio_start.sh
  44. }
  45. RDEPENDS_${PN} += "python-stringold python-subprocess python-shell \
  46. python-datetime python-textutils python-crypt python-netclient python-email \
  47. bash"
  48. FILES_${PN} += "${sbindir}/* /etc/init.d/* /etc/target/*"
  49. # http://errors.yoctoproject.org/Errors/Details/184712/
  50. # python-native/python: can't open file 'setup.py': [Errno 2] No such file or directory
  51. CLEANBROKEN = "1"
  52. python() {
  53. if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
  54. raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
  55. }