packages/fanctrolled: use new service functions
[openwrt/svn-archive/archive.git] / utils / fancontroled / Makefile
1 #
2 # Copyright (C) 2010-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v3.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=fancontroled
11 PKG_VERSION:=0.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar
15 PKG_SOURCE_URL:=http://code.lukaperkov.net/fancontroled/
16 PKG_MD5SUM:=8c3a7efa99e58216ad4633d1e6ed1358
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/fancontroled
21 SECTION:=utils
22 CATEGORY:=Utilities
23 TITLE:=fancontroled
24 DEPENDS:=+libsensors
25 URL:=http://fancontroled.lukaperkov.net/
26 endef
27
28 define Package/fancontroled/description
29 fancontroled is linux daemon written in C implementing a temperature dependent fan speed control.
30 endef
31
32 define Build/Compile
33 $(MAKE) -C $(PKG_BUILD_DIR) \
34 $(TARGET_CONFIGURE_OPTS) \
35 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS)" \
36 LDFLAGS="$(TARGET_LDFLAGS)" \
37 INC_PATH="-I$(STAGING_DIR)/usr/include/ -I$(STAGING_DIR)/usr/lib/"
38
39 $(STRIP) $(PKG_BUILD_DIR)/$(PKG_NAME)
40
41 mkdir -p $(PKG_INSTALL_DIR)/usr/sbin
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 install
45 endef
46
47 define Package/fancontroled/install
48 $(INSTALL_DIR) $(1)/usr/sbin
49 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin/
50 $(INSTALL_DIR) $(1)/etc/init.d
51 $(INSTALL_BIN) ./files/fancontroled.init $(1)/etc/init.d/fancontroled
52 endef
53
54 $(eval $(call BuildPackage,fancontroled))