Browse Source

Update podspec with OpenSSL library authors and deployment_target
Update build script to use xcrun and xcode-select to determine paths
Rebuild libraries with updated parameters

Marcin Krzyzanowski 11 years ago
parent
commit
4f541c06d5
6 changed files with 38 additions and 24 deletions
  1. 27 13
      OpenSSL.podspec
  2. 11 11
      build.sh
  3. BIN
      lib-ios/libcrypto.a
  4. BIN
      lib-ios/libssl.a
  5. BIN
      lib-osx/libcrypto.a
  6. BIN
      lib-osx/libssl.a

+ 27 - 13
OpenSSL.podspec

@@ -2,25 +2,39 @@ Pod::Spec.new do |s|
   s.name         = "OpenSSL"
   s.version      = "1.0.1e"
   s.summary      = "Pre-built OpenSSL for iOS and OSX"
-  s.description  = "Supports OSX and iPhone Simulator,armv7,armv7s,arm64,x86_64"
+  s.description  = "Supports OSX and iOS Simulator (armv7,armv7s,arm64,i386,x86_64)."
   s.homepage     = "https://github.com/krzak/OpenSSL"
   s.license	     = 'OpenSSL (OpenSSL/SSLeay)'
-
-  s.author       = 'Marcin Krzyżanowski'
   s.source       = { :git => "https://github.com/krzak/OpenSSL.git", :tag => "#{s.version}" }
+
+  s.authors       =  {'Mark J. Cox' => 'mark@openssl.org',
+                     'Ralf S. Engelschall' => 'rse@openssl.org',
+                     'Dr. Stephen Henson' => 'steve@openssl.org',
+                     'Ben Laurie' => 'ben@openssl.org',
+                     'Lutz Jänicke' => 'jaenicke@openssl.org',
+                     'Nils Larsch' => 'nils@openssl.org',
+                     'Richard Levitte' => 'nils@openssl.org',
+                     'Bodo Möller' => 'bodo@openssl.org',
+                     'Ulf Möller' => 'ulf@openssl.org',
+                     'Andy Polyakov' => 'appro@openssl.org',
+                     'Geoff Thorpe' => 'geoff@openssl.org',
+                     'Holger Reif' => 'holger@openssl.org',
+                     'Paul C. Sutton' => 'geoff@openssl.org',
+                     'Eric A. Young' => 'eay@cryptsoft.com',
+                     'Tim Hudson' => 'tjh@cryptsoft.com',
+                     'Justin Plouffe' => 'plouffe.justin@gmail.com'}
   
-  s.ios.platform     = :ios, '6.0'
-  s.ios.source_files        = 'include-ios/openssl/**/*.h'
+  s.ios.platform          = :ios, '5.1.1'
+  s.ios.deployment_target = '5.1.1'
   s.ios.public_header_files = 'include-ios/openssl/**/.h'
-  s.ios.preserve_paths = 'lib-ios/libcrypto.a', 'lib-ios/libssl.a'
-  s.ios.vendored_libraries = 'lib-ios/libcrypto.a', 'lib-ios/libssl.a'
+  s.ios.preserve_paths      = 'lib-ios/libcrypto.a', 'lib-ios/libssl.a'
+  s.ios.vendored_libraries  = 'lib-ios/libcrypto.a', 'lib-ios/libssl.a'
 
-  s.osx.platform     = :osx, '10.8'
-  s.osx.source_files        = 'include-osx/openssl/**/*.h'
-  s.osx.public_header_files = 'include-osx/openssl/**/.h'
-  s.osx.preserve_paths = 'lib-osx/libcrypto.a', 'lib-osx/libssl.a'
-  s.osx.vendored_libraries = 'lib-osx/libcrypto.a', 'lib-osx/libssl.a'
+  s.osx.platform          = :osx, '10.9'
+  s.osx.deployment_target = '10.7'
+  s.osx.public_header_files = 'include-osx/openssl/**/*.h'
+  s.osx.preserve_paths      = 'lib-osx/libcrypto.a', 'lib-osx/libssl.a'
+  s.osx.vendored_libraries  = 'lib-osx/libcrypto.a', 'lib-osx/libssl.a'
 
   s.libraries = 'ssl', 'crypto'
