1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- # This file is part of the OpenADK project. OpenADK is copyrighted
- # material, please see the LICENCE file in the top-level directory.
- include $(TOPDIR)/rules.mk
- PKG_NAME:= openvpn
- PKG_VERSION:= 2.1.0
- PKG_RELEASE:= 1
- PKG_MD5SUM:= 452a83326ae198cf961e9ae02539c8fb
- PKG_DESCR:= Open Source VPN solution using SSL
- PKG_SECTION:= net
- PKG_DEPENDS:= kmod-tun
- ifeq ($(ADK_COMPILE_OPENVPN_WITH_OPENSSL),y)
- PKG_DEPENDS+= libopenssl
- PKG_BUILDDEP+= openssl
- endif
- ifneq ($(ADK_COMPILE_OPENVPN_WITH_LZO),y)
- PKG_DEPENDS+= liblzo
- PKG_BUILDDEP+= liblzo
- endif
- PKG_URL:= http://openvpn.net
- PKG_SITES:= http://openvpn.net/release/ \
- ${MASTER_SITE_SOURCEFORGE:=openvpn/}
- include $(TOPDIR)/mk/package.mk
- $(eval $(call PKG_template,OPENVPN,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
- $(eval $(call PKG_template,OPENVPN_EASY_RSA,openvpn-easy-rsa,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
- ifneq ($(ADK_COMPILE_OPENVPN_WITH_OPENSSL),y)
- DISABLE_OPENSSL:=--disable-ssl --disable-crypto
- endif
- ifneq ($(ADK_COMPILE_OPENVPN_WITH_LZO),y)
- DISABLE_LZO:=--disable-lzo
- endif
- ifneq ($(ADK_COMPILE_OPENVPN_WITH_SERVER),y)
- DISABLE_SERVER:=--disable-server
- endif
- ifneq ($(ADK_COMPILE_OPENVPN_WITH_HTTP),y)
- DISABLE_HTTP:=--disable-http
- endif
- ifeq ($(ADK_COMPILE_OPENVPN_WITH_PASSWORD_SAVE),y)
- ENABLE_PASSWORD_SAVE:=--enable-password-save
- endif
- ifeq ($(ADK_COMPILE_OPENVPN_WITH_SMALL),y)
- ENABLE_SMALL:=--enable-small
- endif
- CONFIGURE_ARGS+= --disable-pthread \
- --disable-plugins \
- --disable-management \
- --disable-socks \
- --enable-iproute2 \
- --with-iproute-path=ip \
- --without-ifconfig-path \
- --without-route-path \
- $(DISABLE_LZO) \
- $(DISABLE_OPENSSL) \
- $(DISABLE_SERVER) \
- $(DISABLE_HTTP) \
- $(ENABLE_PASSWORD_SAVE) \
- $(ENABLE_SMALL)
- post-install:
- # main package
- ${INSTALL_DIR} $(IDIR_OPENVPN)/usr/sbin $(IDIR_OPENVPN)/etc/openvpn
- ${INSTALL_BIN} $(WRKINST)/usr/sbin/openvpn $(IDIR_OPENVPN)/usr/sbin/
- $(CP) ./files/openvpn.conf $(IDIR_OPENVPN)/etc/openvpn/
- # subpackage easy-rsa
- ${INSTALL_DIR} $(IDIR_OPENVPN_EASY_RSA)/usr/sbin \
- $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
- touch $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys/index.txt
- $(CP) ./files/serial $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/keys
- $(CP) $(WRKBUILD)/easy-rsa/2.0/{build-*,clean-all,inherit-inter,list-crl,pkitool,revoke-full,sign-req,whichopensslcnf} \
- $(IDIR_OPENVPN_EASY_RSA)/usr/sbin
- ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/openssl.cnf \
- $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/openssl.cnf
- ${INSTALL_DATA} $(WRKBUILD)/easy-rsa/2.0/vars \
- $(IDIR_OPENVPN_EASY_RSA)/etc/easy-rsa/vars
- include ${TOPDIR}/mk/pkg-bottom.mk
|