2013-05-09 02:55:26 +08:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# lockdev
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2015-03-05 06:31:16 +08:00
|
|
|
LOCKDEV_VERSION_MAJOR = 1
|
|
|
|
LOCKDEV_VERSION = $(LOCKDEV_VERSION_MAJOR).0.3
|
2013-05-09 02:55:26 +08:00
|
|
|
LOCKDEV_SOURCE = lockdev_$(LOCKDEV_VERSION).orig.tar.gz
|
2014-10-23 22:48:33 +08:00
|
|
|
LOCKDEV_PATCH = lockdev_$(LOCKDEV_VERSION)-1.6.diff.gz
|
|
|
|
LOCKDEV_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockdev
|
2017-03-30 21:43:34 +08:00
|
|
|
LOCKDEV_LICENSE = LGPL-2.1
|
2013-05-09 02:55:26 +08:00
|
|
|
LOCKDEV_LICENSE_FILES = LICENSE
|
|
|
|
LOCKDEV_INSTALL_STAGING = YES
|
|
|
|
|
2014-12-04 05:41:29 +08:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2015-01-07 07:06:03 +08:00
|
|
|
LOCKDEV_BUILD_ARGS = static
|
|
|
|
LOCKDEV_INSTALL_ARGS = install_static
|
|
|
|
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
|
|
|
|
LOCKDEV_BUILD_ARGS = static shared
|
|
|
|
LOCKDEV_INSTALL_ARGS = install_run install_static
|
|
|
|
else # BR2_SHARED_LIBS
|
|
|
|
LOCKDEV_BUILD_ARGS = shared
|
|
|
|
LOCKDEV_INSTALL_ARGS = install_run
|
|
|
|
endif
|
|
|
|
|
2015-12-23 04:39:17 +08:00
|
|
|
# Make the code believe we are using a C library compatible with
|
|
|
|
# glibc, which for the purpose of lockdev is actually true.
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
|
|
|
|
LOCKDEV_BUILD_ARGS += CFLAGS="$(TARGET_CFLAGS) -D__GNU_LIBRARY__"
|
|
|
|
endif
|
|
|
|
|
2015-01-07 07:06:03 +08:00
|
|
|
ifeq ($(BR2_SHARED_STATIC_LIBS)$(BR2_SHARED_LIBS),y)
|
|
|
|
define LOCKDEV_CREATE_LINKS_STAGING
|
|
|
|
ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so
|
2015-03-05 06:31:16 +08:00
|
|
|
ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.$(LOCKDEV_VERSION_MAJOR)
|
2013-05-09 02:55:26 +08:00
|
|
|
endef
|
|
|
|
|
2015-01-07 07:06:03 +08:00
|
|
|
define LOCKDEV_CREATE_LINKS_TARGET
|
2015-03-05 06:31:16 +08:00
|
|
|
ln -sf liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so.$(LOCKDEV_VERSION_MAJOR)
|
2013-05-09 02:55:26 +08:00
|
|
|
endef
|
2015-01-07 07:06:03 +08:00
|
|
|
endif
|
2013-05-09 02:55:26 +08:00
|
|
|
|
|
|
|
define LOCKDEV_BUILD_CMDS
|
2015-01-07 07:06:03 +08:00
|
|
|
$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(LOCKDEV_BUILD_ARGS)
|
2013-05-09 02:55:26 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LOCKDEV_INSTALL_STAGING_CMDS
|
2015-01-07 07:06:03 +08:00
|
|
|
$(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) $(LOCKDEV_INSTALL_ARGS) install_dev
|
|
|
|
$(LOCKDEV_CREATE_LINKS_STAGING)
|
2013-05-09 02:55:26 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define LOCKDEV_INSTALL_TARGET_CMDS
|
2015-01-07 07:06:03 +08:00
|
|
|
$(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) $(LOCKDEV_INSTALL_ARGS)
|
|
|
|
$(LOCKDEV_CREATE_LINKS_TARGET)
|
2013-05-09 02:55:26 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|