rsync.mk 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #############################################################
  2. #
  3. # rsync
  4. #
  5. #############################################################
  6. RSYNC_VER:=2.6.3
  7. RSYNC_SOURCE:=rsync-$(RSYNC_VER).tar.gz
  8. RSYNC_SITE:=http://rsync.samba.org/ftp/rsync/
  9. RSYNC_DIR:=$(BUILD_DIR)/rsync-$(RSYNC_VER)
  10. RSYNC_CAT:=zcat
  11. RSYNC_BINARY:=rsync
  12. RSYNC_TARGET_BINARY:=usr/bin/rsync
  13. $(DL_DIR)/$(RSYNC_SOURCE):
  14. $(WGET) -P $(DL_DIR) $(RSYNC_SITE)/$(RSYNC_SOURCE)
  15. $(RSYNC_DIR)/.unpacked: $(DL_DIR)/$(RSYNC_SOURCE)
  16. $(RSYNC_CAT) $(DL_DIR)/$(RSYNC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  17. toolchain/patch-kernel.sh $(RSYNC_DIR) package/rsync/ rsync*.patch
  18. touch $(RSYNC_DIR)/.unpacked
  19. $(RSYNC_DIR)/.configured: $(RSYNC_DIR)/.unpacked
  20. (cd $(RSYNC_DIR); rm -rf config.cache; \
  21. $(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \
  22. CFLAGS="$(TARGET_CFLAGS)" \
  23. ./configure \
  24. --target=$(GNU_TARGET_NAME) \
  25. --host=$(GNU_TARGET_NAME) \
  26. --build=$(GNU_HOST_NAME) \
  27. --prefix=/usr \
  28. --with-included-popt \
  29. );
  30. touch $(RSYNC_DIR)/.configured
  31. $(RSYNC_DIR)/$(RSYNC_BINARY): $(RSYNC_DIR)/.configured
  32. $(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(RSYNC_DIR)
  33. $(TARGET_DIR)/$(RSYNC_TARGET_BINARY): $(RSYNC_DIR)/$(RSYNC_BINARY)
  34. install -D $(RSYNC_DIR)/$(RSYNC_BINARY) $(TARGET_DIR)/$(RSYNC_TARGET_BINARY)
  35. rsync: uclibc $(TARGET_DIR)/$(RSYNC_TARGET_BINARY)
  36. rsync-clean:
  37. rm -f $(TARGET_DIR)/$(RSYNC_TARGET_BINARY)
  38. -$(MAKE) -C $(RSYNC_DIR) clean
  39. rsync-dirclean:
  40. rm -rf $(RSYNC_DIR)
  41. #############################################################
  42. #
  43. # Toplevel Makefile options
  44. #
  45. #############################################################
  46. ifeq ($(strip $(BR2_PACKAGE_RSYNC)),y)
  47. TARGETS+=rsync
  48. endif