Annotation of embedaddon/miniupnpd/miniupnp.podspec, revision 1.1
1.1 ! misho 1: Pod::Spec.new do |spec|
! 2: spec.name = "miniupnp"
! 3: spec.summary = "Mini UPnP client"
! 4: spec.homepage = 'http://miniupnp.free.fr/'
! 5: spec.authors = "The MiniUPnP Authors"
! 6: spec.license = { type: "BSD", file: "miniupnpc/LICENSE" }
! 7:
! 8: spec.version = "2.0.0.2"
! 9: spec.source = {
! 10: git: 'https://github.com/miniupnp/miniupnp.git',
! 11: tag: "v#{spec.version}"
! 12: }
! 13:
! 14: spec.platform = :ios
! 15: spec.ios.deployment_target = '8.0'
! 16:
! 17: spec.prepare_command = <<-CMD
! 18: build_for_ios() {
! 19: build_for_architecture iphoneos armv7 arm-apple-darwin
! 20: build_for_architecture iphonesimulator i386 i386-apple-darwin
! 21: build_for_architecture iphoneos arm64 arm-apple-darwin
! 22: build_for_architecture iphonesimulator x86_64 x86_64-apple-darwin
! 23: create_universal_library
! 24: }
! 25:
! 26: build_for_architecture() {
! 27: PLATFORM=$1
! 28: ARCH=$2
! 29: HOST=$3
! 30: SDKPATH=`xcrun -sdk $PLATFORM --show-sdk-path`
! 31: PREFIX="build-ios/$ARCH"
! 32: mkdir -p "$PREFIX"
! 33: xcrun -sdk $PLATFORM make clean
! 34: xcrun -sdk $PLATFORM make -j 16 install \
! 35: PREFIX="$PREFIX" \
! 36: CC=`xcrun -sdk $PLATFORM -find cc` \
! 37: CFLAGS="-arch $ARCH -isysroot $SDKPATH" \
! 38: LIBTOOL=`xcrun -sdk $PLATFORM -find libtool` \
! 39: LDFLAGS="-arch $ARCH -headerpad_max_install_names"
! 40: }
! 41:
! 42: create_universal_library() {
! 43: lipo -create -output libminiupnpc.dylib \
! 44: build-ios/{armv7,arm64,i386,x86_64}/usr/lib/libminiupnpc.dylib
! 45: install_name_tool -id "@rpath/libminiupnpc.dylib" libminiupnpc.dylib
! 46: }
! 47:
! 48: cd miniupnpc
! 49: build_for_ios
! 50: CMD
! 51:
! 52: spec.source_files = "miniupnpc/build-ios/armv7/usr/include/**/*.h"
! 53: spec.ios.vendored_libraries = "miniupnpc/libminiupnpc.dylib"
! 54: end
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>