summaryrefslogtreecommitdiffstats
path: root/package/hdparm/hdparm.mk
blob: c524c6273756a122d2b98363109891d958226b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#############################################################
#
# hdparm
#
#############################################################

HDPARM_VERSION = 9.39
HDPARM_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/hdparm

define HDPARM_BUILD_CMDS
	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
		CFLAGS="$(TARGET_CFLAGS)" \
		LDFLAGS="$(TARGET_LDFLAGS)"
endef

ifeq ($(BR2_HAVE_DOCUMENTATION),y)
define HDPARM_INSTALL_DOCUMENTATION
	$(INSTALL) -D $(@D)/hdparm.8 $(TARGET_DIR)/usr/share/man/man8/hdparm.8
endef
endif

define HDPARM_INSTALL_TARGET_CMDS
	$(INSTALL) -D -m 0755 $(@D)/hdparm $(TARGET_DIR)/sbin/hdparm
	$(HDPARM_INSTALL_DOCUMENTATION)
endef

define HDPARM_UNINSTALL_TARGET_CMDS
	rm -f $(TARGET_DIR)/sbin/hdparm
	rm -f $(TARGET_DIR)/usr/share/man/man8/hdparm.8
endef

define HDPARM_CLEAN_CMDS
	-$(MAKE) -C $(@D) clean
endef

$(eval $(generic-package))