3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=8d2f95fa825e58363a676b25d4815aa7
10 PKG_SOURCE_URL
:=http
://openvpn.net
/release @SF
/openvpn
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 include $(TOPDIR
)/package
/rules.mk
19 $(eval
$(call PKG_template
,OPENVPN
,openvpn
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
21 PKG_DEPEND
:="kmod-tun"
23 ifneq ($(BR2_COMPILE_OPENVPN_WITH_OPENSSL
),y
)
24 DISABLE_OPENSSL
:=--disable-ssl
--disable-crypto
26 PKG_DEPEND
+=", libopenssl"
29 ifneq ($(BR2_COMPILE_OPENVPN_WITH_LZO
),y
)
30 DISABLE_LZO
:=--disable-lzo
32 PKG_DEPEND
+=", liblzo"
35 ifneq ($(BR2_COMPILE_OPENVPN_WITH_SERVER
),y
)
36 DISABLE_SERVER
:=--disable-server
38 ifneq ($(BR2_COMPILE_OPENVPN_WITH_HTTP
),y
)
39 DISABLE_HTTP
:=--disable-http
41 ifeq ($(BR2_COMPILE_OPENVPN_WITH_PASSWORD_SAVE
),y
)
42 ENABLE_PASSWORD_SAVE
:=--enable-password-save
44 ifeq ($(BR2_COMPILE_OPENVPN_WITH_SMALL
),y
)
45 ENABLE_SMALL
:=--enable-small
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" \
55 --target
=$(GNU_TARGET_NAME
) \
56 --host
=$(GNU_TARGET_NAME
) \
57 --build
=$(GNU_HOST_NAME
) \
63 --datadir=/usr
/share \
64 --includedir=/usr
/include \
65 --infodir=/usr
/share
/info \
67 --libexecdir
=/usr
/lib \
68 --localstatedir
=/var \
69 --mandir=/usr
/share
/man \
72 $(DISABLE_LARGEFILE
) \
79 --disable-management \
85 $(ENABLE_PASSWORD_SAVE
) \
88 touch
$(PKG_BUILD_DIR
)/.configured
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)" \
96 touch
$(PKG_BUILD_DIR
)/.built
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
)