mpc: update to 0.35
[feed/packages.git] / utils / smartmontools / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=smartmontools
11 PKG_VERSION:=7.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/smartmontools
16 PKG_HASH:=e9a61f641ff96ca95319edfb17948cd297d0cd3342736b2c49c99d4716fb993d
17
18 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
19 PKG_LICENSE:=GPL-2.0-or-later
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:smartmontools:smartmontools
22
23 PKG_BUILD_PARALLEL:=1
24 PKG_INSTALL:=1
25 PKG_BUILD_FLAGS:=lto
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/smartmontools/Default
30 SECTION:=utils
31 CATEGORY:=Utilities
32 TITLE:=S.M.A.R.T Monitoring
33 URL:=https://www.smartmontools.org/
34 endef
35
36 define Package/smartmontools
37 $(call Package/smartmontools/Default)
38 DEPENDS:=+libstdcpp
39 TITLE+= Tool
40 endef
41
42 define Package/smartmontools/description
43 smartmontools contains utility programs (smartctl) to
44 control/monitor storage systems using the Self-Monitoring, Analysis
45 and Reporting Technology System (S.M.A.R.T.) built into most modern
46 ATA and SCSI disks. It is derived from smartsuite.
47 endef
48
49 define Package/smartd
50 $(call Package/smartmontools/Default)
51 DEPENDS:=+libstdcpp
52 TITLE+= Daemon
53 endef
54
55 define Package/smartd/description
56 smartmontools contains utility programs (smartd) to
57 control/monitor storage systems using the Self-Monitoring, Analysis
58 and Reporting Technology System (S.M.A.R.T.) built into most modern
59 ATA and SCSI disks. It is derived from smartsuite.
60 endef
61
62 define Package/smartmontools-drivedb
63 $(call Package/smartmontools/Default)
64 TITLE+= Drive database
65 PKGARCH=all
66 endef
67
68 define Package/smartmontools-drivedb/description
69 Database of known drives and USB bridges for smartctl and smartd.
70 endef
71
72 define Package/smartd-mail
73 $(call Package/smartmontools/Default)
74 TITLE+= Email notifications
75 PKGARCH=all
76 DEPENDS+= +smartd +nail +msmtp-mta
77 endef
78
79 define Package/smartd-mail/description
80 A script for mailing about SMART issues
81 endef
82
83 TARGET_CXXFLAGS +=-fno-rtti
84 MAKE_FLAGS +=BUILD_INFO='"(localbuild)"'
85
86 CONFIGURE_ARGS += \
87 --disable-fast-lebe \
88 --without-gnupg \
89 --without-libcap-ng \
90 --without-libsystemd
91
92 #lower file size vs. CONFIGURE_ARGS
93 CONFIGURE_VARS += \
94 with_cxx11_regex=yes \
95 with_smartdplugindir=no \
96 with_systemdenvfile=no \
97 with_systemdsystemunitdir=no \
98 with_update_smart_drivedb=no
99
100 define Package/smartmontools/install
101 $(INSTALL_DIR) $(1)/usr/sbin
102 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartctl $(1)/usr/sbin/
103 endef
104
105 define Package/smartd/install
106 $(INSTALL_DIR) $(1)/usr/sbin
107 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smartd $(1)/usr/sbin/
108 $(INSTALL_DIR) $(1)/etc
109 $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
110 $(INSTALL_DIR) $(1)/etc/init.d
111 $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
112 endef
113
114 define Package/smartmontools-drivedb/install
115 $(INSTALL_DIR) $(1)/usr/share/smartmontools/
116 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/smartmontools/drivedb.h $(1)/usr/share/smartmontools/
117 endef
118
119 define Package/smartd-mail/install
120 $(INSTALL_DIR) $(1)/etc
121 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/smartd_warning.sh $(1)/etc
122 endef
123
124 define Package/smartd/conffiles
125 /etc/smartd.conf
126 endef
127
128 $(eval $(call BuildPackage,smartmontools))
129 $(eval $(call BuildPackage,smartd))
130 $(eval $(call BuildPackage,smartmontools-drivedb))
131 $(eval $(call BuildPackage,smartd-mail))