mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-30 14:46:31 +00:00
nbd: convert to Makefile.autotools.in format
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
5d4aeeda7e
commit
1b4e71a139
@ -1,77 +1,22 @@
|
|||||||
#############################################################
|
#############################################################
|
||||||
#
|
#
|
||||||
# nbd (client only)
|
# nbd
|
||||||
#
|
#
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
NBD_VERSION = 2.9.11
|
NBD_VERSION = 2.9.11
|
||||||
NBD_SOURCE = nbd-$(NBD_VERSION).tar.bz2
|
NBD_SOURCE = nbd-$(NBD_VERSION).tar.bz2
|
||||||
NBD_CAT:=$(BZCAT)
|
|
||||||
NBD_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nbd/
|
NBD_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nbd/
|
||||||
NBD_DIR=$(BUILD_DIR)/nbd-$(NBD_VERSION)
|
NBD_CONF_OPT = $(if $(BR2_LARGEFILE),--enable-lfs,--disable-lfs)
|
||||||
|
NBD_DEPENDENCIES = libglib2
|
||||||
|
|
||||||
ifeq ($(BR2_NBD_CLIENT),y)
|
$(eval $(call AUTOTARGETS,package,nbd))
|
||||||
NBD_TARGET_BINARY+= $(TARGET_DIR)/sbin/nbd-client
|
|
||||||
|
$(NBD_HOOK_POST_INSTALL): $(NBD_TARGET_INSTALL_TARGET)
|
||||||
|
ifneq ($(BR2_NBD_CLIENT),y)
|
||||||
|
rm -f $(TARGET_DIR)/usr/sbin/nbd-client
|
||||||
endif
|
endif
|
||||||
ifeq ($(BR2_NBD_SERVER),y)
|
ifneq ($(BR2_NBD_SERVER),y)
|
||||||
NBD_TARGET_BINARY+= $(TARGET_DIR)/bin/nbd-server
|
rm -f $(TARGET_DIR)/usr/bin/nbd-server
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(DL_DIR)/$(NBD_SOURCE):
|
|
||||||
$(call DOWNLOAD,$(NBD_SITE),$(NBD_SOURCE))
|
|
||||||
|
|
||||||
$(NBD_DIR)/.unpacked: $(DL_DIR)/$(NBD_SOURCE)
|
|
||||||
$(NBD_CAT) $(DL_DIR)/$(NBD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(NBD_DIR)/.patched: $(NBD_DIR)/.unpacked
|
|
||||||
toolchain/patch-kernel.sh $(NBD_DIR) package/nbd/ nbd\*.patch
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(NBD_DIR)/.configured: $(NBD_DIR)/.patched
|
|
||||||
(cd $(NBD_DIR); rm -rf config.cache; \
|
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
|
||||||
$(TARGET_CONFIGURE_ARGS) \
|
|
||||||
CC=$(TARGET_CC) \
|
|
||||||
./configure $(QUIET) \
|
|
||||||
--target=$(GNU_TARGET_NAME) \
|
|
||||||
--host=$(GNU_TARGET_NAME) \
|
|
||||||
--build=$(GNU_HOST_NAME) \
|
|
||||||
--prefix=/usr \
|
|
||||||
--sysconfdir=/etc \
|
|
||||||
$(if $(BR2_LARGEFILE),--enable-lfs,--disable-lfs) \
|
|
||||||
)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(NBD_DIR)/nbd-client: $(NBD_DIR)/.configured
|
|
||||||
$(MAKE) -C $(NBD_DIR) nbd-client
|
|
||||||
|
|
||||||
$(TARGET_DIR)/sbin/nbd-client: $(NBD_DIR)/nbd-client
|
|
||||||
cp $< $@
|
|
||||||
$(STRIPCMD) $@
|
|
||||||
|
|
||||||
$(NBD_DIR)/nbd-server: $(NBD_DIR)/.configured
|
|
||||||
$(MAKE) -C $(NBD_DIR) nbd-server
|
|
||||||
|
|
||||||
$(TARGET_DIR)/bin/nbd-server: $(NBD_DIR)/nbd-server
|
|
||||||
cp $< $@
|
|
||||||
$(STRIPCMD) $@
|
|
||||||
|
|
||||||
nbd: libglib2 $(NBD_TARGET_BINARY)
|
|
||||||
|
|
||||||
nbd-source: $(DL_DIR)/$(NBD_SOURCE)
|
|
||||||
|
|
||||||
nbd-clean:
|
|
||||||
rm -f $(NBD_TARGET_BINARY)
|
|
||||||
-$(MAKE) -C $(NBD_DIR) clean
|
|
||||||
|
|
||||||
nbd-dirclean:
|
|
||||||
rm -rf $(NBD_DIR)
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
# Toplevel Makefile options
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
ifeq ($(BR2_PACKAGE_NBD),y)
|
|
||||||
TARGETS+=nbd
|
|
||||||
endif
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user