2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-02-12 11:40:28 +01:00
|
|
|
#
|
|
|
|
# bzip2
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-06-08 07:30:46 +02:00
|
|
|
|
|
|
|
BZIP2_VERSION = 1.0.6
|
|
|
|
BZIP2_SITE = http://www.bzip.org/$(BZIP2_VERSION)
|
|
|
|
BZIP2_INSTALL_STAGING = YES
|
2012-05-17 19:33:13 +02:00
|
|
|
BZIP2_LICENSE = bzip2 license
|
|
|
|
BZIP2_LICENSE_FILES = LICENSE
|
2003-03-10 21:48:19 +01:00
|
|
|
|
2013-05-27 15:00:59 +02:00
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),)
|
|
|
|
define BZIP2_BUILD_SHARED_CMDS
|
|
|
|
$(TARGET_MAKE_ENV)
|
|
|
|
$(MAKE) -C $(@D) -f Makefile-libbz2_so $(TARGET_CONFIGURE_OPTS)
|
2010-03-02 22:29:52 +01:00
|
|
|
endef
|
2013-05-27 15:00:59 +02:00
|
|
|
endif
|
2003-02-12 11:40:28 +01:00
|
|
|
|
2013-05-27 15:00:59 +02:00
|
|
|
define BZIP2_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV)
|
|
|
|
$(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover $(TARGET_CONFIGURE_OPTS)
|
|
|
|
$(BZIP2_BUILD_SHARED_CMDS)
|
2010-03-02 22:29:52 +01:00
|
|
|
endef
|
2003-03-10 21:48:19 +01:00
|
|
|
|
2013-05-27 15:00:59 +02:00
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),)
|
|
|
|
define BZIP2_INSTALL_STAGING_SHARED_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) \
|
|
|
|
-f Makefile-libbz2_so PREFIX=$(STAGING_DIR)/usr -C $(@D) install
|
|
|
|
endef
|
2003-12-03 02:16:29 +01:00
|
|
|
endif
|
2003-03-10 21:48:19 +01:00
|
|
|
|
2013-05-27 15:00:59 +02:00
|
|
|
define BZIP2_INSTALL_STAGING_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) \
|
|
|
|
PREFIX=$(STAGING_DIR)/usr -C $(@D) install
|
|
|
|
$(BZIP2_INSTALL_STAGING_SHARED_CMDS)
|
2010-03-02 22:29:52 +01:00
|
|
|
endef
|
|
|
|
|
2013-05-27 15:00:59 +02:00
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),)
|
|
|
|
define BZIP2_INSTALL_TARGET_SHARED_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) \
|
|
|
|
-f Makefile-libbz2_so PREFIX=$(TARGET_DIR)/usr -C $(@D) install
|
2010-03-02 22:29:52 +01:00
|
|
|
endef
|
2013-05-27 15:00:59 +02:00
|
|
|
endif
|
2003-03-10 21:48:19 +01:00
|
|
|
|
2010-07-07 23:34:32 +02:00
|
|
|
# make sure busybox doesn't get overwritten by make install
|
2010-05-03 15:07:05 +02:00
|
|
|
define BZIP2_INSTALL_TARGET_CMDS
|
2010-07-07 23:34:32 +02:00
|
|
|
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,bzip2 bunzip2 bzcat)
|
2013-05-27 15:00:59 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) \
|
|
|
|
PREFIX=$(TARGET_DIR)/usr -C $(@D) install
|
|
|
|
$(BZIP2_INSTALL_TARGET_SHARED_CMDS)
|
2010-03-02 22:29:52 +01:00
|
|
|
endef
|
2003-02-12 11:40:28 +01:00
|
|
|
|
2010-03-02 22:29:52 +01:00
|
|
|
define HOST_BZIP2_BUILD_CMDS
|
2013-05-27 15:00:59 +02:00
|
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \
|
|
|
|
$(MAKE) -C $(@D) -f Makefile-libbz2_so
|
|
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \
|
|
|
|
$(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover
|
2010-03-02 22:29:52 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_BZIP2_INSTALL_CMDS
|
|
|
|
$(HOST_MAKE_ENV) \
|
2013-05-27 15:00:59 +02:00
|
|
|
$(MAKE) PREFIX=$(HOST_DIR)/usr -C $(@D) install
|
2014-07-10 14:00:26 +02:00
|
|
|
$(HOST_MAKE_ENV) \
|
|
|
|
$(MAKE) -f Makefile-libbz2_so PREFIX=$(HOST_DIR)/usr -C $(@D) install
|
2010-03-02 22:29:52 +01:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|
2012-07-03 00:06:54 +02:00
|
|
|
$(eval $(host-generic-package))
|