diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2016-12-22 14:43:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-22 14:43:01 +0000 |
commit | 90b36130532d2d8040b39e310d8d0d5ee22aea0a (patch) | |
tree | 26eabdea9bc04077b1621deb34b5d0cbe669dedd /OLMKit.podspec | |
parent | fb91b1f18269c5b681c972dc4448858db0966c3a (diff) | |
parent | 46ad79517ec8e005bd2d1de767d3cd59ec038fe2 (diff) |
Merge pull request #36 from matrix-org/manuroe/olmkit
OLMKit
Diffstat (limited to 'OLMKit.podspec')
-rw-r--r-- | OLMKit.podspec | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/OLMKit.podspec b/OLMKit.podspec new file mode 100644 index 0000000..6403fdc --- /dev/null +++ b/OLMKit.podspec @@ -0,0 +1,61 @@ +Pod::Spec.new do |s| + + # The libolm version + MAJOR = 2 + MINOR = 0 + PATCH = 1 + + s.name = "OLMKit" + s.version = "#{MAJOR}.#{MINOR}.#{PATCH}" + s.summary = "An Objective-C wrapper of olm (http://matrix.org/git/olm)" + + s.description = <<-DESC + olm is an implementation of the Double Ratchet cryptographic ratchet in C++ + DESC + + s.homepage = "http://matrix.org/git/olm" + + s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" } + + s.authors = { "Chris Ballinger" => "chrisballinger@gmail.com", + "matrix.org" => "support@matrix.org" } + + s.platform = :ios, "5.0" + + # Expose the Objective-C wrapper API of libolm + s.public_header_files = "xcode/OLMKit/*.h" + + s.source = { + :git => "https://matrix.org/git/olm.git", + :tag => s.version.to_s + } + + s.source_files = "xcode/OLMKit/*.{h,m}", "include/**/*.{h,hh}", "src/*.{c,cpp}", "lib/crypto-algorithms/sha256.c", "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c" + + # Those files (including .c) are included by ed25519.c. We do not want to compile them twice + s.preserve_paths = "lib/ed25519/**/*.{h,c}" + + s.library = "c++" + + + # Use the same compiler options for C and C++ as olm/Makefile + + s.compiler_flags = "-g -O3 -DOLMLIB_VERSION_MAJOR=#{MAJOR} -DOLMLIB_VERSION_MINOR=#{MINOR} -DOLMLIB_VERSION_PATCH=#{PATCH}" + + # For headers search paths, manage first the normal installation. Then, use paths used + # when the pod is local + s.xcconfig = { + 'USER_HEADER_SEARCH_PATHS' =>"${PODS_ROOT}/OLMKit/include ${PODS_ROOT}/OLMKit/lib #{File.join(File.dirname(__FILE__), 'include')} #{File.join(File.dirname(__FILE__), 'lib')}" + } + + s.subspec 'olmc' do |olmc| + olmc.source_files = "src/*.{c}", "lib/curve25519-donna.h", "lib/crypto-algorithms/sha256.{h,c}", "lib/crypto-algorithms/aes.{h,c}", "lib/curve25519-donna/curve25519-donna.c" + olmc.compiler_flags = ' -std=c99 -fPIC' + end + + s.subspec 'olmcpp' do |olmcpp| + olmcpp.source_files = "src/*.{cpp}" + olmcpp.compiler_flags = ' -std=c++11 -fPIC' + end + +end |