smartmontools_6.4.bb 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.contains('DISTRO_FEATURES', 'libcap-ng', 'libcap-ng', '', d)} \
  18. ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
  19. "
  20. PACKAGECONFIG[libcap-ng] = "--with-libcap-ng=yes,--with-libcap-ng=no,libcap-ng"
  21. PACKAGECONFIG[selinux] = "--with-selinux=yes,--with-selinux=no,libselinux"
  22. SRC_URI[md5sum] = "56812c8312fd123ed40ef65afde1049e"
  23. SRC_URI[sha256sum] = "eab75600c1eda9c34b13097db71138ab376f3dad8a6a4667fb4d1d081feb7a85"
  24. inherit autotools update-rc.d systemd
  25. SYSTEMD_SERVICE_${PN} = "smartd.service"
  26. SYSTEMD_AUTO_ENABLE = "disable"
  27. do_install_append () {
  28. #install the init.d/smartd
  29. install -d ${D}${sysconfdir}/init.d
  30. install -p -m 0755 ${WORKDIR}/initd.smartd ${D}${sysconfdir}/init.d/smartd
  31. install -d ${D}${sysconfdir}/default
  32. install -p -m 0644 ${WORKDIR}/smartmontools.default ${D}${sysconfdir}/default/smartmontools
  33. #install systemd service file
  34. install -d ${D}${systemd_unitdir}/system
  35. install -m 0644 ${WORKDIR}/smartd.service ${D}${systemd_unitdir}/system
  36. sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
  37. -e 's,@SYSCONFDIR@,${sysconfdir},g' \
  38. -e 's,@SBINDIR@,${sbindir},g' \
  39. ${D}${systemd_unitdir}/system/smartd.service
  40. }
  41. INITSCRIPT_NAME = "smartd"
  42. INITSCRIPT_PARAMS = "start 60 2 3 4 5 . stop 60 0 1 6 ."
  43. RDEPENDS_${PN} += "mailx"