nfs swap patch; bzip loader
[openwrt.git] / obsolete-buildroot / make / openvpn.mk
1 #############################################################
2 #
3 # openvpn
4 #
5 # NOTE: Uses start-stop-daemon in init script, so be sure
6 # to enable that within busybox
7 #
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
12 OPENVPN_CAT:=zcat
13 OPENVPN_BINARY:=openvpn
14 OPENVPN_TARGET_BINARY:=usr/sbin/openvpn
15 #OPENVPN_PATCH:=$(SOURCE_DIR)/openvpn.patch
16
17 $(DL_DIR)/$(OPENVPN_SOURCE):
18 $(WGET) -P $(DL_DIR) $(OPENVPN_SITE)/$(OPENVPN_SOURCE)
19
20 openvpn-source: $(DL_DIR)/$(OPENVPN_SOURCE)
21
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
26
27 $(OPENVPN_DIR)/.configured: $(OPENVPN_DIR)/.unpacked
28 (cd $(OPENVPN_DIR); rm -rf config.cache; \
29 $(TARGET_CONFIGURE_OPTS) \
30 CFLAGS="$(TARGET_CFLAGS)" \
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 --program-prefix="" \
46 --enable-pthread \
47 );
48 touch $(OPENVPN_DIR)/.configured
49
50 $(OPENVPN_DIR)/$(OPENVPN_BINARY): $(OPENVPN_DIR)/.configured
51 $(MAKE) -C $(OPENVPN_DIR)
52
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
59
60 openvpn: uclibc lzo openssl $(TARGET_DIR)/$(OPENVPN_TARGET_BINARY)
61
62 openvpn-clean:
63 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(OPENVPN_DIR) uninstall
64 -$(MAKE) -C $(OPENVPN_DIR) clean
65
66 openvpn-dirclean:
67 rm -rf $(OPENVPN_DIR)
68
This page took 0.048269 seconds and 5 git commands to generate.