rsync.mk 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #############################################################
  2. #
  3. # rsync
  4. #
  5. #############################################################
  6. RSYNC_VERSION:=2.6.9
  7. RSYNC_SOURCE:=rsync-$(RSYNC_VERSION).tar.gz
  8. RSYNC_SITE:=http://rsync.samba.org/ftp/rsync/
  9. RSYNC_DIR:=$(BUILD_DIR)/rsync-$(RSYNC_VERSION)
  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-source: $(DL_DIR)/$(RSYNC_SOURCE)
  16. $(RSYNC_DIR)/.unpacked: $(DL_DIR)/$(RSYNC_SOURCE)
  17. $(RSYNC_CAT) $(DL_DIR)/$(RSYNC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  18. toolchain/patch-kernel.sh $(RSYNC_DIR) package/rsync/ rsync\*.patch
  19. touch $(RSYNC_DIR)/.unpacked
  20. $(RSYNC_DIR)/.configured: $(RSYNC_DIR)/.unpacked
  21. (cd $(RSYNC_DIR); rm -rf config.cache; \
  22. $(TARGET_CONFIGURE_OPTS) \
  23. $(TARGET_CONFIGURE_ARGS) \
  24. ./configure \
  25. --target=$(GNU_TARGET_NAME) \
  26. --host=$(GNU_TARGET_NAME) \
  27. --build=$(GNU_HOST_NAME) \
  28. --prefix=/usr \
  29. --with-included-popt \
  30. )
  31. touch $(RSYNC_DIR)/.configured
  32. $(RSYNC_DIR)/$(RSYNC_BINARY): $(RSYNC_DIR)/.configured
  33. $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(RSYNC_DIR)
  34. $(TARGET_DIR)/$(RSYNC_TARGET_BINARY): $(RSYNC_DIR)/$(RSYNC_BINARY)
  35. install -D $(RSYNC_DIR)/$(RSYNC_BINARY) $(TARGET_DIR)/$(RSYNC_TARGET_BINARY)
  36. rsync: uclibc $(TARGET_DIR)/$(RSYNC_TARGET_BINARY)
  37. rsync-clean:
  38. rm -f $(TARGET_DIR)/$(RSYNC_TARGET_BINARY)
  39. -$(MAKE) -C $(RSYNC_DIR) clean
  40. rsync-dirclean:
  41. rm -rf $(RSYNC_DIR)
  42. #############################################################
  43. #
  44. # Toplevel Makefile options
  45. #
  46. #############################################################
  47. ifeq ($(strip $(BR2_PACKAGE_RSYNC)),y)
  48. TARGETS+=rsync
  49. endif