-  s.xcconfig	 = { 'LIBRARY_SEARCH_PATHS' => '"$(SRCROOT)/Pods/OpenSSL"' }
 end

+ 11 - 11
build.sh

@@ -9,21 +9,21 @@ set -x
 
 OPENSSL_VERSION="1.0.1e"
 
-DEVELOPER="/Applications/Xcode.app/Contents/Developer"
+DEVELOPER=$(xcode-select --print-path)
 
-IOS_SDK_VERSION="7.0"
+IOS_SDK_VERSION=$(xcrun --sdk iphoneos --show-sdk-version)
 IOS_DEPLOYMENT_VERSION="5.1.1"
-OSX_SDK_VERSION="10.9"
+OSX_SDK_VERSION=$(xcrun --sdk macosx --show-sdk-version)
 OSX_DEPLOYMENT_VERSION="10.8"
 
-IPHONEOS_PLATFORM="${DEVELOPER}/Platforms/iPhoneOS.platform"
-IPHONEOS_SDK="${IPHONEOS_PLATFORM}/Developer/SDKs/iPhoneOS${IOS_SDK_VERSION}.sdk"
+IPHONEOS_PLATFORM=$(xcrun --sdk iphoneos --show-sdk-platform-path)
+IPHONEOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path)
 
-IPHONESIMULATOR_PLATFORM="${DEVELOPER}/Platforms/iPhoneSimulator.platform"
-IPHONESIMULATOR_SDK="${IPHONESIMULATOR_PLATFORM}/Developer/SDKs/iPhoneSimulator${IOS_SDK_VERSION}.sdk"
+IPHONESIMULATOR_PLATFORM=$(xcrun --sdk iphonesimulator --show-sdk-platform-path)
+IPHONESIMULATOR_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path)
 
-OSX_PLATFORM="${DEVELOPER}/Platforms/MacOSX.platform"
-OSX_SDK="${OSX_PLATFORM}/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk"
+OSX_PLATFORM=$(xcrun --sdk macosx --show-sdk-platform-path)
+OSX_SDK=$(xcrun --sdk macosx --show-sdk-path)
 
 # Clean up whatever was left from our previous build
 
@@ -84,8 +84,8 @@ build()
 
    # Add arch to library
    if [ -f "lib-${TYPE}/libcrypto.a" ]; then
-      lipo "lib-${TYPE}/libcrypto.a" "/tmp/openssl-${OPENSSL_VERSION}-${ARCH}/lib/libcrypto.a" -create -output "lib-${TYPE}/libcrypto.a"
-      lipo "lib-${TYPE}/libssl.a" "/tmp/openssl-${OPENSSL_VERSION}-${ARCH}/lib/libssl.a" -create -output "lib-${TYPE}/libssl.a"
+      xcrun lipo "lib-${TYPE}/libcrypto.a" "/tmp/openssl-${OPENSSL_VERSION}-${ARCH}/lib/libcrypto.a" -create -output "lib-${TYPE}/libcrypto.a"
+      xcrun lipo "lib-${TYPE}/libssl.a" "/tmp/openssl-${OPENSSL_VERSION}-${ARCH}/lib/libssl.a" -create -output "lib-${TYPE}/libssl.a"
    else
       cp "/tmp/openssl-${OPENSSL_VERSION}-${ARCH}/lib/libcrypto.a" "lib-${TYPE}/libcrypto.a"
       cp "/tmp/openssl-${OPENSSL_VERSION}-${ARCH}/lib/libssl.a" "lib-${TYPE}/libssl.a"

BIN
lib-ios/libcrypto.a


BIN
lib-ios/libssl.a


BIN
lib-osx/libcrypto.a


BIN
lib-osx/libssl.a