buildrootschalter/package/hdparm/hdparm.mk
Thomas Petazzoni 0849e8193e package: remove useless arguments from GENTARGETS
Thanks to the pkgparentdir and pkgname functions, we can rewrite the
GENTARGETS macro in a way that avoids the need for each package to
repeat its name and the directory in which it is present.

[Peter: pkgdir->pkgparentdir]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-29 23:09:58 +02:00

37 lines
931 B
Makefile

#############################################################
#
# hdparm
#
#############################################################
HDPARM_VERSION = 9.36
HDPARM_SOURCE = hdparm-$(HDPARM_VERSION).tar.gz
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 $(call GENTARGETS))