1 #############################################################
5 # NOTE: Uses start-stop-daemon in init script, so be sure
6 # to enable that within busybox
8 #############################################################
9 OPENVPN_SOURCE
:=openvpn-1.5
.0.
tar.gz
10 OPENVPN_SITE
:=http
://aleron.dl.sourceforge.net
/sourceforge
/openvpn
/
11 OPENVPN_DIR
:=$(BUILD_DIR
)/openvpn-1.5
.0
13 OPENVPN_BINARY
:=openvpn
14 OPENVPN_TARGET_BINARY
:=usr
/sbin
/openvpn
15 #OPENVPN_PATCH:=$(SOURCE_DIR)/openvpn.patch
17 $(DL_DIR
)/$(OPENVPN_SOURCE
):
18 $(WGET
) -P
$(DL_DIR
) $(OPENVPN_SITE
)/$(OPENVPN_SOURCE
)
20 openvpn-source
: $(DL_DIR
)/$(OPENVPN_SOURCE
)
22 $(OPENVPN_DIR
)/.unpacked
: $(DL_DIR
)/$(OPENVPN_SOURCE
)
23 $(OPENVPN_CAT
) $(DL_DIR
)/$(OPENVPN_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
24 #cat $(OPENVPN_PATCH) | patch -p1 -d $(OPENVPN_DIR)
25 touch
$(OPENVPN_DIR
)/.unpacked
27 $(OPENVPN_DIR
)/.configured
: $(OPENVPN_DIR
)/.unpacked
28 (cd
$(OPENVPN_DIR
); rm -rf config.cache
; \
29 $(TARGET_CONFIGURE_OPTS
) \
30 CFLAGS
="$(TARGET_CFLAGS)" \
32 --target
=$(GNU_TARGET_NAME
) \
33 --host
=$(GNU_TARGET_NAME
) \
34 --build
=$(GNU_HOST_NAME
) \
39 --libexecdir
=/usr
/lib \
41 --datadir=/usr
/share \
42 --localstatedir
=/var \
48 touch
$(OPENVPN_DIR
)/.configured
50 $(OPENVPN_DIR
)/$(OPENVPN_BINARY
): $(OPENVPN_DIR
)/.configured
51 $(MAKE
) -C
$(OPENVPN_DIR
)
53 $(TARGET_DIR
)/$(OPENVPN_TARGET_BINARY
): $(OPENVPN_DIR
)/$(OPENVPN_BINARY
)
54 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(OPENVPN_DIR
) install
55 mkdir
-p
$(TARGET_DIR
)/etc
/openvpn
56 cp
$(SOURCE_DIR
)/openvpn
$(TARGET_DIR
)/etc
/init.d
/openvpn
57 rm -rf
$(TARGET_DIR
)/share
/locale
$(TARGET_DIR
)/usr
/info \
58 $(TARGET_DIR
)/usr
/man
$(TARGET_DIR
)/usr
/share
/doc
60 openvpn
: uclibc lzo openssl
$(TARGET_DIR
)/$(OPENVPN_TARGET_BINARY
)
63 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(OPENVPN_DIR
) uninstall
64 -$(MAKE
) -C
$(OPENVPN_DIR
) clean