1 ################################################################################
5 ################################################################################
7 LOCKDEV_VERSION_MAJOR
= 1
8 LOCKDEV_VERSION
= $(LOCKDEV_VERSION_MAJOR
).0.3
9 LOCKDEV_SOURCE
= lockdev_
$(LOCKDEV_VERSION
).orig.
tar.gz
10 LOCKDEV_PATCH
= lockdev_
$(LOCKDEV_VERSION
)-1.6.diff.gz
11 LOCKDEV_SITE
= http
://snapshot.debian.org
/archive
/debian
/20141023T043132Z
/pool
/main
/l
/lockdev
12 LOCKDEV_LICENSE
= LGPLv2.1
13 LOCKDEV_LICENSE_FILES
= LICENSE
14 LOCKDEV_INSTALL_STAGING
= YES
16 ifeq ($(BR2_STATIC_LIBS
),y
)
17 LOCKDEV_BUILD_ARGS
= static
18 LOCKDEV_INSTALL_ARGS
= install_static
19 else ifeq ($(BR2_SHARED_STATIC_LIBS
),y
)
20 LOCKDEV_BUILD_ARGS
= static shared
21 LOCKDEV_INSTALL_ARGS
= install_run install_static
22 else # BR2_SHARED_LIBS
23 LOCKDEV_BUILD_ARGS
= shared
24 LOCKDEV_INSTALL_ARGS
= install_run
27 # Make the code believe we are using a C library compatible with
28 # glibc, which for the purpose of lockdev is actually true.
29 ifeq ($(BR2_TOOLCHAIN_USES_MUSL
),y
)
30 LOCKDEV_BUILD_ARGS
+= CFLAGS
="$(TARGET_CFLAGS) -D__GNU_LIBRARY__"
33 ifeq ($(BR2_SHARED_STATIC_LIBS
)$(BR2_SHARED_LIBS
),y
)
34 define LOCKDEV_CREATE_LINKS_STAGING
35 ln
-sf liblockdev.
$(LOCKDEV_VERSION
).so
$(STAGING_DIR
)/usr
/lib
/liblockdev.so
36 ln
-sf liblockdev.
$(LOCKDEV_VERSION
).so
$(STAGING_DIR
)/usr
/lib
/liblockdev.so.
$(LOCKDEV_VERSION_MAJOR
)
39 define LOCKDEV_CREATE_LINKS_TARGET
40 ln
-sf liblockdev.
$(LOCKDEV_VERSION
).so
$(TARGET_DIR
)/usr
/lib
/liblockdev.so.
$(LOCKDEV_VERSION_MAJOR
)
44 define LOCKDEV_BUILD_CMDS
45 $(MAKE1
) $(TARGET_CONFIGURE_OPTS
) -C
$(@D
) $(LOCKDEV_BUILD_ARGS
)
48 define LOCKDEV_INSTALL_STAGING_CMDS
49 $(MAKE1
) basedir
=$(STAGING_DIR
)/usr
-C
$(@D
) $(LOCKDEV_INSTALL_ARGS
) install_dev
50 $(LOCKDEV_CREATE_LINKS_STAGING
)
53 define LOCKDEV_INSTALL_TARGET_CMDS
54 $(MAKE1
) basedir
=$(TARGET_DIR
)/usr
-C
$(@D
) $(LOCKDEV_INSTALL_ARGS
)
55 $(LOCKDEV_CREATE_LINKS_TARGET
)
58 $(eval
$(generic-package
))