3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=93528233f1f6d02fc18e2c00f82e0aca
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
)))
20 $(eval
$(call PKG_template
,OPENVPN_EASY_RSA
,openvpn-easy-rsa
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
22 PKG_DEPEND
:="kmod-tun"
24 ifneq ($(BR2_COMPILE_OPENVPN_WITH_OPENSSL
),y
)
25 DISABLE_OPENSSL
:=--disable-ssl
--disable-crypto
27 PKG_DEPEND
+=", libopenssl"
30 ifneq ($(BR2_COMPILE_OPENVPN_WITH_LZO
),y
)
31 DISABLE_LZO
:=--disable-lzo
33 PKG_DEPEND
+=", liblzo"
36 ifneq ($(BR2_COMPILE_OPENVPN_WITH_SERVER
),y
)
37 DISABLE_SERVER
:=--disable-server
39 ifneq ($(BR2_COMPILE_OPENVPN_WITH_HTTP
),y
)
40 DISABLE_HTTP
:=--disable-http
42 ifeq ($(BR2_COMPILE_OPENVPN_WITH_PASSWORD_SAVE
),y
)
43 ENABLE_PASSWORD_SAVE
:=--enable-password-save
45 ifeq ($(BR2_COMPILE_OPENVPN_WITH_SMALL
),y
)
46 ENABLE_SMALL
:=--enable-small
49 $(PKG_BUILD_DIR
)/.configured
:
50 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
51 $(TARGET_CONFIGURE_OPTS
) \
52 CFLAGS
="$(strip $(TARGET_CFLAGS))" \
53 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
54 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
56 --target
=$(GNU_TARGET_NAME
) \
57 --host
=$(GNU_TARGET_NAME
) \
58 --build
=$(GNU_HOST_NAME
) \
64 --datadir=/usr
/share \
65 --includedir=/usr
/include \
66 --infodir=/usr
/share
/info \
68 --libexecdir
=/usr
/lib \
69 --localstatedir
=/var \
70 --mandir=/usr
/share
/man \
73 $(DISABLE_LARGEFILE
) \
80 --disable-management \
86 $(ENABLE_PASSWORD_SAVE
) \
89 touch
$(PKG_BUILD_DIR
)/.configured
91 $(PKG_BUILD_DIR
)/.built
:
92 $(MAKE
) -C
$(PKG_BUILD_DIR
)
93 mkdir
-p
$(PKG_INSTALL_DIR
)
94 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
95 DESTDIR
="$(PKG_INSTALL_DIR)" \
97 touch
$(PKG_BUILD_DIR
)/.built
100 install -d
-m0755
$(IDIR_OPENVPN
)/usr
/sbin
101 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/openvpn
$(IDIR_OPENVPN
)/usr
/sbin
/
102 $(RSTRIP
) $(IDIR_OPENVPN
)
103 echo
"Depends: $(PKG_DEPEND)" >> $(IDIR_OPENVPN
)/CONTROL
/control
104 $(IPKG_BUILD
) $(IDIR_OPENVPN
) $(PACKAGE_DIR
)
106 $(IPKG_OPENVPN_EASY_RSA
):
107 install -d
-m0755
$(IDIR_OPENVPN_EASY_RSA
)/usr
/sbin
$(IDIR_OPENVPN_EASY_RSA
)/etc
/easy-rsa
108 $(CP
) $(PKG_BUILD_DIR
)/easy-rsa
/2.0/{build-
*,clean-all
,inherit-inter
,list-crl
,pkitool
,revoke-full
,sign-req
} $(IDIR_OPENVPN_EASY_RSA
)/usr
/sbin
109 install -m
0644 $(PKG_BUILD_DIR
)/easy-rsa
/2.0/openssl.cnf
$(IDIR_OPENVPN_EASY_RSA
)/etc
/easy-rsa
/openssl.cnf
110 install -m
0644 $(PKG_BUILD_DIR
)/easy-rsa
/2.0/vars
$(IDIR_OPENVPN_EASY_RSA
)/etc
/easy-rsa
/vars
111 $(IPKG_BUILD
) $(IDIR_OPENVPN_EASY_RSA
) $(PACKAGE_DIR
)