1 #############################################################
5 # NOTE: Uses start-stop-daemon in init script, so be sure
6 # to enable that within busybox
8 #############################################################
10 VTUN_SOURCE
:=vtun_
$(VTUN_VERSION
).orig.
tar.gz
11 VTUN_PATCH
:=vtun_
$(VTUN_VERSION
)-1.diff.gz
12 VTUN_SITE
:=$(BR2_DEBIAN_MIRROR
)/debian
/pool
/main
/v
/vtun
13 VTUN_DIR
:=$(BUILD_DIR
)/vtun-
$(VTUN_VERSION
)
16 VTUN_TARGET_BINARY
:=usr
/sbin
/vtund
18 vtun-patched
: $(VTUN_DIR
)/.patched
20 $(DL_DIR
)/$(VTUN_SOURCE
):
21 $(WGET
) -P
$(DL_DIR
) $(VTUN_SITE
)/$(VTUN_SOURCE
)
22 ifneq ($(VTUN_PATCH
),)
23 VTUN_PATCH_FILE
:=$(DL_DIR
)/$(VTUN_PATCH
)
25 $(WGET
) -P
$(DL_DIR
) $(VTUN_SITE
)/$(VTUN_PATCH
)
28 $(VTUN_DIR
)/.patched
: $(DL_DIR
)/$(VTUN_SOURCE
) $(VTUN_PATCH_FILE
)
29 $(VTUN_CAT
) $(DL_DIR
)/$(VTUN_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
30 ifneq ($(VTUN_PATCH_FILE
),)
31 (cd
$(VTUN_DIR
) && $(VTUN_CAT
) $(VTUN_PATCH_FILE
) | patch
-p1
)
32 if
[ -d
$(VTUN_DIR
)/debian
/patches
]; then \
33 toolchain
/patch-kernel.sh
$(VTUN_DIR
) $(VTUN_DIR
)/debian
/patches \
*-\
*; \
36 toolchain
/patch-kernel.sh
$(VTUN_DIR
) package
/vtun
/ vtun\
*$(VTUN_VERSION
)\
*.patch
37 # fakeroot does this for us
38 $(SED
) '/^INSTALL_OWNER/d' $(VTUN_DIR
)/Makefile.in
39 $(CONFIG_UPDATE
) $(@D
)
42 $(VTUN_DIR
)/.configured
: $(VTUN_DIR
)/.patched
43 (cd
$(VTUN_DIR
); rm -rf config.cache
; \
44 $(AUTO_CONFIGURE_TARGET
) \
50 --libexecdir
=/usr
/lib \
52 --datadir=/usr
/share \
53 --localstatedir
=/var \
54 --mandir=/usr
/share
/man \
55 --infodir=/usr
/share
/info \
56 --with-ssl-headers
=$(STAGING_DIR
)/usr
/include/openssl \
57 --with-lzo-headers
=$(STAGING_DIR
)/usr
/include \
58 --with-lzo-lib
=$(STAGING_DIR
)/usr
/lib \
64 $(VTUN_DIR
)/$(VTUN_BINARY
): $(VTUN_DIR
)/.configured
65 $(MAKE
) -C
$(VTUN_DIR
)
67 $(TARGET_DIR
)/$(VTUN_TARGET_BINARY
): $(VTUN_DIR
)/$(VTUN_BINARY
)
68 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(VTUN_DIR
) install
69 rm -rf
$(TARGET_DIR
)/share
/locale
$(TARGET_DIR
)/usr
/share
/doc
70 ifneq ($(BR2_HAVE_MANPAGES
),y
)
71 rm -rf
$(TARGET_DIR
)/usr
/man
73 ifneq ($(BR2_HAVE_INFOPAGES
),y
)
74 rm -rf
$(TARGET_DIR
)/usr
/info
77 vtun
: zlib lzo openssl
$(TARGET_DIR
)/$(VTUN_TARGET_BINARY
)
79 vtun-source
: $(DL_DIR
)/$(VTUN_SOURCE
) $(VTUN_PATCH_FILE
)
82 -$(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(VTUN_DIR
) uninstall
83 -$(MAKE
) -C
$(VTUN_DIR
) clean
88 #############################################################
90 # Toplevel Makefile options
92 #############################################################
93 ifeq ($(BR2_PACKAGE_VTUN
),y
)