xref: /OK3568_Linux_fs/buildroot/package/bcache-tools/bcache-tools.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# bcache-tools
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunBCACHE_TOOLS_VERSION = 1.0.8
8*4882a593SmuzhiyunBCACHE_TOOLS_SITE = $(call github,g2p,bcache-tools,v$(BCACHE_TOOLS_VERSION))
9*4882a593SmuzhiyunBCACHE_TOOLS_LICENSE = GPL-2.0
10*4882a593SmuzhiyunBCACHE_TOOLS_LICENSE_FILES = COPYING
11*4882a593SmuzhiyunBCACHE_TOOLS_DEPENDENCIES = host-pkgconf util-linux
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun# We pass $(TARGET_CONFIGURE_OPTS) as environment variable to allow
14*4882a593Smuzhiyun# the bcache-tools Makefile to alter CFLAGS
15*4882a593Smuzhiyundefine BCACHE_TOOLS_BUILD_CMDS
16*4882a593Smuzhiyun	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
17*4882a593Smuzhiyunendef
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun# The bcache-tools Makefile expects the man8 directory to exist
20*4882a593Smuzhiyun# expects the /lib/udev/rules.d directory to exist.
21*4882a593Smuzhiyundefine BCACHE_TOOLS_CREATE_MISSING_DIRS
22*4882a593Smuzhiyun	$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8
23*4882a593Smuzhiyun	$(INSTALL) -m 0755 -d $(TARGET_DIR)/lib/udev/rules.d
24*4882a593Smuzhiyunendef
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunBCACHE_TOOLS_PRE_INSTALL_TARGET_HOOKS += BCACHE_TOOLS_CREATE_MISSING_DIRS
27*4882a593Smuzhiyun
28*4882a593Smuzhiyundefine BCACHE_TOOLS_INSTALL_TARGET_CMDS
29*4882a593Smuzhiyun	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
30*4882a593Smuzhiyun		DESTDIR=$(TARGET_DIR) install
31*4882a593Smuzhiyunendef
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun$(eval $(generic-package))
34