aboutsummaryrefslogtreecommitdiff
path: root/package/rsync/rsync.mk
blob: 454f30c4ba5609b679cd1b5ff680d31c8995e813 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#############################################################
#
# rsync
#
#############################################################
RSYNC_VERSION:=2.6.9
RSYNC_SOURCE:=rsync-$(RSYNC_VERSION).tar.gz
RSYNC_SITE:=http://rsync.samba.org/ftp/rsync/
RSYNC_DIR:=$(BUILD_DIR)/rsync-$(RSYNC_VERSION)
RSYNC_CAT:=$(ZCAT)
RSYNC_BINARY:=rsync
RSYNC_TARGET_BINARY:=usr/bin/rsync

$(DL_DIR)/$(RSYNC_SOURCE):
	$(WGET) -P $(DL_DIR) $(RSYNC_SITE)/$(RSYNC_SOURCE)

rsync-source: $(DL_DIR)/$(RSYNC_SOURCE)

$(RSYNC_DIR)/.unpacked: $(DL_DIR)/$(RSYNC_SOURCE)
	$(RSYNC_CAT) $(DL_DIR)/$(RSYNC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	toolchain/patch-kernel.sh $(RSYNC_DIR) package/rsync/ rsync\*.patch
	touch $(RSYNC_DIR)/.unpacked

$(RSYNC_DIR)/.configured: $(RSYNC_DIR)/.unpacked
	(cd $(RSYNC_DIR); rm -rf config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		$(TARGET_CONFIGURE_ARGS) \
		./configure \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/usr \
		--with-included-popt \
	)
	touch $(RSYNC_DIR)/.configured

$(RSYNC_DIR)/$(RSYNC_BINARY): $(RSYNC_DIR)/.configured
	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(RSYNC_DIR)

$(TARGET_DIR)/$(RSYNC_TARGET_BINARY): $(RSYNC_DIR)/$(RSYNC_BINARY)
	install -D $(RSYNC_DIR)/$(RSYNC_BINARY) $(TARGET_DIR)/$(RSYNC_TARGET_BINARY)

rsync: uclibc $(TARGET_DIR)/$(RSYNC_TARGET_BINARY)

rsync-clean:
	rm -f $(TARGET_DIR)/$(RSYNC_TARGET_BINARY)
	-$(MAKE) -C $(RSYNC_DIR) clean

rsync-dirclean:
	rm -rf $(RSYNC_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_RSYNC)),y)
TARGETS+=rsync
endif