summaryrefslogtreecommitdiff
path: root/package/lockdev/lockdev.mk
blob: 59561bad4fd8f44986e835521746817f6ddd90cf (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
37
38
39
40
41
42
################################################################################
#
# lockdev
#
################################################################################

LOCKDEV_VERSION = 1.0.3
LOCKDEV_SOURCE = lockdev_$(LOCKDEV_VERSION).orig.tar.gz
LOCKDEV_PATCH = lockdev_$(LOCKDEV_VERSION)-1.6.diff.gz
LOCKDEV_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockdev
LOCKDEV_LICENSE = LGPLv2.1
LOCKDEV_LICENSE_FILES = LICENSE
LOCKDEV_INSTALL_STAGING = YES

ifeq ($(BR2_STATIC_LIBS),y)
define LOCKDEV_BUILD_CMDS
	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static
endef

define LOCKDEV_INSTALL_STAGING_CMDS
	$(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install_dev
endef

else # BR2_STATIC_LIBS

define LOCKDEV_BUILD_CMDS
	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) static shared
endef

define LOCKDEV_INSTALL_STAGING_CMDS
	$(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) install_dev install_run
	ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so
	ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.1
endef

define LOCKDEV_INSTALL_TARGET_CMDS
	$(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) install_run
	ln -sf liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so.1
endef
endif # BR2_STATIC_LIBS

$(eval $(generic-package))