update to 2.2.3
[openwrt.git] / obsolete-buildroot / make / vtun.mk
1 #############################################################
2 #
3 # vtun
4 #
5 # NOTE: Uses start-stop-daemon in init script, so be sure
6 # to enable that within busybox
7 #
8 #############################################################
9 VTUN_SOURCE:=vtun-2.6.tar.gz
10 VTUN_SITE:=http://aleron.dl.sourceforge.net/sourceforge/vtun/
11 VTUN_DIR:=$(BUILD_DIR)/vtun-2.6
12 VTUN_CAT:=zcat
13 VTUN_BINARY:=vtund
14 VTUN_TARGET_BINARY:=usr/sbin/vtund
15 VTUN_PATCH:=$(SOURCE_DIR)/vtun.patch
16
17 $(DL_DIR)/$(VTUN_SOURCE):
18 $(WGET) -P $(DL_DIR) $(VTUN_SITE)/$(VTUN_SOURCE)
19
20 vtun-source: $(DL_DIR)/$(VTUN_SOURCE)
21
22 $(VTUN_DIR)/.unpacked: $(DL_DIR)/$(VTUN_SOURCE)
23 $(VTUN_CAT) $(DL_DIR)/$(VTUN_SOURCE) | tar -C $(BUILD_DIR) -xvf -
24 mv $(BUILD_DIR)/vtun $(VTUN_DIR)
25 cat $(VTUN_PATCH) | patch -p1 -d $(VTUN_DIR)
26 touch $(VTUN_DIR)/.unpacked
27
28 $(VTUN_DIR)/.configured: $(VTUN_DIR)/.unpacked zlib lzo openssl
29 (cd $(VTUN_DIR); rm -rf config.cache; \
30 $(TARGET_CONFIGURE_OPTS) \
31 ./configure \
32 --target=$(GNU_TARGET_NAME) \
33 --host=$(GNU_TARGET_NAME) \
34 --build=$(GNU_HOST_NAME) \
35 --prefix=/usr \
36 --exec-prefix=/usr \
37 --bindir=/usr/bin \
38 --sbindir=/usr/sbin \
39 --libexecdir=/usr/lib \
40 --sysconfdir=/etc \
41 --datadir=/usr/share \
42 --localstatedir=/var \
43 --mandir=/usr/man \
44 --infodir=/usr/info \
45 --with-ssl-headers=$(STAGING_DIR)/include/openssl \
46 --with-lzo-headers=$(STAGING_DIR)/include \
47 );
48 touch $(VTUN_DIR)/.configured
49
50 $(VTUN_DIR)/$(VTUN_BINARY): $(VTUN_DIR)/.configured
51 $(MAKE) -C $(VTUN_DIR)
52
53 $(TARGET_DIR)/$(VTUN_TARGET_BINARY): $(VTUN_DIR)/$(VTUN_BINARY)
54 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(VTUN_DIR) install
55 rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
56 $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
57
58 vtun: uclibc $(TARGET_DIR)/$(VTUN_TARGET_BINARY)
59
60 vtun-clean:
61 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(VTUN_DIR) uninstall
62 -$(MAKE) -C $(VTUN_DIR) clean
63
64 vtun-dirclean:
65 rm -rf $(VTUN_DIR)
66
This page took 0.043457 seconds and 5 git commands to generate.