update tor to latest stable release (v0.1.0.17)
[openwrt.git] / openwrt / package / openvpn / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openvpn
6 PKG_VERSION:=2.0.5
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=4bd7a42991c93db23842a0992debe53b
9
10 PKG_SOURCE_URL:=http://openvpn.net/release @SF/openvpn
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,OPENVPN,openvpn,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 PKG_DEPEND:="kmod-tun"
22
23 ifneq ($(BR2_COMPILE_OPENVPN_WITH_OPENSSL),y)
24 DISABLE_OPENSSL:=--disable-ssl --disable-crypto
25 else
26 PKG_DEPEND+=", libopenssl"
27 endif
28
29 ifneq ($(BR2_COMPILE_OPENVPN_WITH_LZO),y)
30 DISABLE_LZO:=--disable-lzo
31 else
32 PKG_DEPEND+=", liblzo"
33 endif
34
35 ifneq ($(BR2_COMPILE_OPENVPN_WITH_SERVER),y)
36 DISABLE_SERVER:=--disable-server
37 endif
38 ifneq ($(BR2_COMPILE_OPENVPN_WITH_HTTP),y)
39 DISABLE_HTTP:=--disable-http
40 endif
41
42 $(PKG_BUILD_DIR)/.configured:
43 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
44 $(TARGET_CONFIGURE_OPTS) \
45 CFLAGS="$(strip $(TARGET_CFLAGS))" \
46 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
47 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
48 ./configure \
49 --target=$(GNU_TARGET_NAME) \
50 --host=$(GNU_TARGET_NAME) \
51 --build=$(GNU_HOST_NAME) \
52 --program-prefix="" \
53 --program-suffix="" \
54 --prefix=/usr \
55 --exec-prefix=/usr \
56 --bindir=/usr/bin \
57 --datadir=/usr/share \
58 --includedir=/usr/include \
59 --infodir=/usr/share/info \
60 --libdir=/usr/lib \
61 --libexecdir=/usr/lib \
62 --localstatedir=/var \
63 --mandir=/usr/share/man \
64 --sbindir=/usr/sbin \
65 --sysconfdir=/etc \
66 $(DISABLE_LARGEFILE) \
67 $(DISABLE_NLS) \
68 --enable-shared \
69 --disable-static \
70 --disable-pthread \
71 --disable-debug \
72 --disable-plugins \
73 --disable-management \
74 --disable-socks \
75 $(DISABLE_LZO) \
76 $(DISABLE_OPENSSL) \
77 $(DISABLE_SERVER) \
78 $(DISABLE_HTTP) \
79 );
80 touch $(PKG_BUILD_DIR)/.configured
81
82 $(PKG_BUILD_DIR)/.built:
83 $(MAKE) -C $(PKG_BUILD_DIR)
84 mkdir -p $(PKG_INSTALL_DIR)
85 $(MAKE) -C $(PKG_BUILD_DIR) \
86 DESTDIR="$(PKG_INSTALL_DIR)" \
87 install
88 touch $(PKG_BUILD_DIR)/.built
89
90 $(IPKG_OPENVPN):
91 install -d -m0755 $(IDIR_OPENVPN)/usr/sbin
92 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
93 $(RSTRIP) $(IDIR_OPENVPN)
94 echo "Depends: $(PKG_DEPEND)" >> $(IDIR_OPENVPN)/CONTROL/control
95 $(IPKG_BUILD) $(IDIR_OPENVPN) $(PACKAGE_DIR)
96
This page took 0.04879 seconds and 5 git commands to generate.