05436876379f80bcf7b41813eff8bcd73d118ec1
[openwrt/svn-archive/archive.git] / utils / hd-idle / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=hd-idle
12 PKG_REV:=HEAD
13 PKG_VERSION:=$(PKG_REV)
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=:pserver:anonymous@hd-idle.cvs.sourceforge.net:/cvsroot/hd-idle
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)
19 PKG_SOURCE_VERSION:=$(PKG_REV)
20 PKG_SOURCE_PROTO:=cvs
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/hd-idle
27 SECTION:=utils
28 CATEGORY:=Utilities
29 TITLE:=Another idle-daemon for attached hard drives
30 SUBMENU:=disc
31 endef
32
33 define Build/Compile
34 $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME).c
35 endef
36
37 define Package/hd-idle/install
38 $(INSTALL_DIR) $(1)/usr/bin
39 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
40 $(INSTALL_DIR) $(1)/etc/config
41 $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
42 $(INSTALL_DIR) $(1)/etc/init.d
43 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
44 endef
45
46 $(eval $(call BuildPackage,hd-idle))