copy trunk to buildroot-ng branch
[openwrt.git] / package / openvpn / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=openvpn
6 PKG_VERSION:=2.0.6
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=8d2f95fa825e58363a676b25d4815aa7
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 ifeq ($(BR2_COMPILE_OPENVPN_WITH_PASSWORD_SAVE),y)
42 ENABLE_PASSWORD_SAVE:=--enable-password-save
43 endif
44 ifeq ($(BR2_COMPILE_OPENVPN_WITH_SMALL),y)
45 ENABLE_SMALL:=--enable-small
46 endif
47
48 $(PKG_BUILD_DIR)/.configured:
49 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
50 $(TARGET_CONFIGURE_OPTS) \
51 CFLAGS="$(strip $(TARGET_CFLAGS))" \
52 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
53 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
54 ./configure \
55 --target=$(GNU_TARGET_NAME) \
56 --host=$(GNU_TARGET_NAME) \
57 --build=$(GNU_HOST_NAME) \
58 --program-prefix="" \
59 --program-suffix="" \
60 --prefix=/usr \
61 --exec-prefix=/usr \
62 --bindir=/usr/bin \
63 --datadir=/usr/share \
64 --includedir=/usr/include \
65 --infodir=/usr/share/info \
66 --libdir=/usr/lib \
67 --libexecdir=/usr/lib \
68 --localstatedir=/var \
69 --mandir=/usr/share/man \
70 --sbindir=/usr/sbin \
71 --sysconfdir=/etc \
72 $(DISABLE_LARGEFILE) \
73 $(DISABLE_NLS) \
74 --enable-shared \
75 --disable-static \
76 --disable-pthread \
77 --disable-debug \
78 --disable-plugins \
79 --disable-management \
80 --disable-socks \
81 $(DISABLE_LZO) \
82 $(DISABLE_OPENSSL) \
83 $(DISABLE_SERVER) \
84 $(DISABLE_HTTP) \
85 $(ENABLE_PASSWORD_SAVE) \
86 $(ENABLE_SMALL) \
87 );
88 touch $(PKG_BUILD_DIR)/.configured
89
90 $(PKG_BUILD_DIR)/.built:
91 $(MAKE) -C $(PKG_BUILD_DIR)
92 mkdir -p $(PKG_INSTALL_DIR)
93 $(MAKE) -C $(PKG_BUILD_DIR) \
94 DESTDIR="$(PKG_INSTALL_DIR)" \
95 install
96 touch $(PKG_BUILD_DIR)/.built
97
98 $(IPKG_OPENVPN):
99 install -d -m0755 $(IDIR_OPENVPN)/usr/sbin
100 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
101 $(RSTRIP) $(IDIR_OPENVPN)
102 echo "Depends: $(PKG_DEPEND)" >> $(IDIR_OPENVPN)/CONTROL/control
103 $(IPKG_BUILD) $(IDIR_OPENVPN) $(PACKAGE_DIR)
104
This page took 0.05825 seconds and 5 git commands to generate.