[openvpn3][tap-windows6] Initial commit

This commit is contained in:
Robert Schumacher 2018-03-21 02:32:35 -07:00
parent 43c804a59e
commit da9c2e79a5
6 changed files with 87 additions and 1 deletions

View File

@ -1,3 +1,4 @@
Source: asio
Version: 1.12.0
Version: 1.12.0-1
Build-Depends: boost-config, boost-throw-exception, boost-utility, boost-date-time
Description: Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.

View File

@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.0)
project(openvpncli CXX)
find_path(ASIO_HPP asio.hpp)
find_library(MBEDTLS_LIB mbedtls)
find_library(MBEDCRYPTO_LIB mbedcrypto)
find_library(MBEDX509_LIB mbedx509)
include_directories(. ${ASIO_HPP})
add_definitions(-DNOMINMAX -DUSE_ASIO -DUSE_MBEDTLS)
add_library(ovpncli client/ovpncli.cpp)
target_link_libraries(ovpncli PRIVATE Iphlpapi.lib ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB} ${MBEDX509_LIB})
install(
TARGETS ovpncli
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(BUILD_TOOL)
add_executable(cli test/ovpncli/cli.cpp)
target_link_libraries(cli PRIVATE ovpncli)
endif()

4
ports/openvpn3/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: openvpn3
Version: 2018-03-21
Build-Depends: asio, tap-windows6 (windows), mbedtls
Description: a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch.

View File

@ -0,0 +1,37 @@
include(vcpkg_common_functions)
set(VCPKG_LIBRARY_LINKAGE static)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OpenVPN/openvpn3
REF 3d5dd9ee3b4182032044d775de5401fc6a7a63ae
SHA512 6a8ed20662efa576c57f38fb9579c5808f745d44e8cd6a84055bec10a58ede5d27e207a842f79ac6a2f7d986494fbd2415f9d59e2b23bd38e45c68546a227697
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
file(COPY ${SOURCE_PATH}/openvpn DESTINATION ${CURRENT_PACKAGES_DIR}/include/)
file(COPY ${SOURCE_PATH}/client/ovpncli.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/openvpn/)
file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/openvpn/*)
foreach(HEADER IN LISTS HEADERS)
file(READ "${HEADER}" _contents)
string(REPLACE "defined(USE_ASIO)" "1" _contents "${_contents}")
string(REPLACE "#ifdef USE_ASIO\n" "#if 1\n" _contents "${_contents}")
string(REPLACE "defined(USE_MBEDTLS)" "1" _contents "${_contents}")
string(REPLACE "#ifdef USE_MBEDTLS\n" "#if 1\n" _contents "${_contents}")
file(WRITE "${HEADER}" "${_contents}")
endforeach()
file(INSTALL
${SOURCE_PATH}/COPYRIGHT.AGPLV3
DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvpn3 RENAME copyright)

View File

@ -0,0 +1,3 @@
Source: tap-windows6
Version: 9.21.2-0e30f5c
Description: an NDIS 6 implementation of the TAP-Windows driver, used by OpenVPN and other apps. Note: This package only contains the headers for the driver.

View File

@ -0,0 +1,15 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OpenVPN/tap-windows6
REF 0e30f5c13b3c7b0bdd60da915350f653e4c14d92
SHA512 88edecccd4818091f7d70b66f3dfa07146f010a064829dc971abdd0c180ce1f72db9d8f3a1c9f5b4fb3f31e7afe3eadbd7d6f7d711f698e723441d30beaf9e30
HEAD_REF master
)
file(COPY ${SOURCE_PATH}/src/tap-windows.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/)
file(INSTALL
${SOURCE_PATH}/COPYRIGHT.MIT
DESTINATION ${CURRENT_PACKAGES_DIR}/share/tap-windows6 RENAME copyright)