smartmontools_7.2.bb 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. SUMMARY = "Control and monitor storage systems using S.M.A.R.T"
  2. DESCRIPTION = "\
  3. The smartmontools package contains two utility programs (smartctl \
  4. and smartd) to control and monitor storage systems using the Self-\
  5. Monitoring, Analysis and Reporting Technology System (SMART) built \
  6. into most modern ATA and SCSI hard disks. In many cases, these \
  7. utilities will provide advanced warning of disk degradation and failure."
  8. HOMEPAGE = "http://smartmontools.sourceforge.net/"
  9. SECTION = "console/utils"
  10. LICENSE = "GPLv2"
  11. LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
  12. SRC_URI = "${SOURCEFORGE_MIRROR}/smartmontools/smartmontools-${PV}.tar.gz \
  13. file://initd.smartd \
  14. file://smartmontools.default \
  15. file://smartd.service \
  16. "
  17. PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'libcap-ng selinux', d)}"
  18. PACKAGECONFIG[libcap-ng] = "--with-libcap-ng=yes,--with-libcap-ng=no,libcap-ng"
  19. PACKAGECONFIG[selinux] = "--with-selinux=yes,--with-selinux=no,libselinux"
  20. SRC_URI[md5sum] = "e8d134c69ae4959a05cb56b31172ffb1"
  21. SRC_URI[sha256sum] = "5cd98a27e6393168bc6aaea070d9e1cd551b0f898c52f66b2ff2e5d274118cd6"
  22. inherit autotools update-rc.d systemd
  23. SYSTEMD_SERVICE_${PN} = "smartd.service"
  24. SYSTEMD_AUTO_ENABLE = "disable"
  25. do_install_append () {
  26. #install the init.d/smartd
  27. install -d ${D}${sysconfdir}/init.d
  28. install -p -m 0755 ${WORKDIR}/initd.smartd ${D}${sysconfdir}/init.d/smartd
  29. install -d ${D}${sysconfdir}/default
  30. install -p -m 0644 ${WORKDIR}/smartmontools.default ${D}${sysconfdir}/default/smartmontools
  31. #install systemd service file
  32. install -d ${D}${systemd_unitdir}/system
  33. install -m 0644 ${WORKDIR}/smartd.service ${D}${systemd_unitdir}/system
  34. sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
  35. -e 's,@SYSCONFDIR@,${sysconfdir},g' \
  36. -e 's,@SBINDIR@,${sbindir},g' \
  37. ${D}${systemd_unitdir}/system/smartd.service
  38. }
  39. INITSCRIPT_NAME = "smartd"
  40. INITSCRIPT_PARAMS = "start 60 2 3 4 5 . stop 60 0 1 6 ."
  41. RDEPENDS_${PN} += "mailx"