packages: add missing conffiles define
[openwrt/svn-archive/archive.git] / utils / smartmontools / Makefile
1 #
2 # Copyright (C) 2006-2011 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:=5.40
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/smartmontools
16 PKG_MD5SUM:=0f0be0239914ad87830a4fff594bda5b
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/smartmontools/Default
21 SECTION:=utils
22 CATEGORY:=Utilities
23 DEPENDS:=+uclibcxx
24 TITLE:=S.M.A.R.T Monitoring
25 URL:=http://smartmontools.sourceforge.net/
26 endef
27
28 define Package/smartmontools
29 $(call Package/smartmontools/Default)
30 TITLE+= Tool
31 endef
32
33 define Package/smartmontools/description
34 smartmontools contains utility programs (smartctl) to
35 control/monitor storage systems using the Self-Monitoring, Analysis
36 and Reporting Technology System (S.M.A.R.T.) built into most modern
37 ATA and SCSI disks. It is derived from smartsuite.
38 endef
39
40 define Package/smartd
41 $(call Package/smartmontools/Default)
42 DEPENDS+= +rsync
43 TITLE+= Daemon
44 endef
45
46 define Package/smartd/description
47 smartmontools contains utility programs (smartd) to
48 control/monitor storage systems using the Self-Monitoring, Analysis
49 and Reporting Technology System (S.M.A.R.T.) built into most modern
50 ATA and SCSI disks. It is derived from smartsuite.
51 endef
52
53 # uses GNU configure
54
55 CONFIGURE_VARS += \
56 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
57 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \
58 LDFLAGS="$$$$LDFLAGS" \
59 LIBS="-nodefaultlibs -luClibc++ -lm $(LIBGCC_S) -lc" \
60
61 define Build/Configure
62 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
63 ./autogen.sh \
64 );
65 $(call Build/Configure/Default)
66 endef
67
68 define Build/Compile
69 $(MAKE) -C $(PKG_BUILD_DIR) \
70 LD="$(TARGET_CXX)"
71 endef
72
73 define Package/smartmontools/install
74 $(INSTALL_DIR) $(1)/usr/sbin
75 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/
76 endef
77
78 define Package/smartd/install
79 $(INSTALL_DIR) $(1)/usr/sbin
80 $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/
81 $(INSTALL_DIR) $(1)/etc
82 $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/
83 $(INSTALL_DIR) $(1)/etc/init.d
84 $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd
85 endef
86
87 define Package/smartd/conffiles
88 /etc/smartd.conf
89 endef
90
91 $(eval $(call BuildPackage,smartmontools))
92 $(eval $(call BuildPackage,smartd))