add screen
[openwrt.git] / package / openvpn / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openvpn
6 PKG_VERSION:=2.0
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=7401faebc6baee9add32608709c54eec
9
10 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_CAT:=zcat
14 PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
15 PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
16
17 PKG_DEPEND:="openssl, kmod-tun"
18 ifneq ($(BR2_PACKAGE_OPENVPN_LZO),y)
19 DISABLE_LZO:=--disable-lzo
20 else
21 PKG_DEPEND+=", lzo"
22 endif
23
24 ifneq ($(BR2_PACKAGE_OPENVPN_SERVER),y)
25 DISABLE_SERVER:=--disable-server
26 endif
27
28 $(DL_DIR)/$(PKG_SOURCE):
29 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
30
31 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
32 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
33 touch $(PKG_BUILD_DIR)/.unpacked
34
35 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
36 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
37 $(TARGET_CONFIGURE_OPTS) \
38 CFLAGS="$(TARGET_CFLAGS)" \
39 ./configure \
40 --target=$(GNU_TARGET_NAME) \
41 --host=$(GNU_TARGET_NAME) \
42 --build=$(GNU_HOST_NAME) \
43 --prefix=/usr \
44 --exec-prefix=/usr \
45 --bindir=/usr/bin \
46 --sbindir=/usr/sbin \
47 --libexecdir=/usr/lib \
48 --sysconfdir=/etc \
49 --datadir=/usr/share \
50 --localstatedir=/var \
51 --mandir=/usr/man \
52 --infodir=/usr/info \
53 --program-prefix="" \
54 --disable-pthread \
55 --disable-debug \
56 --disable-plugins \
57 --disable-management \
58 --disable-socks \
59 --disable-http \
60 $(DISABLE_LZO) \
61 $(DISABLE_SERVER) \
62 );
63 touch $(PKG_BUILD_DIR)/.configured
64
65 $(PKG_BUILD_DIR)/openvpn: $(PKG_BUILD_DIR)/.configured
66 $(MAKE) -C $(PKG_BUILD_DIR)
67
68 $(PKG_IPK): $(PKG_BUILD_DIR)/openvpn
69 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
70 echo "Depends: $(PKG_DEPEND)" >> $(PKG_IPK_DIR)/CONTROL/control
71 mkdir -p $(PKG_IPK_DIR)/usr/sbin
72 cp $(PKG_BUILD_DIR)/openvpn $(PKG_IPK_DIR)/usr/sbin/
73 $(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
74 mkdir -p $(PACKAGE_DIR)
75 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
76
77 $(IPKG_STATE_DIR)/info/openvpn.list: $(PKG_IPK)
78 $(IPKG) install $(PKG_IPK)
79
80 source: $(DL_DIR)/$(PKG_SOURCE)
81 prepare: $(PKG_BUILD_DIR)/.unpacked
82 compile: $(PKG_IPK)
83 install: $(IPKG_STATE_DIR)/info/openvpn.list
84
85 clean:
86 rm -rf $(PKG_BUILD_DIR)
87 rm -f $(PKG_IPK)
This page took 0.044583 seconds and 5 git commands to generate.