summaryrefslogtreecommitdiff
path: root/package/rdesktop/rdesktop.mk
blob: c683c22d9ab0471f08ae5a581899a60d4e32822d (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
#############################################################
#
# rdesktop
#
#############################################################

RDESKTOP_VERSION=1.5.0
RDESKTOP_SOURCE=rdesktop-$(RDESKTOP_VERSION).tar.gz
RDESKTOP_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/rdesktop/
RDESKTOP_DIR=$(BUILD_DIR)/rdesktop-$(RDESKTOP_VERSION)
RDESKTOP_CAT:=$(ZCAT)

$(DL_DIR)/$(RDESKTOP_SOURCE):
	$(call DOWNLOAD,$(RDESKTOP_SITE),$(RDESKTOP_SOURCE))

$(RDESKTOP_DIR)/.unpacked: $(DL_DIR)/$(RDESKTOP_SOURCE)
	$(RDESKTOP_CAT) $(DL_DIR)/$(RDESKTOP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	toolchain/patch-kernel.sh $(RDESKTOP_DIR) package/rdesktop/ \*.patch*
	touch $(RDESKTOP_DIR)/.unpacked

$(RDESKTOP_DIR)/.configured: $(RDESKTOP_DIR)/.unpacked
	(cd $(RDESKTOP_DIR); rm -rf config.cache; \
		$(TARGET_CONFIGURE_OPTS) \
		$(TARGET_CONFIGURE_ARGS) \
		./configure $(QUIET) \
		--target=$(GNU_TARGET_NAME) \
		--host=$(GNU_TARGET_NAME) \
		--build=$(GNU_HOST_NAME) \
		--prefix=/usr \
		--with-openssl=$(STAGING_DIR)/usr \
		--sysconfdir=/etc \
	)
	touch $(RDESKTOP_DIR)/.configured

$(RDESKTOP_DIR)/rdesktop: $(RDESKTOP_DIR)/.configured
	$(MAKE) CC=$(TARGET_CC) -C $(RDESKTOP_DIR)

$(TARGET_DIR)/usr/bin/rdesktop: $(RDESKTOP_DIR)/rdesktop
	cp $^ $@

rdesktop: openssl xserver_xorg-server $(TARGET_DIR)/usr/bin/rdesktop

rdesktop-source: $(DL_DIR)/$(RDESKTOP_SOURCE)

rdesktop-clean:
	-$(MAKE) -C $(RDESKTOP_DIR) clean
	rm -f $(TARGET_DIR)/usr/bin/rdesktop

rdesktop-dirclean:
	rm -rf $(RDESKTOP_DIR) $(RDESKTOP_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_RDESKTOP),y)
TARGETS+=rdesktop
endif