OpenVPNAdapter/OpenVPNAdapter.podspec

136 lines
6.5 KiB
Plaintext
Raw Normal View History

2018-07-18 21:13:32 +08:00
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "OpenVPNAdapter"
2018-10-18 16:11:35 +08:00
s.version = "0.1.0"
s.summary = "Objective-C wrapper for OpenVPN library. Compatible with iOS and macOS."
2018-07-18 21:13:32 +08:00
s.description = <<-DESC
2018-10-18 16:11:35 +08:00
OpenVPNAdapter is an Objective-C framework that allows to easily configure and establish VPN connection using OpenVPN protocol. It is based on the original openvpn3 library so it has every feature the library has.
The framework is designed to use in conjunction with NetworkExtension framework and doesn't use any private Apple API. Compatible with iOS and macOS and also Swift friendly
DESC
2018-07-18 21:13:32 +08:00
2018-10-18 16:57:20 +08:00
s.homepage = "https://github.com/ss-abramchuk/OpenVPNAdapter"
2018-07-18 21:13:32 +08:00
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
2018-10-18 16:11:35 +08:00
s.license = "AGPLv3"
2018-07-18 21:13:32 +08:00
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.author = { "Sergey Abramchuk" => "personal@ss-abramchuk.me" }
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
2018-10-18 16:11:35 +08:00
s.ios.deployment_target = "9.0"
s.osx.deployment_target = "10.11"
2018-07-18 21:13:32 +08:00
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
2018-10-18 16:57:20 +08:00
s.source = { :git => "https://github.com/ss-abramchuk/OpenVPNAdapter.git", :branch => "develop" }
2018-07-18 21:13:32 +08:00
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
2018-10-18 16:11:35 +08:00
s.source_files = "Sources/OpenVPNAdapter/*.{h,m,mm}"
2018-07-18 21:13:32 +08:00
2018-10-18 16:11:35 +08:00
s.public_header_files = "Sources/OpenVPNAdapter/*.h"
2018-10-18 16:57:20 +08:00
s.private_header_files = [
"Sources/OpenVPNAdapter/*+Internal.h",
"Sources/OpenVPNAdapter/OpenVPNReachabilityTracker.h",
"Sources/OpenVPNAdapter/OpenVPNClient.h",
"Sources/OpenVPNAdapter/OpenVPNNetworkSettingsBuilder.h",
"Sources/OpenVPNAdapter/OpenVPNPacket.h",
"Sources/OpenVPNAdapter/OpenVPNPacketFlowBridge.h",
"Sources/OpenVPNAdapter/NSError+OpenVPNError.h",
"Sources/OpenVPNAdapter/NSArray+OpenVPNAdditions.h"
]
2018-07-18 21:13:32 +08:00
2018-10-18 16:11:35 +08:00
s.module_map = "Configuration/OpenVPNAdapter.modulemap"
2018-07-18 21:13:32 +08:00
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
# s.resource = "icon.png"
# s.resources = "Resources/*.png"
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
2018-10-18 16:11:35 +08:00
s.ios.frameworks = "UIKit", "NetworkExtension", "SystemConfiguration"
s.osx.frameworks = "NetworkExtension", "SystemConfiguration"
2018-07-18 21:13:32 +08:00
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
2018-10-18 16:11:35 +08:00
s.requires_arc = true
2018-10-18 20:52:25 +08:00
s.xcconfig = {
"APPLICATION_EXTENSION_API_ONLY" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "gnu++14",
"CLANG_CXX_LIBRARY" => "libc++",
"GCC_WARN_64_TO_32_BIT_CONVERSION" => "NO"
}
2018-10-18 16:11:35 +08:00
# ――― Subspecs ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
2018-07-18 21:13:32 +08:00
2018-10-18 20:52:25 +08:00
vendors_path = "Sources/OpenVPNAdapter/Libraries/Vendors"
2018-10-18 18:11:09 +08:00
# s.subspec 'lz4' do |lz4|
# lz4.ios.vendored_library = "Sources/OpenVPNAdapter/Libraries/Vendors/lz4/lib/ios/liblz4.a"
# lz4.osx.vendored_library = "Sources/OpenVPNAdapter/Libraries/Vendors/lz4/lib/macos/liblz4.a"
2018-10-18 16:57:20 +08:00
# end
2018-10-18 18:11:09 +08:00
#
# s.subspec 'mbedtls' do |mbedtls|
# mbedtls.preserve_paths = "Sources/OpenVPNAdapter/Libraries/Vendors/mbedtls/include/mbedtls/*.h"
# mbedtls.ios.vendored_libraries = [
# "Sources/OpenVPNAdapter/Libraries/Vendors/mbedtls/lib/ios/libmbedcrypto.a",
# "Sources/OpenVPNAdapter/Libraries/Vendors/mbedtls/lib/ios/libmbedtls.a",
# "Sources/OpenVPNAdapter/Libraries/Vendors/mbedtls/lib/ios/libmbedx509.a"
# ]
# mbedtls.osx.vendored_libraries = [
# "Sources/OpenVPNAdapter/Libraries/Vendors/mbedtls/lib/macos/libmbedcrypto.a",
# "Sources/OpenVPNAdapter/Libraries/Vendors/mbedtls/lib/macos/libmbedtls.a",
# "Sources/OpenVPNAdapter/Libraries/Vendors/mbedtls/lib/macos/libmbedx509.a"
# ]
# end
s.subspec 'asio' do |asio|
2018-10-18 20:52:25 +08:00
asio_path = "#{vendors_path}/asio"
asio.preserve_paths = "#{asio_path}/asio/include/**/*.{hpp,ipp}"
asio.xcconfig = { "HEADER_SEARCH_PATHS" => "${PODS_ROOT}/#{s.name}/#{asio_path}/asio/include/**" }
2018-10-18 18:11:09 +08:00
end
s.subspec 'openvpn3' do |openvpn|
2018-10-18 20:52:25 +08:00
openvpn_path = "#{vendors_path}/openvpn"
2018-10-18 18:11:09 +08:00
openvpn.source_files = "#{openvpn_path}/client/*.{hpp,cpp}"
openvpn.preserve_paths = "#{openvpn_path}/openvpn/**/*.hpp"
2018-10-18 20:52:25 +08:00
openvpn.xcconfig = {
"HEADER_SEARCH_PATHS" => "${PODS_ROOT}/#{s.name}/#{openvpn_path}/**",
"OTHER_CPLUSPLUSFLAGS" => "$(OTHER_CFLAGS) -DUSE_ASIO -DUSE_ASIO_THREADLOCAL -DASIO_STANDALONE -DASIO_NO_DEPRECATED -DHAVE_LZ4 -DUSE_MBEDTLS -DOPENVPN_FORCE_TUN_NULL -DUSE_TUN_BUILDER"
}
2018-10-18 18:11:09 +08:00
end
2018-07-18 21:13:32 +08:00
end