├── .gitignore ├── Cargo.toml ├── Makefile ├── TODO.md ├── LICENSE ├── Components.make ├── MKMapViewZoom │ └── master │ │ └── MKMapViewZoom.make ├── FMDB │ └── 2.3 │ │ └── FMDB.make ├── Charts │ └── 2.2.4 │ │ └── Charts.make ├── OpenIDFA │ └── master │ │ └── OpenIDFA.make ├── Fuzzer │ ├── 0.2.0 │ │ ├── Fuzzer-OSX.make │ │ └── Fuzzer-iOS.make │ └── 0.3.0 │ │ ├── Fuzzer-OSX.make │ │ └── Fuzzer-iOS.make ├── Adjust │ └── 4.4.3 │ │ └── Adjust.make ├── Mixpanel │ └── 2.9.0 │ │ └── Mixpanel.make ├── BloodMagic │ └── 1.0.0 │ │ ├── BloodMagic-OSX.make │ │ └── BloodMagic-iOS.make ├── CompositeOperations │ ├── 0.8.6 │ │ └── CompositeOperations.make │ └── 0.8.7 │ │ └── CompositeOperations.make ├── RSEnvironment │ └── master │ │ └── RSEnvironment.make ├── GoogleMaps │ └── 1.10.5 │ │ └── GoogleMaps.make ├── OHHTTPStubs │ ├── 4.3.0 │ │ └── OHHTTPStubs.make │ ├── 5.0.0 │ │ └── OHHTTPStubs.make │ ├── 6.0.0 │ │ └── OHHTTPStubs.make │ ├── 5.1.0 │ │ └── OHHTTPStubs.make │ └── 5.2.0 │ │ └── OHHTTPStubs.make ├── Reachability │ └── 3.2 │ │ └── Reachability.make ├── kingpin │ └── 0.3.2 │ │ └── kingpin.make ├── utf8proc │ └── 1.3.1 │ │ └── utf8proc.make ├── AFNetworking │ └── 2.6.3 │ │ └── AFNetworking.make ├── GoogleAnalytics │ └── 3.13.0 │ │ └── GoogleAnalytics.make ├── TPCircularBuffer │ └── master │ │ └── TPCircularBuffer.make ├── JPSimulatorHacks │ └── 1.3.0 │ │ └── JPSimulatorHacks.make ├── Cedar │ ├── 0.11.3 │ │ └── Cedar-iOS.make │ └── 0.13.0 │ │ └── Cedar-iOS.make ├── DDHotKey │ └── master │ │ └── DDHotKey.make ├── KIF │ ├── 3.3.0 │ │ └── KIF.make │ ├── 3.3.2 │ │ └── KIF.make │ └── 3.5.1 │ │ └── KIF.make ├── VCRURLConnection │ └── 7c781bc81b60b079251e94c5ff5e966a0791abd2 │ │ └── VCRURLConnection.make └── BraintreeSDK │ └── 4.3.1 │ └── BraintreeSDK.make ├── Cargo.lock ├── README.md ├── History └── components.sh ├── src └── components.rs └── tests └── components.rs /.gitignore: -------------------------------------------------------------------------------- 1 | Components/ 2 | target/ 3 | *.swp 4 | distribution/ 5 | 6 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = "components" 4 | version = "0.3.0" 5 | authors = [ "Alexey Denisov <1101.debian@gmail.com>", "Stanislav Pankevich " ] 6 | 7 | [[bin]] 8 | name = "components" 9 | path = "src/components.rs" 10 | test = false 11 | 12 | [dev-dependencies] 13 | tempdir = "*" 14 | 15 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: test 2 | 3 | build: 4 | cargo build --release --target=x86_64-apple-darwin 5 | 6 | test: build 7 | COMPONENTS_EXEC=./target/x86_64-apple-darwin/release/components cargo test -- --nocapture 8 | 9 | archive: 10 | rm -rf distribution/ 11 | mkdir distribution 12 | tar czvf distribution/components.tar.gz -C target/x86_64-apple-darwin/release components 13 | shasum distribution/components.tar.gz 14 | 15 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | # TODO 2 | 3 | ### Build and Validation system for each and all components 4 | 5 | #### Unit level (aka Lint tool) 6 | 7 | - Prevents `mkdir` invocations without `-p` argument 8 | - Enforce usage of '' to make Compnents work with paths with spaces 9 | - [TO DISCUSS] `components validate` and corresponding `validate` action so that component can validate itself autonomously. 10 | 11 | #### Integration level 12 | 13 | - System should be able to build and validate all components in repository 14 | - System should be able to build and validate one component 15 | - System should be able to build and validate reinstallation of different version of a same component 16 | 17 | ### DRY 18 | 19 | - Include templates 20 | 21 | ### Usability 22 | 23 | - Print component's version 24 | 25 | ### Semantics 26 | 27 | - The use of `COMPONENT_SOURCE_PATH` is under discussion 28 | - The use of `COMPONENT_FRAMEWORK_PATH` is under discussion 29 | - The use of `COMPONENT_ARTEFACTS_PATH` is under discussion 30 | 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Alex Denisov, Stanislaw Pankevich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Components.make/MKMapViewZoom/master/MKMapViewZoom.make: -------------------------------------------------------------------------------- 1 | NAME=MKMapViewZoom 2 | VERSION=master 3 | GH_REPO=johndpope/MKMapViewZoom 4 | 5 | ### URLs 6 | 7 | COMPONENT_URL=https://raw.githubusercontent.com/johndpope/MKMapViewZoom/master 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 16 | 17 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 18 | 19 | ### Targets 20 | 21 | .PHONY: install update uninstall clean prepare purge 22 | 23 | install: $(COMPONENT_INSTALL_PATH) 24 | 25 | uninstall: 26 | rm -rf $(COMPONENT_INSTALL_PATH) 27 | 28 | update: uninstall install 29 | 30 | clean: 31 | rm -rf $(COMPONENT_SOURCE_PATH) 32 | 33 | purge: uninstall clean 34 | 35 | ### Artefacts 36 | 37 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 38 | mkdir -p $(COMPONENT_INSTALL_PATH) 39 | 40 | cp -Rv $(COMPONENT_SOURCE_PATH)/MKMapView+ZoomLevel.[hm] $(COMPONENT_INSTALL_PATH) 41 | 42 | $(COMPONENT_SOURCE_PATH): 43 | mkdir -p $(COMPONENT_BUILD_PATH) 44 | mkdir -p $(COMPONENT_SOURCE_PATH) 45 | 46 | wget --no-use-server-timestamps $(COMPONENT_URL)/MKMapView+ZoomLevel.h -O $(COMPONENT_SOURCE_PATH)/MKMapView+ZoomLevel.h 47 | wget --no-use-server-timestamps $(COMPONENT_URL)/MKMapView+ZoomLevel.m -O $(COMPONENT_SOURCE_PATH)/MKMapView+ZoomLevel.m 48 | 49 | -------------------------------------------------------------------------------- /Components.make/FMDB/2.3/FMDB.make: -------------------------------------------------------------------------------- 1 | NAME=FMDB 2 | VERSION=2.3 3 | GH_REPO=ccgus/fmdb 4 | 5 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 6 | COMPONENTS_INSTALL_PATH ?= ./Components 7 | 8 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 9 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 10 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 11 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/fmdb-$(VERSION)/src/fmdb 12 | 13 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 14 | 15 | ### URLs 16 | 17 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/archive/v${VERSION}.zip 18 | 19 | ### Targets 20 | 21 | .PHONY: install update uninstall clean prepare purge 22 | 23 | install: $(COMPONENT_INSTALL_PATH) 24 | 25 | uninstall: 26 | rm -rf $(COMPONENT_INSTALL_PATH) 27 | 28 | update: uninstall install 29 | 30 | clean: 31 | rm -rf $(COMPONENT_SOURCE_PATH) 32 | rm -rf $(COMPONENT_ZIPBALL_PATH) 33 | 34 | purge: uninstall clean 35 | 36 | ### Artefacts 37 | 38 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 39 | mkdir -p $(COMPONENT_INSTALL_PATH) 40 | cp -R $(COMPONENT_ARTEFACT_PATH)/* $(COMPONENT_INSTALL_PATH) 41 | 42 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 43 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 44 | 45 | $(COMPONENT_ZIPBALL_PATH): 46 | mkdir -p $(COMPONENT_BUILD_PATH) 47 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 48 | 49 | -------------------------------------------------------------------------------- /Components.make/Charts/2.2.4/Charts.make: -------------------------------------------------------------------------------- 1 | NAME=Charts 2 | VERSION=2.2.4 3 | 4 | GH_REPO=https://github.com/danielgindi/Charts 5 | ZIPBALL_URL=$(GH_REPO)/releases/download/v$(VERSION)/Charts.framework.zip 6 | 7 | ### Paths 8 | 9 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 10 | COMPONENTS_INSTALL_PATH ?= ./Components 11 | 12 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 13 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 14 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/Carthage/Build/iOS/Charts.framework 15 | 16 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): $(ZIPBALL_PATH) 44 | unzip $(ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(ZIPBALL_PATH): $(COMPONENT_BUILD_PATH) 47 | mkdir -p $(COMPONENT_BUILD_PATH) 48 | wget --no-use-server-timestamps $(ZIPBALL_URL) -O $(ZIPBALL_PATH) 49 | 50 | -------------------------------------------------------------------------------- /Components.make/OpenIDFA/master/OpenIDFA.make: -------------------------------------------------------------------------------- 1 | NAME=OpenIDFA 2 | VERSION=master 3 | GH_REPO=ylechelle/OpenIDFA 4 | 5 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 6 | COMPONENTS_INSTALL_PATH ?= ./Components 7 | 8 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 9 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 10 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 11 | COMPONENT_ARTEFACTS_PATH=$(COMPONENT_SOURCE_PATH)/OpenIDFA-master 12 | 13 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 14 | 15 | ### URLs 16 | 17 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/archive/${VERSION}.zip 18 | 19 | ### Targets 20 | 21 | .PHONY: install update uninstall clean prepare purge 22 | 23 | install: $(COMPONENT_INSTALL_PATH) 24 | 25 | uninstall: 26 | rm -rf $(COMPONENT_INSTALL_PATH) 27 | 28 | update: uninstall install 29 | 30 | clean: 31 | rm -rf $(COMPONENT_SOURCE_PATH) 32 | rm -rf $(COMPONENT_ZIPBALL_PATH) 33 | 34 | purge: uninstall clean 35 | 36 | ### Artefacts 37 | 38 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 39 | mkdir -p $(COMPONENT_INSTALL_PATH) 40 | cp -R $(COMPONENT_ARTEFACTS_PATH)/*\.[h,m] $(COMPONENT_INSTALL_PATH) 41 | 42 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 43 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 44 | 45 | $(COMPONENT_ZIPBALL_PATH): 46 | mkdir -p $(COMPONENT_BUILD_PATH) 47 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 48 | 49 | -------------------------------------------------------------------------------- /Components.make/Fuzzer/0.2.0/Fuzzer-OSX.make: -------------------------------------------------------------------------------- 1 | NAME=Fuzzer-OSX 2 | VERSION=0.2.0 3 | 4 | GH_REPO=AlexDenisov/Fuzzer 5 | ZIPBALL_URL=https://github.com/$(GH_REPO)/releases/download/$(VERSION)/$(NAME)-$(VERSION).zip 6 | 7 | ### Paths 8 | 9 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 10 | COMPONENTS_INSTALL_PATH ?= ./Components 11 | 12 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 13 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 14 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/Fuzzer.framework 15 | 16 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(COMPONENT_ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 44 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(COMPONENT_ZIPBALL_PATH): 47 | mkdir -p $(COMPONENT_BUILD_PATH) 48 | wget --no-use-server-timestamps $(ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 49 | 50 | -------------------------------------------------------------------------------- /Components.make/Fuzzer/0.2.0/Fuzzer-iOS.make: -------------------------------------------------------------------------------- 1 | NAME=Fuzzer-iOS 2 | VERSION=0.2.0 3 | 4 | GH_REPO=AlexDenisov/Fuzzer 5 | ZIPBALL_URL=https://github.com/$(GH_REPO)/releases/download/$(VERSION)/$(NAME)-$(VERSION).zip 6 | 7 | ### Paths 8 | 9 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 10 | COMPONENTS_INSTALL_PATH ?= ./Components 11 | 12 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 13 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 14 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/Fuzzer.framework 15 | 16 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(COMPONENT_ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 44 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(COMPONENT_ZIPBALL_PATH): 47 | mkdir -p $(COMPONENT_BUILD_PATH) 48 | wget --no-use-server-timestamps $(ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 49 | 50 | -------------------------------------------------------------------------------- /Components.make/Fuzzer/0.3.0/Fuzzer-OSX.make: -------------------------------------------------------------------------------- 1 | NAME=Fuzzer-OSX 2 | VERSION=0.3.0 3 | 4 | GH_REPO=AlexDenisov/Fuzzer 5 | ZIPBALL_URL=https://github.com/$(GH_REPO)/releases/download/$(VERSION)/$(NAME)-$(VERSION).zip 6 | 7 | ### Paths 8 | 9 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 10 | COMPONENTS_INSTALL_PATH ?= ./Components 11 | 12 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 13 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 14 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/Fuzzer.framework 15 | 16 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(COMPONENT_ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 44 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(COMPONENT_ZIPBALL_PATH): 47 | mkdir -p $(COMPONENT_BUILD_PATH) 48 | wget --no-use-server-timestamps $(ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 49 | 50 | -------------------------------------------------------------------------------- /Components.make/Fuzzer/0.3.0/Fuzzer-iOS.make: -------------------------------------------------------------------------------- 1 | NAME=Fuzzer-iOS 2 | VERSION=0.3.0 3 | 4 | GH_REPO=AlexDenisov/Fuzzer 5 | ZIPBALL_URL=https://github.com/$(GH_REPO)/releases/download/$(VERSION)/$(NAME)-$(VERSION).zip 6 | 7 | ### Paths 8 | 9 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 10 | COMPONENTS_INSTALL_PATH ?= ./Components 11 | 12 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 13 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 14 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/Fuzzer.framework 15 | 16 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(COMPONENT_ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 44 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(COMPONENT_ZIPBALL_PATH): 47 | mkdir -p $(COMPONENT_BUILD_PATH) 48 | wget --no-use-server-timestamps $(ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 49 | 50 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "components" 3 | version = "0.3.0" 4 | dependencies = [ 5 | "tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 6 | ] 7 | 8 | [[package]] 9 | name = "advapi32-sys" 10 | version = "0.1.2" 11 | source = "registry+https://github.com/rust-lang/crates.io-index" 12 | dependencies = [ 13 | "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 14 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 15 | ] 16 | 17 | [[package]] 18 | name = "libc" 19 | version = "0.2.4" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | 22 | [[package]] 23 | name = "rand" 24 | version = "0.3.12" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | dependencies = [ 27 | "advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 28 | "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 29 | "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 30 | ] 31 | 32 | [[package]] 33 | name = "tempdir" 34 | version = "0.3.4" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | dependencies = [ 37 | "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", 38 | ] 39 | 40 | [[package]] 41 | name = "winapi" 42 | version = "0.2.5" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | 45 | [[package]] 46 | name = "winapi-build" 47 | version = "0.1.1" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | 50 | -------------------------------------------------------------------------------- /Components.make/Adjust/4.4.3/Adjust.make: -------------------------------------------------------------------------------- 1 | NAME=Adjust 2 | VERSION=4.4.3 3 | GH_REPO=adjust/ios_sdk 4 | 5 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 6 | COMPONENTS_INSTALL_PATH ?= ./Components 7 | 8 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 9 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 10 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 11 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME).framework 12 | 13 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 14 | 15 | ### URLs 16 | 17 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/releases/download/v${VERSION}/${NAME}.framework.zip 18 | 19 | ### Targets 20 | 21 | .PHONY: install update uninstall clean prepare purge 22 | 23 | install: $(COMPONENT_INSTALL_PATH) 24 | 25 | uninstall: 26 | rm -rf $(COMPONENT_INSTALL_PATH) 27 | 28 | update: uninstall install 29 | 30 | clean: 31 | rm -rf $(COMPONENT_SOURCE_PATH) 32 | rm -rf $(COMPONENT_ZIPBALL_PATH) 33 | 34 | purge: uninstall clean 35 | 36 | ### Artefacts 37 | 38 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 39 | mkdir -p $(COMPONENT_INSTALL_PATH) 40 | cp -R $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 41 | 42 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 43 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 44 | 45 | $(COMPONENT_ZIPBALL_PATH): 46 | mkdir -p $(COMPONENT_BUILD_PATH) 47 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 48 | 49 | -------------------------------------------------------------------------------- /Components.make/Mixpanel/2.9.0/Mixpanel.make: -------------------------------------------------------------------------------- 1 | NAME=Mixpanel 2 | VERSION=2.9.0 3 | GH_REPO=mixpanel/mixpanel-iphone 4 | 5 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 6 | COMPONENTS_INSTALL_PATH ?= ./Components 7 | 8 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 9 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 10 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 11 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/mixpanel-iphone-$(VERSION)/Mixpanel 12 | 13 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 14 | 15 | ### URLs 16 | 17 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/archive/v${VERSION}.zip 18 | 19 | ### Targets 20 | 21 | .PHONY: install update uninstall clean prepare purge 22 | 23 | install: $(COMPONENT_INSTALL_PATH) 24 | 25 | uninstall: 26 | rm -rf $(COMPONENT_INSTALL_PATH) 27 | 28 | update: uninstall install 29 | 30 | clean: 31 | rm -rf $(COMPONENT_SOURCE_PATH) 32 | rm -rf $(COMPONENT_ZIPBALL_PATH) 33 | 34 | purge: uninstall clean 35 | 36 | ### Artefacts 37 | 38 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 39 | mkdir -p $(COMPONENT_INSTALL_PATH) 40 | cp -R $(COMPONENT_FRAMEWORK_PATH)/* $(COMPONENT_INSTALL_PATH) 41 | 42 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 43 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 44 | 45 | $(COMPONENT_ZIPBALL_PATH): 46 | mkdir -p $(COMPONENT_BUILD_PATH) 47 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 48 | 49 | -------------------------------------------------------------------------------- /Components.make/BloodMagic/1.0.0/BloodMagic-OSX.make: -------------------------------------------------------------------------------- 1 | NAME=BloodMagic-OSX 2 | VERSION=1.0.0 3 | 4 | GH_REPO=railsware/BloodMagic 5 | ZIPBALL_URL=https://github.com/$(GH_REPO)/releases/download/$(VERSION)/$(NAME)-$(VERSION).zip 6 | 7 | ### Paths 8 | 9 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 10 | COMPONENTS_INSTALL_PATH ?= ./Components 11 | 12 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 13 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 14 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/BloodMagic.framework 15 | 16 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(COMPONENT_ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 44 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(COMPONENT_ZIPBALL_PATH): 47 | mkdir -p $(COMPONENT_BUILD_PATH) 48 | wget --no-use-server-timestamps $(ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 49 | 50 | -------------------------------------------------------------------------------- /Components.make/BloodMagic/1.0.0/BloodMagic-iOS.make: -------------------------------------------------------------------------------- 1 | NAME=BloodMagic-iOS 2 | VERSION=1.0.0 3 | 4 | GH_REPO=railsware/BloodMagic 5 | ZIPBALL_URL=https://github.com/$(GH_REPO)/releases/download/$(VERSION)/$(NAME)-$(VERSION).zip 6 | 7 | ### Paths 8 | 9 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 10 | COMPONENTS_INSTALL_PATH ?= ./Components 11 | 12 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 13 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 14 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/BloodMagic.framework 15 | 16 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(COMPONENT_ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 44 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(COMPONENT_ZIPBALL_PATH): 47 | mkdir -p $(COMPONENT_BUILD_PATH) 48 | wget --no-use-server-timestamps $(ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 49 | 50 | -------------------------------------------------------------------------------- /Components.make/CompositeOperations/0.8.6/CompositeOperations.make: -------------------------------------------------------------------------------- 1 | NAME=CompositeOperations 2 | VERSION=0.8.6 3 | 4 | GH_REPO=stanislaw/CompositeOperations 5 | ZIPBALL_URL=https://github.com/$(GH_REPO)/releases/download/$(VERSION)/CompositeOperations-iOS.zip 6 | 7 | ### Paths 8 | 9 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 10 | COMPONENTS_INSTALL_PATH ?= ./Components 11 | 12 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 13 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 14 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME).framework 15 | 16 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): | $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): | $(ZIPBALL_PATH) 44 | unzip $(ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(ZIPBALL_PATH): | $(COMPONENT_BUILD_PATH) 47 | wget $(ZIPBALL_URL) -O $(ZIPBALL_PATH) 48 | 49 | $(COMPONENT_BUILD_PATH): 50 | mkdir -p $(COMPONENT_BUILD_PATH) 51 | 52 | -------------------------------------------------------------------------------- /Components.make/CompositeOperations/0.8.7/CompositeOperations.make: -------------------------------------------------------------------------------- 1 | NAME=CompositeOperations 2 | VERSION=0.8.7 3 | 4 | GH_REPO=stanislaw/CompositeOperations 5 | ZIPBALL_URL=https://github.com/$(GH_REPO)/releases/download/$(VERSION)/CompositeOperations-iOS.zip 6 | 7 | ### Paths 8 | 9 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 10 | COMPONENTS_INSTALL_PATH ?= ./Components 11 | 12 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 13 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 14 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME).framework 15 | 16 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): | $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): | $(ZIPBALL_PATH) 44 | unzip $(ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(ZIPBALL_PATH): | $(COMPONENT_BUILD_PATH) 47 | wget $(ZIPBALL_URL) -O $(ZIPBALL_PATH) 48 | 49 | $(COMPONENT_BUILD_PATH): 50 | mkdir -p $(COMPONENT_BUILD_PATH) 51 | 52 | -------------------------------------------------------------------------------- /Components.make/RSEnvironment/master/RSEnvironment.make: -------------------------------------------------------------------------------- 1 | NAME=RSEnvironment 2 | VERSION=master 3 | GH_REPO=rabovik/RSEnvironment 4 | 5 | ### URLs 6 | 7 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/$(VERSION).zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION)/$(NAME) 18 | 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/RSEnvironment\.[hm] $(COMPONENT_INSTALL_PATH) 43 | 44 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 45 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 46 | 47 | $(COMPONENT_ZIPBALL_PATH): 48 | mkdir -p $(COMPONENT_BUILD_PATH) 49 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 50 | 51 | -------------------------------------------------------------------------------- /Components.make/GoogleMaps/1.10.5/GoogleMaps.make: -------------------------------------------------------------------------------- 1 | NAME=GoogleMaps 2 | VERSION=1.10.5 3 | 4 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 5 | COMPONENTS_INSTALL_PATH ?= ./Components 6 | 7 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 8 | COMPONENT_TARBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).tar.gz 9 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 10 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/Frameworks/$(NAME).framework 11 | 12 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 13 | 14 | ### URLs 15 | 16 | HASH=93e701e41a32de1c 17 | COMPONENT_TARBALL_URL=https://www.gstatic.com/cpdc/$(HASH)-$(NAME)-${VERSION}.tar.gz 18 | 19 | ### Targets 20 | 21 | .PHONY: install update uninstall clean prepare purge 22 | 23 | install: $(COMPONENT_INSTALL_PATH) 24 | 25 | uninstall: 26 | rm -rf $(COMPONENT_INSTALL_PATH) 27 | 28 | update: uninstall install 29 | 30 | clean: 31 | rm -rf $(COMPONENT_SOURCE_PATH) 32 | rm -rf $(COMPONENT_TARBALL_PATH) 33 | 34 | purge: uninstall clean 35 | 36 | ### Artefacts 37 | 38 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 39 | mkdir -p $(COMPONENT_INSTALL_PATH) 40 | cp -R $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 41 | 42 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_TARBALL_PATH) 43 | mkdir -p $(COMPONENT_SOURCE_PATH) 44 | tar xzf $(COMPONENT_TARBALL_PATH) --directory ${COMPONENT_SOURCE_PATH} 45 | 46 | $(COMPONENT_TARBALL_PATH): 47 | mkdir -p $(COMPONENT_BUILD_PATH) 48 | wget --no-use-server-timestamps $(COMPONENT_TARBALL_URL) -O $(COMPONENT_TARBALL_PATH) 49 | 50 | -------------------------------------------------------------------------------- /Components.make/OHHTTPStubs/4.3.0/OHHTTPStubs.make: -------------------------------------------------------------------------------- 1 | NAME=OHHTTPStubs 2 | VERSION=4.3.0 3 | 4 | ### URLs 5 | 6 | GH_REPO=AliSoftware/OHHTTPStubs 7 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/releases/download/${VERSION}/OHHTTPStubs.framework.zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/Carthage/Build/iOS/$(NAME).framework 18 | 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | cp -R $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 43 | 44 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 45 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 46 | 47 | $(COMPONENT_ZIPBALL_PATH): 48 | mkdir -p $(COMPONENT_BUILD_PATH) 49 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 50 | 51 | -------------------------------------------------------------------------------- /Components.make/Reachability/3.2/Reachability.make: -------------------------------------------------------------------------------- 1 | NAME=Reachability 2 | VERSION=3.2 3 | GH_REPO=tonymillion/Reachability 4 | 5 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 6 | COMPONENTS_INSTALL_PATH ?= ./Components 7 | 8 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 9 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 10 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 11 | COMPONENT_ARTEFACTS_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION) 12 | 13 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 14 | 15 | ### URLs 16 | 17 | # https://github.com/tonymillion/Reachability/archive/v3.2.zip 18 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/archive/v${VERSION}.zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(COMPONENT_ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -R $(COMPONENT_ARTEFACTS_PATH)/*\.[h,m] $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 44 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 45 | 46 | $(COMPONENT_ZIPBALL_PATH): 47 | mkdir -p $(COMPONENT_BUILD_PATH) 48 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 49 | 50 | -------------------------------------------------------------------------------- /Components.make/kingpin/0.3.2/kingpin.make: -------------------------------------------------------------------------------- 1 | COMPONENT_NAME = kingpin 2 | COMPONENT_VERSION = 0.3.2 3 | 4 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 5 | COMPONENTS_INSTALL_PATH ?= ./Components 6 | 7 | COMPONENT_ZIPBALL_URL = https://github.com/itsbonczek/kingpin/releases/download/$(COMPONENT_VERSION)/kingpin-iOS.zip 8 | 9 | COMPONENT_BUILD_PATH = $(COMPONENTS_BUILD_CACHE_PATH)/$(COMPONENT_NAME) 10 | COMPONENT_SOURCE_PATH = $(COMPONENT_BUILD_PATH)/$(COMPONENT_NAME)-$(COMPONENT_VERSION) 11 | COMPONENT_ZIPBALL_PATH = $(COMPONENT_BUILD_PATH)/$(COMPONENT_NAME)-$(COMPONENT_VERSION).zip 12 | COMPONENT_FRAMEWORK_PATH = $(COMPONENT_SOURCE_PATH)/$(COMPONENT_NAME).framework 13 | COMPONENT_INSTALL_PATH = $(COMPONENTS_INSTALL_PATH)/$(COMPONENT_NAME) 14 | 15 | ### Targets 16 | 17 | .PHONY: install update uninstall clean prepare purge 18 | 19 | install: $(COMPONENT_INSTALL_PATH) 20 | 21 | uninstall: 22 | rm -rf $(COMPONENT_INSTALL_PATH) 23 | 24 | update: uninstall install 25 | 26 | clean: 27 | rm -rf $(COMPONENT_SOURCE_PATH) 28 | rm -rf $(ZIPBALL_PATH) 29 | 30 | purge: uninstall clean 31 | 32 | ### Artefacts 33 | 34 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 35 | mkdir -p $(COMPONENT_INSTALL_PATH) 36 | cp -Rv $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 37 | 38 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 39 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 40 | 41 | $(COMPONENT_ZIPBALL_PATH): 42 | mkdir -p $(COMPONENT_BUILD_PATH) 43 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 44 | 45 | -------------------------------------------------------------------------------- /Components.make/utf8proc/1.3.1/utf8proc.make: -------------------------------------------------------------------------------- 1 | NAME=utf8proc 2 | VERSION=1.3.1 3 | GH_REPO=JuliaLang/utf8proc 4 | 5 | ### URLs 6 | 7 | COMPONENT_TARBALL_URL=https://github.com/$(GH_REPO)/archive/v$(VERSION).tar.gz 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_TARBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).tar.gz 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION) 18 | 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_TARBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | 43 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/utf8proc*\.[hc] $(COMPONENT_INSTALL_PATH) 44 | 45 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_TARBALL_PATH) 46 | mkdir -p $(COMPONENT_SOURCE_PATH) 47 | tar xzf $(COMPONENT_TARBALL_PATH) --directory ${COMPONENT_SOURCE_PATH} 48 | 49 | $(COMPONENT_TARBALL_PATH): 50 | mkdir -p $(COMPONENT_BUILD_PATH) 51 | wget --no-use-server-timestamps $(COMPONENT_TARBALL_URL) -O $(COMPONENT_TARBALL_PATH) 52 | 53 | -------------------------------------------------------------------------------- /Components.make/AFNetworking/2.6.3/AFNetworking.make: -------------------------------------------------------------------------------- 1 | NAME=AFNetworking 2 | VERSION=2.6.3 3 | GH_REPO=AFNetworking/AFNetworking 4 | 5 | ### Paths 6 | 7 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 8 | COMPONENTS_INSTALL_PATH ?= ./Components 9 | 10 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 11 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 12 | COMPONENT_ARTEFACTS_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION) 13 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 14 | 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | 17 | ### URLs 18 | 19 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/$(VERSION).zip 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | cp $(COMPONENT_ARTEFACTS_PATH)/$(NAME)/* $(COMPONENT_INSTALL_PATH) 43 | cp $(COMPONENT_ARTEFACTS_PATH)/UIKit+$(NAME)/* $(COMPONENT_INSTALL_PATH) 44 | 45 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 46 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 47 | 48 | $(COMPONENT_ZIPBALL_PATH): 49 | mkdir -p $(COMPONENT_BUILD_PATH) 50 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 51 | 52 | -------------------------------------------------------------------------------- /Components.make/GoogleAnalytics/3.13.0/GoogleAnalytics.make: -------------------------------------------------------------------------------- 1 | NAME=GoogleAnalytics 2 | VERSION=3.13.0 3 | 4 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 5 | COMPONENTS_INSTALL_PATH ?= ./Components 6 | 7 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 8 | COMPONENT_TARBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).tar.gz 9 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 10 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/Frameworks/$(NAME).framework 11 | 12 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 13 | 14 | ### URLs 15 | 16 | HASH=9b1bb5e186325dc2 17 | COMPONENT_TARBALL_URL=https://www.gstatic.com/cpdc/$(HASH)-$(NAME)-${VERSION}.tar.gz 18 | 19 | ### Targets 20 | 21 | .PHONY: install update uninstall clean prepare purge 22 | 23 | install: $(COMPONENT_INSTALL_PATH) 24 | 25 | uninstall: 26 | rm -rf $(COMPONENT_INSTALL_PATH) 27 | 28 | update: uninstall install 29 | 30 | clean: 31 | rm -rf $(COMPONENT_SOURCE_PATH) 32 | rm -rf $(COMPONENT_TARBALL_PATH) 33 | 34 | purge: uninstall clean 35 | 36 | ### Artefacts 37 | 38 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 39 | mkdir -p $(COMPONENT_INSTALL_PATH) 40 | cp -R $(COMPONENT_SOURCE_PATH)/Headers $(COMPONENT_INSTALL_PATH) 41 | cp -R $(COMPONENT_SOURCE_PATH)/Libraries $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_TARBALL_PATH) 44 | mkdir -p $(COMPONENT_SOURCE_PATH) 45 | tar xzf $(COMPONENT_TARBALL_PATH) --directory ${COMPONENT_SOURCE_PATH} 46 | 47 | $(COMPONENT_TARBALL_PATH): 48 | mkdir -p $(COMPONENT_BUILD_PATH) 49 | wget --no-use-server-timestamps $(COMPONENT_TARBALL_URL) -O $(COMPONENT_TARBALL_PATH) 50 | 51 | -------------------------------------------------------------------------------- /Components.make/TPCircularBuffer/master/TPCircularBuffer.make: -------------------------------------------------------------------------------- 1 | NAME=TPCircularBuffer 2 | VERSION=master 3 | GH_REPO=michaeltyson/TPCircularBuffer 4 | 5 | ### URLs 6 | 7 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/$(VERSION).zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION) 18 | 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | 43 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/TPCircularBuffer.[ch] $(COMPONENT_INSTALL_PATH) 44 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/TPCircularBuffer+AudioBufferList.[ch] $(COMPONENT_INSTALL_PATH) 45 | 46 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 47 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 48 | 49 | $(COMPONENT_ZIPBALL_PATH): 50 | mkdir -p $(COMPONENT_BUILD_PATH) 51 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 52 | 53 | -------------------------------------------------------------------------------- /Components.make/JPSimulatorHacks/1.3.0/JPSimulatorHacks.make: -------------------------------------------------------------------------------- 1 | NAME=JPSimulatorHacks 2 | VERSION=1.3.0 3 | GH_REPO=https://github.com/plu/JPSimulatorHacks 4 | 5 | ### URLs 6 | 7 | COMPONENT_ZIPBALL_URL=$(GH_REPO)/archive/$(VERSION).zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION) 18 | 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | 43 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/JPSimulatorHacks/JPSimulatorHacks.[hm] $(COMPONENT_INSTALL_PATH) 44 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/JPSimulatorHacks/JPSimulatorHacksDB.[hm] $(COMPONENT_INSTALL_PATH) 45 | 46 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 47 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 48 | 49 | $(COMPONENT_ZIPBALL_PATH): 50 | mkdir -p $(COMPONENT_BUILD_PATH) 51 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 52 | 53 | -------------------------------------------------------------------------------- /Components.make/Cedar/0.11.3/Cedar-iOS.make: -------------------------------------------------------------------------------- 1 | NAME=Cedar-iOS 2 | VERSION=0.11.3 3 | 4 | GH_REPO=pivotal/cedar 5 | 6 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 7 | COMPONENTS_INSTALL_PATH ?= ./Components 8 | 9 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 10 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 11 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 12 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME).framework 13 | 14 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 15 | 16 | ### URLs 17 | 18 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/v$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(COMPONENT_ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_FRAMEWORK_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -R $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_FRAMEWORK_PATH): $(COMPONENT_SOURCE_PATH) 44 | cd $(COMPONENT_SOURCE_PATH)/cedar-$(VERSION) && rake frameworks:ios:build 45 | cp -Rv $(COMPONENT_SOURCE_PATH)/cedar-$(VERSION)/build/Release-iphoneuniversal/$(NAME).framework $(COMPONENT_FRAMEWORK_PATH) 46 | 47 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 48 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 49 | 50 | $(COMPONENT_ZIPBALL_PATH): 51 | mkdir -p $(COMPONENT_BUILD_PATH) 52 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 53 | 54 | -------------------------------------------------------------------------------- /Components.make/Cedar/0.13.0/Cedar-iOS.make: -------------------------------------------------------------------------------- 1 | NAME=Cedar-iOS 2 | VERSION=0.13.0 3 | 4 | GH_REPO=pivotal/cedar 5 | 6 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 7 | COMPONENTS_INSTALL_PATH ?= ./Components 8 | 9 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 10 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 11 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 12 | COMPONENT_FRAMEWORK_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME).framework 13 | 14 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 15 | 16 | ### URLs 17 | 18 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/v$(VERSION).zip 19 | 20 | ### Targets 21 | 22 | .PHONY: install update uninstall clean prepare purge 23 | 24 | install: $(COMPONENT_INSTALL_PATH) 25 | 26 | uninstall: 27 | rm -rf $(COMPONENT_INSTALL_PATH) 28 | 29 | update: uninstall install 30 | 31 | clean: 32 | rm -rf $(COMPONENT_SOURCE_PATH) 33 | rm -rf $(COMPONENT_ZIPBALL_PATH) 34 | 35 | purge: uninstall clean 36 | 37 | ### Artefacts 38 | 39 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_FRAMEWORK_PATH) 40 | mkdir -p $(COMPONENT_INSTALL_PATH) 41 | cp -R $(COMPONENT_FRAMEWORK_PATH) $(COMPONENT_INSTALL_PATH) 42 | 43 | $(COMPONENT_FRAMEWORK_PATH): $(COMPONENT_SOURCE_PATH) 44 | cd $(COMPONENT_SOURCE_PATH)/cedar-$(VERSION) && rake frameworks:ios:build_static 45 | cp -Rv $(COMPONENT_SOURCE_PATH)/cedar-$(VERSION)/build/Release-iphoneuniversal/$(NAME).framework $(COMPONENT_FRAMEWORK_PATH) 46 | 47 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 48 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 49 | 50 | $(COMPONENT_ZIPBALL_PATH): 51 | mkdir -p $(COMPONENT_BUILD_PATH) 52 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 53 | 54 | -------------------------------------------------------------------------------- /Components.make/DDHotKey/master/DDHotKey.make: -------------------------------------------------------------------------------- 1 | NAME=DDHotKey 2 | VERSION=master 3 | GH_REPO=davedelong/DDHotKey 4 | 5 | ### URLs 6 | 7 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/$(VERSION).zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION) 18 | 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME) 20 | COMPONENT_XCCONFIG_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/$(NAME).xcconfig 21 | 22 | define COMPONENT_XCCONFIG 23 | DDHOTKEY_OTHER_LDFLAGS=-framework Carbon 24 | endef 25 | export COMPONENT_XCCONFIG 26 | 27 | ### Targets 28 | 29 | .PHONY: install update uninstall clean prepare purge 30 | 31 | install: $(COMPONENT_INSTALL_PATH) 32 | 33 | uninstall: 34 | rm -rf $(COMPONENT_INSTALL_PATH) 35 | 36 | update: uninstall install 37 | 38 | clean: 39 | rm -rf $(COMPONENT_SOURCE_PATH) 40 | rm -rf $(COMPONENT_ZIPBALL_PATH) 41 | 42 | purge: uninstall clean 43 | 44 | ### Artefacts 45 | 46 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_SOURCE_PATH) 47 | mkdir -p $(COMPONENT_INSTALL_PATH) 48 | 49 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/DDHotKeyCenter.[hm] $(COMPONENT_INSTALL_PATH) 50 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/DDHotKeyTextField.[hm] $(COMPONENT_INSTALL_PATH) 51 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/DDHotKeyUtilities.[hm] $(COMPONENT_INSTALL_PATH) 52 | 53 | echo "$$COMPONENT_XCCONFIG" > $(COMPONENT_XCCONFIG_INSTALL_PATH) 54 | 55 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 56 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 57 | 58 | $(COMPONENT_ZIPBALL_PATH): 59 | mkdir -p $(COMPONENT_BUILD_PATH) 60 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 61 | 62 | -------------------------------------------------------------------------------- /Components.make/KIF/3.3.0/KIF.make: -------------------------------------------------------------------------------- 1 | NAME=KIF 2 | VERSION=3.3.0 3 | GH_REPO=kif-framework/KIF 4 | 5 | ### URLs 6 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/v$(VERSION).zip 7 | 8 | ### Paths 9 | 10 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 11 | COMPONENTS_INSTALL_PATH ?= ./Components 12 | 13 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 14 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 15 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 16 | COMPONENT_XCODEPROJ_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION)/KIF.xcodeproj 17 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/Artefacts/KIF 18 | 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/$(NAME) 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_ARTEFACT_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/include/KIF/* $(COMPONENT_INSTALL_PATH) 43 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/libKIF.a $(COMPONENT_INSTALL_PATH) 44 | 45 | $(COMPONENT_ARTEFACT_PATH): $(COMPONENT_SOURCE_PATH) 46 | xcodebuild \ 47 | ONLY_ACTIVE_ARCH=NO \ 48 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH) \ 49 | -project $(COMPONENT_XCODEPROJ_PATH) \ 50 | -configuration Debug \ 51 | -sdk iphonesimulator \ 52 | -arch "i386" -arch "x86_64" \ 53 | clean build 54 | 55 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 56 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 57 | 58 | $(COMPONENT_ZIPBALL_PATH): 59 | mkdir -p $(COMPONENT_BUILD_PATH) 60 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 61 | 62 | -------------------------------------------------------------------------------- /Components.make/OHHTTPStubs/5.0.0/OHHTTPStubs.make: -------------------------------------------------------------------------------- 1 | NAME=OHHTTPStubs 2 | VERSION=5.0.0 3 | 4 | ### URLs 5 | 6 | GH_REPO=AliSoftware/OHHTTPStubs 7 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/archive/${VERSION}.zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_XCODEPROJ_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION)/$(NAME)/$(NAME).xcodeproj 18 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/Artefacts/$(NAME) 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_ARTEFACT_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | cp -R $(COMPONENT_ARTEFACT_PATH)/$(NAME).framework $(COMPONENT_INSTALL_PATH) 43 | 44 | $(COMPONENT_ARTEFACT_PATH): $(COMPONENT_SOURCE_PATH) 45 | xcodebuild \ 46 | ONLY_ACTIVE_ARCH=NO \ 47 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH) \ 48 | -project $(COMPONENT_XCODEPROJ_PATH) \ 49 | -scheme "OHHTTPStubs iOS Framework" \ 50 | -configuration Debug \ 51 | -sdk iphonesimulator \ 52 | -arch "i386" -arch "x86_64" \ 53 | clean build 54 | 55 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 56 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 57 | 58 | $(COMPONENT_ZIPBALL_PATH): 59 | mkdir -p $(COMPONENT_BUILD_PATH) 60 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 61 | 62 | -------------------------------------------------------------------------------- /Components.make/OHHTTPStubs/6.0.0/OHHTTPStubs.make: -------------------------------------------------------------------------------- 1 | NAME=OHHTTPStubs 2 | VERSION=6.0.0 3 | 4 | ### URLs 5 | 6 | GH_REPO=AliSoftware/OHHTTPStubs 7 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/archive/${VERSION}.zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_XCODEPROJ_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION)/$(NAME)/$(NAME).xcodeproj 18 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/Artefacts/$(NAME) 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): | $(COMPONENT_ARTEFACT_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | cp -rv $(COMPONENT_ARTEFACT_PATH)/$(NAME).framework $(COMPONENT_INSTALL_PATH) 43 | 44 | $(COMPONENT_ARTEFACT_PATH): | $(COMPONENT_SOURCE_PATH) 45 | xcodebuild \ 46 | ONLY_ACTIVE_ARCH=NO \ 47 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH) \ 48 | -project $(COMPONENT_XCODEPROJ_PATH) \ 49 | -scheme "OHHTTPStubs iOS Framework" \ 50 | -configuration Debug \ 51 | -sdk iphonesimulator \ 52 | -arch "i386" -arch "x86_64" \ 53 | clean build 54 | 55 | $(COMPONENT_SOURCE_PATH): | $(COMPONENT_ZIPBALL_PATH) 56 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 57 | 58 | $(COMPONENT_ZIPBALL_PATH): 59 | mkdir -p $(COMPONENT_BUILD_PATH) 60 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 61 | -------------------------------------------------------------------------------- /Components.make/OHHTTPStubs/5.1.0/OHHTTPStubs.make: -------------------------------------------------------------------------------- 1 | NAME=OHHTTPStubs 2 | VERSION=5.1.0 3 | 4 | ### URLs 5 | 6 | GH_REPO=AliSoftware/OHHTTPStubs 7 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/archive/${VERSION}.zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_XCODEPROJ_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION)/$(NAME)/$(NAME).xcodeproj 18 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/Artefacts/$(NAME) 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): | $(COMPONENT_ARTEFACT_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | cp -rv $(COMPONENT_ARTEFACT_PATH)/$(NAME).framework $(COMPONENT_INSTALL_PATH) 43 | 44 | $(COMPONENT_ARTEFACT_PATH): | $(COMPONENT_SOURCE_PATH) 45 | xcodebuild \ 46 | ONLY_ACTIVE_ARCH=NO \ 47 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH) \ 48 | -project $(COMPONENT_XCODEPROJ_PATH) \ 49 | -scheme "OHHTTPStubs iOS Framework" \ 50 | -configuration Debug \ 51 | -sdk iphonesimulator \ 52 | -arch "i386" -arch "x86_64" \ 53 | clean build 54 | 55 | $(COMPONENT_SOURCE_PATH): | $(COMPONENT_ZIPBALL_PATH) 56 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 57 | 58 | $(COMPONENT_ZIPBALL_PATH): 59 | mkdir -p $(COMPONENT_BUILD_PATH) 60 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 61 | 62 | -------------------------------------------------------------------------------- /Components.make/OHHTTPStubs/5.2.0/OHHTTPStubs.make: -------------------------------------------------------------------------------- 1 | NAME=OHHTTPStubs 2 | VERSION=5.2.0 3 | 4 | ### URLs 5 | 6 | GH_REPO=AliSoftware/OHHTTPStubs 7 | COMPONENT_ZIPBALL_URL=https://github.com/${GH_REPO}/archive/${VERSION}.zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_XCODEPROJ_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION)/$(NAME)/$(NAME).xcodeproj 18 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/Artefacts/$(NAME) 19 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 20 | 21 | ### Targets 22 | 23 | .PHONY: install update uninstall clean prepare purge 24 | 25 | install: $(COMPONENT_INSTALL_PATH) 26 | 27 | uninstall: 28 | rm -rf $(COMPONENT_INSTALL_PATH) 29 | 30 | update: uninstall install 31 | 32 | clean: 33 | rm -rf $(COMPONENT_SOURCE_PATH) 34 | rm -rf $(COMPONENT_ZIPBALL_PATH) 35 | 36 | purge: uninstall clean 37 | 38 | ### Artefacts 39 | 40 | $(COMPONENT_INSTALL_PATH): | $(COMPONENT_ARTEFACT_PATH) 41 | mkdir -p $(COMPONENT_INSTALL_PATH) 42 | cp -rv $(COMPONENT_ARTEFACT_PATH)/$(NAME).framework $(COMPONENT_INSTALL_PATH) 43 | 44 | $(COMPONENT_ARTEFACT_PATH): | $(COMPONENT_SOURCE_PATH) 45 | xcodebuild \ 46 | ONLY_ACTIVE_ARCH=NO \ 47 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH) \ 48 | -project $(COMPONENT_XCODEPROJ_PATH) \ 49 | -scheme "OHHTTPStubs iOS Framework" \ 50 | -configuration Debug \ 51 | -sdk iphonesimulator \ 52 | -arch "i386" -arch "x86_64" \ 53 | clean build 54 | 55 | $(COMPONENT_SOURCE_PATH): | $(COMPONENT_ZIPBALL_PATH) 56 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 57 | 58 | $(COMPONENT_ZIPBALL_PATH): 59 | mkdir -p $(COMPONENT_BUILD_PATH) 60 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 61 | 62 | -------------------------------------------------------------------------------- /Components.make/VCRURLConnection/7c781bc81b60b079251e94c5ff5e966a0791abd2/VCRURLConnection.make: -------------------------------------------------------------------------------- 1 | NAME=VCRURLConnection 2 | # VERSION=0.2.0 # Unused in this Component since it works with revision 3 | 4 | ### URLs 5 | 6 | GH_REPO=dstnbrkr/VCRURLConnection 7 | REVISION=7c781bc81b60b079251e94c5ff5e966a0791abd2 8 | 9 | COMPONENT_ZIPBALL_URL=https://github.com/dstnbrkr/VCRURLConnection/archive/$(REVISION).zip 10 | 11 | ### Paths 12 | 13 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 14 | COMPONENTS_INSTALL_PATH ?= ./Components 15 | 16 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 17 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(REVISION).zip 18 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(REVISION) 19 | COMPONENT_XCODEPROJ_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(REVISION)/VCRURLConnection.xcodeproj 20 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/Artefacts/VCRURLConnection 21 | 22 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/$(NAME) 23 | 24 | ### Targets 25 | 26 | .PHONY: install update uninstall clean prepare purge 27 | 28 | install: $(COMPONENT_INSTALL_PATH) 29 | 30 | uninstall: 31 | rm -rf $(COMPONENT_INSTALL_PATH) 32 | 33 | update: uninstall install 34 | 35 | clean: 36 | rm -rf $(COMPONENT_SOURCE_PATH) 37 | rm -rf $(COMPONENT_ZIPBALL_PATH) 38 | 39 | purge: uninstall clean 40 | 41 | ### Artefacts 42 | 43 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_ARTEFACT_PATH) 44 | mkdir -p $(COMPONENT_INSTALL_PATH) 45 | 46 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/include/VCRURLConnection/* $(COMPONENT_INSTALL_PATH) 47 | cp -Rv $(COMPONENT_ARTEFACT_PATH)/libVCRURLConnection.a $(COMPONENT_INSTALL_PATH) 48 | 49 | $(COMPONENT_ARTEFACT_PATH): $(COMPONENT_SOURCE_PATH) 50 | xcodebuild \ 51 | ONLY_ACTIVE_ARCH=NO \ 52 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH) \ 53 | -project $(COMPONENT_XCODEPROJ_PATH) \ 54 | -configuration Debug \ 55 | -sdk iphonesimulator \ 56 | -arch "i386" -arch "x86_64" \ 57 | clean build 58 | 59 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 60 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 61 | 62 | $(COMPONENT_ZIPBALL_PATH): 63 | mkdir -p $(COMPONENT_BUILD_PATH) 64 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 65 | 66 | -------------------------------------------------------------------------------- /Components.make/KIF/3.3.2/KIF.make: -------------------------------------------------------------------------------- 1 | NAME=KIF 2 | VERSION=3.3.2 3 | GH_REPO=kif-framework/KIF 4 | 5 | ### URLs 6 | 7 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/v$(VERSION).zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_XCODEPROJ_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION)/KIF.xcodeproj 18 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/Artefacts/KIF 19 | COMPONENT_ARTEFACT_PATH_SIMULATOR=$(COMPONENT_ARTEFACT_PATH)/SIMULATOR 20 | COMPONENT_ARTEFACT_PATH_IPHONE=$(COMPONENT_ARTEFACT_PATH)/IPHONE 21 | COMPONENT_ARTEFACT_PATH_UNIVERSAL=$(COMPONENT_ARTEFACT_PATH)/UNIVERSAL 22 | 23 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/$(NAME) 24 | 25 | ### Targets 26 | 27 | .PHONY: install update uninstall clean prepare purge 28 | 29 | install: $(COMPONENT_INSTALL_PATH) 30 | 31 | uninstall: 32 | rm -rf $(COMPONENT_INSTALL_PATH) 33 | 34 | update: uninstall install 35 | 36 | clean: 37 | rm -rf $(COMPONENT_SOURCE_PATH) 38 | rm -rf $(COMPONENT_ZIPBALL_PATH) 39 | 40 | purge: uninstall clean 41 | 42 | ### Artefacts 43 | 44 | $(COMPONENT_INSTALL_PATH): | $(COMPONENT_ARTEFACT_PATH) 45 | mkdir -p $(COMPONENT_INSTALL_PATH) 46 | cp -Rv $(COMPONENT_ARTEFACT_PATH_UNIVERSAL)/include/KIF/* $(COMPONENT_INSTALL_PATH) 47 | cp -Rv $(COMPONENT_ARTEFACT_PATH_UNIVERSAL)/libKIF.a $(COMPONENT_INSTALL_PATH) 48 | 49 | $(COMPONENT_ARTEFACT_PATH): | $(COMPONENT_SOURCE_PATH) 50 | xcodebuild \ 51 | ONLY_ACTIVE_ARCH=NO \ 52 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH_SIMULATOR) \ 53 | -project $(COMPONENT_XCODEPROJ_PATH) \ 54 | -sdk iphonesimulator \ 55 | -destination 'platform=iOS Simulator,name=iPhone 6S Plus,OS=latest' \ 56 | -configuration Release \ 57 | clean build 58 | 59 | xcodebuild \ 60 | ONLY_ACTIVE_ARCH=NO \ 61 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH_IPHONE) \ 62 | -project $(COMPONENT_XCODEPROJ_PATH) \ 63 | -sdk iphoneos \ 64 | -configuration Release \ 65 | clean build 66 | 67 | mkdir -p $(COMPONENT_ARTEFACT_PATH_UNIVERSAL) 68 | 69 | cp -rv $(COMPONENT_ARTEFACT_PATH_IPHONE)/* $(COMPONENT_ARTEFACT_PATH_UNIVERSAL) 70 | 71 | lipo $(COMPONENT_ARTEFACT_PATH_IPHONE)/libKIF.a $(COMPONENT_ARTEFACT_PATH_SIMULATOR)/libKIF.a -create -output $(COMPONENT_ARTEFACT_PATH_UNIVERSAL)/libKIF.a 72 | 73 | $(COMPONENT_SOURCE_PATH): | $(COMPONENT_ZIPBALL_PATH) 74 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 75 | 76 | $(COMPONENT_ZIPBALL_PATH): 77 | mkdir -p $(COMPONENT_BUILD_PATH) 78 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 79 | 80 | -------------------------------------------------------------------------------- /Components.make/KIF/3.5.1/KIF.make: -------------------------------------------------------------------------------- 1 | NAME=KIF 2 | VERSION=3.5.1 3 | GH_REPO=kif-framework/KIF 4 | 5 | ### URLs 6 | 7 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/v$(VERSION).zip 8 | 9 | ### Paths 10 | 11 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 12 | COMPONENTS_INSTALL_PATH ?= ./Components 13 | 14 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 17 | COMPONENT_XCODEPROJ_PATH=$(COMPONENT_SOURCE_PATH)/$(NAME)-$(VERSION)/KIF.xcodeproj 18 | COMPONENT_ARTEFACT_PATH=$(COMPONENT_SOURCE_PATH)/Artefacts/KIF 19 | COMPONENT_ARTEFACT_PATH_SIMULATOR=$(COMPONENT_ARTEFACT_PATH)/SIMULATOR 20 | COMPONENT_ARTEFACT_PATH_IPHONE=$(COMPONENT_ARTEFACT_PATH)/IPHONE 21 | COMPONENT_ARTEFACT_PATH_UNIVERSAL=$(COMPONENT_ARTEFACT_PATH)/UNIVERSAL 22 | 23 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/$(NAME) 24 | 25 | ### Targets 26 | 27 | .PHONY: install update uninstall clean prepare purge 28 | 29 | install: $(COMPONENT_INSTALL_PATH) 30 | 31 | uninstall: 32 | rm -rf $(COMPONENT_INSTALL_PATH) 33 | 34 | update: uninstall install 35 | 36 | clean: 37 | rm -rf $(COMPONENT_SOURCE_PATH) 38 | rm -rf $(COMPONENT_ZIPBALL_PATH) 39 | 40 | purge: uninstall clean 41 | 42 | ### Artefacts 43 | 44 | $(COMPONENT_INSTALL_PATH): | $(COMPONENT_ARTEFACT_PATH) 45 | mkdir -p $(COMPONENT_INSTALL_PATH) 46 | cp -Rv $(COMPONENT_ARTEFACT_PATH_UNIVERSAL)/include/KIF/* $(COMPONENT_INSTALL_PATH) 47 | cp -Rv $(COMPONENT_ARTEFACT_PATH_UNIVERSAL)/libKIF.a $(COMPONENT_INSTALL_PATH) 48 | 49 | $(COMPONENT_ARTEFACT_PATH): | $(COMPONENT_SOURCE_PATH) 50 | xcodebuild \ 51 | ONLY_ACTIVE_ARCH=NO \ 52 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH_SIMULATOR) \ 53 | -project $(COMPONENT_XCODEPROJ_PATH) \ 54 | -sdk iphonesimulator \ 55 | -destination 'platform=iOS Simulator,name=iPhone 6S Plus,OS=latest' \ 56 | -configuration Release \ 57 | clean build 58 | 59 | xcodebuild \ 60 | ONLY_ACTIVE_ARCH=NO \ 61 | CONFIGURATION_BUILD_DIR=$(COMPONENT_ARTEFACT_PATH_IPHONE) \ 62 | -project $(COMPONENT_XCODEPROJ_PATH) \ 63 | -sdk iphoneos \ 64 | -configuration Release \ 65 | clean build 66 | 67 | mkdir -p $(COMPONENT_ARTEFACT_PATH_UNIVERSAL) 68 | 69 | cp -rv $(COMPONENT_ARTEFACT_PATH_IPHONE)/* $(COMPONENT_ARTEFACT_PATH_UNIVERSAL) 70 | 71 | lipo $(COMPONENT_ARTEFACT_PATH_IPHONE)/libKIF.a $(COMPONENT_ARTEFACT_PATH_SIMULATOR)/libKIF.a -create -output $(COMPONENT_ARTEFACT_PATH_UNIVERSAL)/libKIF.a 72 | 73 | $(COMPONENT_SOURCE_PATH): | $(COMPONENT_ZIPBALL_PATH) 74 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 75 | 76 | $(COMPONENT_ZIPBALL_PATH): 77 | mkdir -p $(COMPONENT_BUILD_PATH) 78 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 79 | 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Components 2 | 3 | > Systems are built from **Components**, not from **Dependencies** 4 | 5 | ### About 6 | 7 | Components is a bare-bones dependency management system: dependencies are called "components", each component has its build rules in its own .make file, `components` driver enumerates all .make files by running Make on them and that installs all components in a way that you explicitly prescribed. 8 | 9 | The concept is inspired by [FreeBSD Ports](https://en.wikipedia.org/wiki/FreeBSD_Ports). 10 | 11 | Work in progress, here are two articles where you can find more information: 12 | 13 | [Components: taking a step back from Dependency Management](http://lowlevelbits.org/components-management) 14 | 15 | [How to build a static iOS framework and distribute it as a Component using Make](http://stanislaw.github.io/2015/11/23/how-to-build-static-framework-using-make.html) 16 | 17 | ### Installation 18 | 19 | Components driver is written in Rust programming language and is installed via: 20 | 21 | ```bash 22 | brew install alexdenisov/components/components 23 | ``` 24 | 25 | If you don't want your project to be dependent on external tool you may use original [156-lines driver written in Bash](https://github.com/AlexDenisov/Components/blob/master/History/components.sh) that you can store in a root of your project. 26 | 27 | ### Contribution 28 | 29 | If you liked the concept and want to contribute a Component be sure to read introductory articles and review existing Components in `Components.make` folder. The following are work-in-progress guidelines we adhere to when we create Components. 30 | 31 | #### Testing a Component 32 | 33 | Be aware that the file structure inside `Components.make` folder in this repository is different from such in end-user projects as here we also maintain multiple versions of Components. So to be able to test your newly created `.make` file inside this repository, you can pass `COMPONENTS_MAKE_PATH` variable pointing to your new component's folder. So for example if you're creating a Component from `utf8proc 1.3.1` library, you should put `utf8proc.make` to the `Components.make/utf8proc/1.3.1` folder and point `COMPONENTS_MAKE_PATH` variable to it: 34 | 35 | ``` 36 | COMPONENTS_MAKE_PATH=./Components.make/utf8proc/1.3.1 ./components.sh install 37 | ``` 38 | 39 | This will make `components.sh` driver script to source `.make` files from `Components.make/utf8proc/1.3.1` directory. 40 | 41 | #### Precompiled binary package distribution is recommended 42 | 43 | If you are a maintainer of your own library we recommend you to distribute it as precompiled package i.e. static library or framework. While it is possible to write `.make` file which will copy your project's source files to an installation directory or which will build static framework from your library on consumer's side, frameworks are much faster to download and install since consumer of your component does not need to build them on his own. Also `.make` rules for libraries with binary distribution are shorter and therefore easier to deal with. Most likely you'll end up with your zipped project's binaries published in your Github Releases ([example](https://github.com/stanislaw/CompositeOperations/releases)), having that in place it is very easy to create .make file which downloads zip/tar, unpacks it and then copies to your project's `Components` directory. 44 | 45 | #### We are here to help 46 | 47 | If you have any questions about how to create a proper Component, how Make works or how to create static framework etc feel free to open issue and ask. 48 | 49 | ### Authors 50 | 51 | The concept is brought to you by [AlexDenisov](https://github.com/AlexDenisov) and [Stanislaw Pankevich](https://github.com/stanislaw). 52 | 53 | ### License 54 | 55 | Released under MIT license, see `LICENSE` for more details. 56 | 57 | -------------------------------------------------------------------------------- /Components.make/BraintreeSDK/4.3.1/BraintreeSDK.make: -------------------------------------------------------------------------------- 1 | NAME=BraintreeSDK 2 | VERSION=4.3.1 3 | 4 | GH_REPO=braintree/braintree_ios 5 | 6 | COMPONENTS_BUILD_CACHE_PATH ?= $(HOME)/Library/Caches/Components 7 | COMPONENTS_INSTALL_PATH ?= ./Components 8 | 9 | COMPONENT_BUILD_PATH=$(COMPONENTS_BUILD_CACHE_PATH)/$(NAME) 10 | COMPONENT_SOURCE_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION) 11 | COMPONENT_PROJECT_PATH=$(COMPONENT_SOURCE_PATH)/braintree_ios-$(VERSION) 12 | 13 | COMPONENT_INSTALL_PATH=$(COMPONENTS_INSTALL_PATH)/$(NAME)/ 14 | 15 | COMPONENT_ZIPBALL_PATH=$(COMPONENT_BUILD_PATH)/$(NAME)-$(VERSION).zip 16 | 17 | BUILD_DIR=$(COMPONENT_PROJECT_PATH)/Build 18 | BUILD_DIR_SIMULATOR=$(BUILD_DIR)/Release-iphonesimulator 19 | BUILD_DIR_IPHONE=$(BUILD_DIR)/Release-iphoneos 20 | 21 | COMPONENT_ARTEFACT_PATH=$(BUILD_DIR)/Release-universal 22 | 23 | ### URLs 24 | COMPONENT_ZIPBALL_URL=https://github.com/$(GH_REPO)/archive/$(VERSION).zip 25 | 26 | ### Targets 27 | 28 | .PHONY: install update uninstall clean prepare purge 29 | 30 | install: $(COMPONENT_INSTALL_PATH) 31 | 32 | uninstall: 33 | rm -rf $(COMPONENT_INSTALL_PATH) 34 | 35 | update: uninstall install 36 | 37 | clean: 38 | rm -rf $(COMPONENT_SOURCE_PATH) 39 | rm -rf $(COMPONENT_ZIPBALL_PATH) 40 | 41 | purge: uninstall clean 42 | 43 | ### Artefacts 44 | 45 | $(COMPONENT_INSTALL_PATH): $(COMPONENT_ARTEFACT_PATH) 46 | mkdir -p $(COMPONENT_INSTALL_PATH) 47 | cp -rv $(COMPONENT_ARTEFACT_PATH)/* $(COMPONENT_INSTALL_PATH) 48 | 49 | $(COMPONENT_ARTEFACT_PATH): $(COMPONENT_SOURCE_PATH) 50 | cd $(COMPONENT_SOURCE_PATH)/braintree_ios-$(VERSION) && xcodebuild -project Braintree.xcodeproj \ 51 | -scheme Braintree \ 52 | -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu` \ 53 | -sdk iphonesimulator \ 54 | -destination 'platform=iOS Simulator,name=iPhone 6S Plus,OS=latest' \ 55 | -configuration Release \ 56 | CONFIGURATION_BUILD_DIR=$(BUILD_DIR_SIMULATOR) \ 57 | clean build 58 | 59 | cd $(COMPONENT_SOURCE_PATH)/braintree_ios-$(VERSION) && xcodebuild -project Braintree.xcodeproj \ 60 | -scheme Braintree \ 61 | -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu` \ 62 | -sdk iphoneos \ 63 | -configuration Release \ 64 | CONFIGURATION_BUILD_DIR=$(BUILD_DIR_IPHONE) \ 65 | clean build 66 | 67 | mkdir -p $(COMPONENT_ARTEFACT_PATH) 68 | cp -Rv $(BUILD_DIR_IPHONE)/* $(COMPONENT_ARTEFACT_PATH)/ 69 | 70 | lipo $(BUILD_DIR_SIMULATOR)/libBraintree.a $(BUILD_DIR_IPHONE)/libBraintree.a -create -output $(COMPONENT_ARTEFACT_PATH)/libBraintree.a 71 | lipo $(BUILD_DIR_SIMULATOR)/libPayPalDataCollector-StaticLibrary.a $(BUILD_DIR_IPHONE)/libPayPalDataCollector-StaticLibrary.a -create -output $(COMPONENT_ARTEFACT_PATH)/libPayPalDataCollector-StaticLibrary.a 72 | lipo $(BUILD_DIR_SIMULATOR)/libPayPalOneTouch-StaticLibrary.a $(BUILD_DIR_IPHONE)/libPayPalOneTouch-StaticLibrary.a -create -output $(COMPONENT_ARTEFACT_PATH)/libPayPalOneTouch-StaticLibrary.a 73 | 74 | cp -rv $(COMPONENT_PROJECT_PATH)/Braintree3DSecure/Public/*.h $(COMPONENT_ARTEFACT_PATH)/include 75 | cp -rv $(COMPONENT_PROJECT_PATH)/BraintreeApplePay/Public/*.h $(COMPONENT_ARTEFACT_PATH)/include 76 | cp -rv $(COMPONENT_PROJECT_PATH)/BraintreeCard/Public/*.h $(COMPONENT_ARTEFACT_PATH)/include 77 | cp -rv $(COMPONENT_PROJECT_PATH)/BraintreeCore/Public/*.h $(COMPONENT_ARTEFACT_PATH)/include 78 | cp -rv $(COMPONENT_PROJECT_PATH)/BraintreeDataCollector/Public/*.h $(COMPONENT_ARTEFACT_PATH)/include 79 | cp -rv $(COMPONENT_PROJECT_PATH)/BraintreePayPal/Public/*.h $(COMPONENT_ARTEFACT_PATH)/include 80 | cp -rv $(COMPONENT_PROJECT_PATH)/BraintreeUI/Public/*.h $(COMPONENT_ARTEFACT_PATH)/include 81 | cp -rv $(COMPONENT_PROJECT_PATH)/BraintreeUnionPay/Public/*.h $(COMPONENT_ARTEFACT_PATH)/include 82 | cp -rv $(COMPONENT_PROJECT_PATH)/BraintreeVenmo/Public/*.h $(COMPONENT_ARTEFACT_PATH)/include 83 | 84 | $(COMPONENT_SOURCE_PATH): $(COMPONENT_ZIPBALL_PATH) 85 | unzip $(COMPONENT_ZIPBALL_PATH) -d $(COMPONENT_SOURCE_PATH) 86 | 87 | $(COMPONENT_ZIPBALL_PATH): 88 | mkdir -p $(COMPONENT_BUILD_PATH) 89 | wget --no-use-server-timestamps $(COMPONENT_ZIPBALL_URL) -O $(COMPONENT_ZIPBALL_PATH) 90 | 91 | -------------------------------------------------------------------------------- /History/components.sh: -------------------------------------------------------------------------------- 1 | ### Variables 2 | 3 | ##### Local 4 | readonly COMPONENTS_VERSION=0.2.0 5 | readonly COMPONENTS_TEMP_PATH=/tmp/components 6 | readonly SCRIPT_NAME=$0 7 | 8 | ##### Global 9 | readonly export COMPONENTS_BUILD_CACHE_PATH=$HOME/Library/Caches/Components 10 | readonly export COMPONENTS_INSTALL_PATH=$PWD/Components 11 | readonly export COMPONENTS_MAKE_PATH=${COMPONENTS_MAKE_PATH:-$PWD/Components.make} 12 | 13 | ### Messages 14 | 15 | function argument_error() { 16 | message="" 17 | if [[ -z $1 ]] 18 | then 19 | message="command is missing" 20 | else 21 | message="invalid command: '$1'" 22 | fi 23 | echo "$message" 24 | echo "run '$SCRIPT_NAME' to see help" 25 | } 26 | 27 | function usage() { 28 | cat << EOL 29 | $SCRIPT_NAME version $COMPONENTS_VERSION 30 | 31 | Usage: 32 | $SCRIPT_NAME [explain] command [components] 33 | 34 | command: 35 | install - downloads, builds (if needed) and installs component 36 | into a vendor directory (COMPONENTS_INSTALL_PATH) 37 | uninstall - removes component from a vendor directory (COMPONENTS_INSTALL_PATH) 38 | clean - removes downloaded files and built artefacts from 39 | cache dir (COMPONENTS_BUILD_CACHE_PATH) 40 | purge - cleans and uninstalls component 41 | update - uninstalls current and installs new version of a component 42 | 43 | explain: 44 | print the commands that would be executed, but do not execute them 45 | 46 | components: 47 | one or more component name, enumerates all components in the components 48 | directory (COMPONENTS_MAKE_PATH) if the parameter is omitted 49 | 50 | Directories: 51 | COMPONENTS_MAKE_PATH - directory contains all components used in the current project 52 | $COMPONENTS_MAKE_PATH 53 | COMPONENTS_INSTALL_PATH - directory contains all installed components for the current project 54 | $COMPONENTS_INSTALL_PATH 55 | COMPONENTS_BUILD_CACHE_PATH - stores zip/tarballs, built artefacts, or source code of used components 56 | $COMPONENTS_BUILD_CACHE_PATH 57 | 58 | Debugging: 59 | Set environment variable 'DEBUG' to 'YES' to enable debugging output. 60 | It will run make with additional parameters '-r -d' and will send output to 'STDOUT'. 61 | 62 | From 'man make': 63 | -d Print debugging information in addition to normal processing. 64 | -r Eliminate use of the built−in implicit rules. 65 | 66 | Examples: 67 | $SCRIPT_NAME install # installs every component in the components directory (COMPONENTS_MAKE_PATH) 68 | $SCRIPT_NAME purge Cedar # cleans and uninstalls Cedar library 69 | $SCRIPT_NAME update BloodMagic # uninstalls current and installs new version of BloodMagic library 70 | $SCRIPT_NAME clean BloodMagic Cedar # cleans up Cedar' and BloodMagic' artefacts 71 | $SCRIPT_NAME explain install # prints commands that would be executed to install each component 72 | DEBUG=YES $SCRIPT_NAME install # prints additional information to 'STDOUT' 73 | EOL 74 | } 75 | 76 | ### Terminating 77 | 78 | function show_argument_error_and_die() { 79 | argument_error $1 && exit 1 80 | } 81 | 82 | function show_usage_and_die() { 83 | usage && exit 1 84 | } 85 | 86 | ### FS related stuff 87 | 88 | function prepare_directories() { 89 | mkdir -p $COMPONENTS_BUILD_CACHE_PATH 90 | mkdir -p $COMPONENTS_INSTALL_PATH 91 | mkdir -p $COMPONENTS_TEMP_PATH 92 | mkdir -p $COMPONENTS_MAKE_PATH 93 | } 94 | 95 | ### main 96 | 97 | function main() { 98 | local explain=0 99 | local command="" 100 | local components=() 101 | 102 | if [[ $# -eq 0 ]]; then 103 | show_usage_and_die 104 | fi 105 | 106 | if [[ $1 == "explain" ]]; then 107 | explain=1 108 | shift 109 | fi 110 | 111 | case $1 in 112 | install|uninstall|clean|purge|update) 113 | command=$1 114 | shift 115 | ;; 116 | *) 117 | show_argument_error_and_die $1 118 | ;; 119 | esac 120 | 121 | components=$@ 122 | 123 | if [[ -z $components ]]; then 124 | components=$(ls $COMPONENTS_MAKE_PATH | awk -F '.make' ' { print $1 } ') 125 | fi 126 | 127 | prepare_directories 128 | 129 | for component in $components; do 130 | logfile=$COMPONENTS_TEMP_PATH/$component.log 131 | make_flags=" --warn-undefined-variables " 132 | executing_message="[$command] $component:" 133 | success_message=" done.\n" 134 | failure_message=" failed. See $logfile for details.\n" 135 | 136 | if [[ $explain -eq 1 ]]; then 137 | logfile=/dev/stdout 138 | make_flags=" -n "$make_flags 139 | executing_message="$executing_message\n" 140 | success_message="" 141 | failure_message="" 142 | fi 143 | 144 | if [[ ! -z "$DEBUG" ]]; then 145 | logfile=/dev/stdout 146 | make_flags=" -r -d "$make_flags 147 | fi 148 | 149 | make_parameters="$command $make_flags -f $COMPONENTS_MAKE_PATH/$component.make" 150 | 151 | printf "$executing_message" 152 | make $make_parameters > $logfile 2>&1 && printf "$success_message" || printf "$failure_message" 153 | done 154 | } 155 | 156 | main $@ 157 | -------------------------------------------------------------------------------- /src/components.rs: -------------------------------------------------------------------------------- 1 | // Make-related variables are capitalized: 2 | // This is not Rust-way, but makes code readable where we interface with Make 3 | #![allow(non_snake_case)] 4 | 5 | static COMPONENTS_VERSION: &'static str = env!("CARGO_PKG_VERSION"); 6 | static COMPONENTS_DATE: &'static str = "2016-04-20"; 7 | 8 | use std::env; 9 | use std::fs; 10 | use std::fs::File; 11 | use std::io::Write; 12 | use std::process; 13 | use std::process::Command; 14 | use std::process::Stdio; 15 | use std::os::unix::prelude::*; 16 | 17 | fn main() { 18 | let command: String; 19 | let explain_mode: bool; 20 | let debug_mode: bool = env::vars().any(|k| k.0 == "DEBUG" ); 21 | 22 | if debug_mode { 23 | println!("Debug mode is enabled"); 24 | } 25 | 26 | let mut args = env::args(); 27 | 28 | if args.len() == 1 { 29 | println!("Components {} ({})\n\n{}", COMPONENTS_VERSION, COMPONENTS_DATE, COMPONENTS_USAGE_INSTRUCTIONS); 30 | 31 | process::exit(0); 32 | } 33 | 34 | args.next(); // skipping arg[0] 35 | 36 | let explain_or_command = args.next().unwrap(); 37 | if explain_or_command == "explain" { 38 | command = args.next().unwrap_or_else(|| { 39 | println!("provide a command to explain: install, update, purge etc"); 40 | process::exit(1); 41 | }); 42 | 43 | explain_mode = true; 44 | } else { 45 | command = explain_or_command; 46 | explain_mode = false; 47 | } 48 | 49 | if debug_mode { 50 | println!("command is: {}", &command); 51 | } 52 | 53 | let available_commands = ["install", "purge", "clean", "uninstall", "update"]; 54 | 55 | let index = available_commands.iter().position(|&r| r == command); 56 | if index.is_some() == false { 57 | println!("invalid command: {}", command); 58 | process::exit(1); 59 | } 60 | 61 | let current_dir = env::current_dir().unwrap(); 62 | let home_dir = env::home_dir().unwrap(); 63 | 64 | if debug_mode { 65 | println!("The current directory is: {}", current_dir.display()); 66 | println!("The home directory is: {}", home_dir.display()); 67 | } 68 | 69 | // Local 70 | let COMPONENTS_TEMP_PATH: &'static str = "/tmp/Components"; 71 | 72 | // Global (we'll pass them to Make) 73 | let COMPONENTS_BUILD_CACHE_PATH: std::path::PathBuf; 74 | if let Ok(value) = std::env::var("COMPONENTS_BUILD_CACHE_PATH") { 75 | COMPONENTS_BUILD_CACHE_PATH = std::path::PathBuf::from(value); 76 | } else { 77 | COMPONENTS_BUILD_CACHE_PATH = home_dir.join("Library/Caches/Components"); 78 | } 79 | 80 | let COMPONENTS_INSTALL_PATH: std::path::PathBuf; 81 | if let Ok(value) = std::env::var("COMPONENTS_INSTALL_PATH") { 82 | COMPONENTS_INSTALL_PATH = std::path::PathBuf::from(value); 83 | } else { 84 | COMPONENTS_INSTALL_PATH = current_dir.join("Components"); 85 | } 86 | 87 | let COMPONENTS_MAKE_PATH: std::path::PathBuf; 88 | if let Ok(value) = std::env::var("COMPONENTS_MAKE_PATH") { 89 | COMPONENTS_MAKE_PATH = std::path::PathBuf::from(value); 90 | } else { 91 | COMPONENTS_MAKE_PATH = current_dir.join("Components.make"); 92 | } 93 | 94 | if debug_mode { 95 | println!("COMPONENTS_MAKE_PATH: {}", COMPONENTS_MAKE_PATH.display()); 96 | println!("COMPONENTS_INSTALL_PATH: {}", COMPONENTS_INSTALL_PATH.display()); 97 | println!("COMPONENTS_BUILD_CACHE_PATH: {}", COMPONENTS_BUILD_CACHE_PATH.display()); 98 | } 99 | 100 | if COMPONENTS_MAKE_PATH.exists() == false { 101 | println!("Directory COMPONENTS_MAKE_PATH does not exist: {:?}", COMPONENTS_MAKE_PATH); 102 | process::exit(1); 103 | } 104 | 105 | fs::create_dir_all(&COMPONENTS_BUILD_CACHE_PATH).unwrap_or_else(|_| { 106 | println!("failed to create dir COMPONENTS_BUILD_CACHE_PATH: {:?}", COMPONENTS_BUILD_CACHE_PATH); 107 | process::exit(1); 108 | }); 109 | 110 | fs::create_dir_all(&COMPONENTS_INSTALL_PATH).unwrap_or_else(|_| { 111 | println!("failed to create dir COMPONENTS_INSTALL_PATH: {:?}", COMPONENTS_INSTALL_PATH); 112 | process::exit(1); 113 | }); 114 | 115 | fs::create_dir_all(&COMPONENTS_TEMP_PATH).unwrap_or_else(|_| { 116 | println!("failed to create dir COMPONENTS_TEMP_PATH: {:?}", COMPONENTS_TEMP_PATH); 117 | process::exit(1); 118 | }); 119 | 120 | let mut makeflags: Vec<&str> = vec!["--warn-undefined-variables"]; 121 | 122 | if explain_mode { 123 | makeflags.push("-n"); 124 | } 125 | 126 | if debug_mode { 127 | makeflags.push("-r"); 128 | makeflags.push("-d"); 129 | println!("Makeflags: {:?}", makeflags); 130 | } 131 | 132 | let components: Vec = args.collect(); 133 | 134 | let component_paths: Vec; 135 | 136 | if components.len() > 0 { 137 | if debug_mode { 138 | println!("Components: {:?}", components); 139 | } 140 | 141 | let mut should_break = false; 142 | 143 | let existing_components = { 144 | let existing_component_paths_iterator: fs::ReadDir = fs::read_dir(&COMPONENTS_MAKE_PATH).unwrap(); 145 | 146 | existing_component_paths_iterator.map(|entry| { 147 | let entry = entry.unwrap(); 148 | let entry_path = entry.path(); 149 | entry_path.file_stem().unwrap().to_str().unwrap().to_string() 150 | }).collect::>() 151 | }; 152 | 153 | for component in &components { 154 | let component_exists = existing_components.iter().any(|existing_component| existing_component == component); 155 | 156 | if component_exists == false { 157 | println!("Could not find component: {}", component); 158 | should_break = true; 159 | } 160 | } 161 | 162 | if should_break { 163 | process::exit(1); 164 | } 165 | 166 | let selected_component_paths_iterator = { 167 | let existing_component_paths_iterator: fs::ReadDir = fs::read_dir(&COMPONENTS_MAKE_PATH).unwrap(); 168 | 169 | existing_component_paths_iterator.filter(|entry| { 170 | let entry = entry.as_ref().unwrap(); 171 | let entry_path = entry.path(); 172 | let component_name = entry_path.file_stem().unwrap().to_str().unwrap(); 173 | components.iter().any(|c| c == component_name) 174 | }) 175 | }; 176 | 177 | component_paths = selected_component_paths_iterator.map(|entry| { 178 | let entry = entry.unwrap(); 179 | let entry_path = entry.path(); 180 | entry_path 181 | }).collect::>(); 182 | } else { 183 | let existing_component_paths_iterator: fs::ReadDir = fs::read_dir(&COMPONENTS_MAKE_PATH).unwrap(); 184 | 185 | component_paths = existing_component_paths_iterator.map(|entry| { 186 | let entry = entry.unwrap(); 187 | let entry_path = entry.path(); 188 | entry_path 189 | }).collect::>(); 190 | } 191 | 192 | let mut success = true; 193 | for path in component_paths { 194 | let path_is_valid_component_make = path.is_file() && path.extension().is_some() && path.extension().unwrap() == "make"; 195 | 196 | if path_is_valid_component_make == false { 197 | println!("COMPONENTS_MAKE_PATH directory contains non-builable artefacts (must only consist of *.make)"); 198 | process::exit(1); 199 | } 200 | 201 | unsafe { 202 | let component_name = path.file_stem().unwrap().to_str().unwrap(); 203 | 204 | let logpath = format!("/tmp/Components/{}.log", component_name); 205 | 206 | let logfile = File::create(&logpath).unwrap(); 207 | 208 | let fd = logfile.as_raw_fd(); 209 | 210 | let (stdout, stderr) = if debug_mode || explain_mode { 211 | (Stdio::inherit(), Stdio::inherit()) 212 | } else { 213 | (Stdio::from_raw_fd(fd), Stdio::from_raw_fd(fd)) 214 | }; 215 | 216 | print!("[{}] {}:", command, component_name); 217 | 218 | std::io::stdout().flush().unwrap(); 219 | 220 | let status = Command::new("make") 221 | .arg(&command) 222 | .args(&makeflags) 223 | .arg("-f") 224 | .arg(path.to_str().unwrap()) 225 | .env("COMPONENTS_INSTALL_PATH", COMPONENTS_INSTALL_PATH.as_os_str()) 226 | .env("COMPONENTS_MAKE_PATH", COMPONENTS_MAKE_PATH.as_os_str()) 227 | .stdout(stdout) 228 | .stderr(stderr) 229 | .status().unwrap_or_else(|e| { 230 | panic!("failed to execute process: {}", e) 231 | }); 232 | 233 | if status.success() { 234 | print!(" done.\n"); 235 | } else { 236 | print!(" failed. See log for details:\n{}\n", &logpath); 237 | success = false; 238 | } 239 | } 240 | } 241 | 242 | if success { 243 | process::exit(0); 244 | } else { 245 | process::exit(1); 246 | } 247 | } 248 | 249 | static COMPONENTS_USAGE_INSTRUCTIONS: &'static str = "\ 250 | Usage: 251 | components [explain] command [components] 252 | 253 | command: 254 | install - downloads, builds (if needed) and installs component 255 | into a vendor directory (COMPONENTS_INSTALL_PATH) 256 | uninstall - removes component from a vendor directory (COMPONENTS_INSTALL_PATH) 257 | clean - removes downloaded files and built artefacts from 258 | cache directory (COMPONENTS_BUILD_CACHE_PATH) 259 | purge - cleans and uninstalls component 260 | update - uninstalls current and installs new version of a component 261 | 262 | explain: 263 | print the commands that would be executed, but do not execute them 264 | 265 | components: 266 | one or more component name, enumerates all components in the components 267 | directory (COMPONENTS_MAKE_PATH) if the parameter is omitted 268 | 269 | Directories: 270 | COMPONENTS_MAKE_PATH - directory contains all components used in the current project 271 | $COMPONENTS_MAKE_PATH 272 | COMPONENTS_INSTALL_PATH - directory contains all installed components for the current project 273 | $COMPONENTS_INSTALL_PATH 274 | COMPONENTS_BUILD_CACHE_PATH - stores zip/tarballs, built artefacts, or source code of used components 275 | $COMPONENTS_BUILD_CACHE_PATH 276 | 277 | Debugging: 278 | Set environment variable 'DEBUG' to 'YES' to enable debugging output. 279 | It will run make with additional parameters '-r -d' and will send output to 'STDOUT'. 280 | 281 | From 'man make': 282 | -d Print debugging information in addition to normal processing. 283 | -r Eliminate use of the built−in implicit rules. 284 | 285 | Examples: 286 | components install # installs every component from the components directory (COMPONENTS_MAKE_PATH) 287 | components purge Cedar # cleans and uninstalls Cedar library 288 | components update BloodMagic # uninstalls current and installs new version of BloodMagic library 289 | components clean BloodMagic Cedar # cleans up Cedar' and BloodMagic' artefacts 290 | components explain install # prints commands that would be executed to install each component 291 | DEBUG=YES components install # prints additional information to 'STDOUT'\ 292 | "; 293 | 294 | -------------------------------------------------------------------------------- /tests/components.rs: -------------------------------------------------------------------------------- 1 | // Make-related variables are capitalized: 2 | // This is not Rust-way, but makes code readable where we interface with Make 3 | #![allow(non_snake_case)] 4 | 5 | extern crate tempdir; 6 | 7 | use std::process::Command; 8 | use std::env; 9 | use std::fs::File; 10 | use std::io::prelude::*; 11 | use tempdir::*; 12 | 13 | static COMPONENT_TRIVIAL_CONTENTS: &'static str = "\ 14 | NAME=Component_Trivial 15 | COMPONENTS_INSTALL_PATH ?= ./Components 16 | COMPONENT_INSTALL_PATH ?= $(COMPONENTS_INSTALL_PATH)/$(NAME) 17 | 18 | install: 19 | mkdir -p $(COMPONENT_INSTALL_PATH) 20 | touch $(COMPONENT_INSTALL_PATH)/Component_Trivial.txt 21 | "; 22 | 23 | static COMPONENT_FAILING_CONTENTS: &'static str = "\ 24 | install: 25 | exit 1 26 | "; 27 | 28 | #[test] 29 | fn it_shows_usage_instructions() { 30 | let current_dir = env::current_dir().unwrap(); 31 | 32 | let COMPONENTS_EXEC; 33 | if let Ok(value) = std::env::var("COMPONENTS_EXEC") { 34 | COMPONENTS_EXEC = current_dir.join(value); 35 | } else { 36 | panic!("Didn't get executable to run"); 37 | } 38 | 39 | let output = Command::new(COMPONENTS_EXEC) 40 | .output().unwrap_or_else(|e| { 41 | panic!("failed to execute process: {}", e) 42 | }); 43 | 44 | let output_string = String::from_utf8_lossy(&output.stdout); 45 | 46 | //println!("status: {}", output.status); 47 | //println!("status: {}", output_string); 48 | 49 | assert!(output.status.success()); 50 | assert!(output_string.contains("Usage:")); 51 | assert!(output_string.contains("components [explain] command [components]")); 52 | } 53 | 54 | #[test] 55 | fn it_fails_and_reports_on_invalid_command() { 56 | let current_dir = env::current_dir().unwrap(); 57 | 58 | let COMPONENTS_EXEC; 59 | if let Ok(value) = std::env::var("COMPONENTS_EXEC") { 60 | COMPONENTS_EXEC = current_dir.join(value); 61 | } else { 62 | panic!("Didn't get executable to run"); 63 | } 64 | 65 | let output = Command::new(COMPONENTS_EXEC) 66 | .arg("wrong") 67 | .output().unwrap_or_else(|e| { 68 | panic!("failed to execute process: {}", e) 69 | }); 70 | 71 | let output_string = String::from_utf8_lossy(&output.stdout); 72 | 73 | //println!("status: {}", output.status); 74 | //println!("status: {}", output_string); 75 | 76 | assert!(output.status.success() == false); 77 | assert!(output_string.contains("invalid command: wrong")); 78 | } 79 | 80 | #[test] 81 | fn it_installs_component() { 82 | let current_dir = env::current_dir().unwrap(); 83 | let home_dir = env::home_dir().unwrap(); 84 | let tmp_dir = env::temp_dir(); 85 | let stage_dir = TempDir::new_in(tmp_dir.as_path(), "Components-Test").unwrap(); 86 | 87 | println!("The current directory is: {}", current_dir.display()); 88 | println!("The home directory is: {}", home_dir.display()); 89 | println!("The temporary directory is: {}", tmp_dir.display()); 90 | 91 | let components_install_dir = TempDir::new_in(stage_dir.path(), "Components").unwrap(); 92 | let components_make_dir = TempDir::new_in(stage_dir.path(), "Components.make").unwrap(); 93 | let components_build_cache_dir = TempDir::new_in(stage_dir.path(), "Cache").unwrap(); 94 | 95 | let COMPONENTS_EXEC; 96 | if let Ok(value) = std::env::var("COMPONENTS_EXEC") { 97 | COMPONENTS_EXEC = current_dir.join(value); 98 | } else { 99 | panic!("Didn't get executable to run"); 100 | } 101 | 102 | println!("COMPONENTS_INSTALL_PATH = {:?}", components_install_dir.path()); 103 | println!("COMPONENTS_MAKE_PATH = {:?}", components_make_dir.path()); 104 | println!("COMPONENTS_BUILD_CACHE_PATH = {:?}", components_build_cache_dir.path()); 105 | println!("COMPONENTS_EXEC = {:?}", COMPONENTS_EXEC); 106 | 107 | let component_make_path = components_make_dir.path().join("Component-Trivial.make"); 108 | 109 | println!("Component.make: {:?}", component_make_path); 110 | 111 | let mut f = File::create(component_make_path).unwrap(); 112 | 113 | f.write_all(COMPONENT_TRIVIAL_CONTENTS.as_bytes()); 114 | 115 | let output = Command::new(COMPONENTS_EXEC) 116 | .arg("install") 117 | .env("COMPONENTS_INSTALL_PATH", components_install_dir.path().as_os_str()) 118 | .env("COMPONENTS_MAKE_PATH", components_make_dir.path().as_os_str()) 119 | .env("COMPONENTS_BUILD_CACHE_PATH", components_build_cache_dir.path().as_os_str()) 120 | //.env("DEBUG", "YES") 121 | .output().unwrap_or_else(|e| { 122 | panic!("failed to execute process: {}", e) 123 | }); 124 | 125 | let output_string = String::from_utf8_lossy(&output.stdout); 126 | 127 | //println!("status: {}", output.status); 128 | //println!("status: {}", output_string); 129 | 130 | let component_file_path = components_install_dir.path().join("Component_Trivial").join("Component_Trivial.txt"); 131 | 132 | assert!(output.status.success()); 133 | assert!(output_string.contains("[install] Component-Trivial: done.")); 134 | assert!(component_file_path.exists()); 135 | assert!(component_file_path.is_file()); 136 | 137 | //std::thread::sleep_ms(1000000); 138 | } 139 | 140 | #[test] 141 | fn it_doesnot_install_broken_component_and_reports_error() { 142 | let current_dir = env::current_dir().unwrap(); 143 | let home_dir = env::home_dir().unwrap(); 144 | let tmp_dir = env::temp_dir(); 145 | let stage_dir = TempDir::new_in(tmp_dir.as_path(), "Components-Test").unwrap(); 146 | 147 | println!("The current directory is: {}", current_dir.display()); 148 | println!("The home directory is: {}", home_dir.display()); 149 | println!("The temporary directory is: {}", tmp_dir.display()); 150 | 151 | let components_install_dir = TempDir::new_in(stage_dir.path(), "Components").unwrap(); 152 | let components_make_dir = TempDir::new_in(stage_dir.path(), "Components.make").unwrap(); 153 | let components_build_cache_dir = TempDir::new_in(stage_dir.path(), "Cache").unwrap(); 154 | 155 | let COMPONENTS_EXEC; 156 | if let Ok(value) = std::env::var("COMPONENTS_EXEC") { 157 | COMPONENTS_EXEC = current_dir.join(value); 158 | } else { 159 | panic!("Didn't get executable to run"); 160 | } 161 | 162 | println!("COMPONENTS_INSTALL_PATH = {:?}", components_install_dir.path()); 163 | println!("COMPONENTS_MAKE_PATH = {:?}", components_make_dir.path()); 164 | println!("COMPONENTS_BUILD_CACHE_PATH = {:?}", components_build_cache_dir.path()); 165 | println!("COMPONENTS_EXEC = {:?}", COMPONENTS_EXEC); 166 | 167 | let component_make_path = components_make_dir.path().join("Component-Failing.make"); 168 | 169 | println!("Component.make: {:?}", component_make_path); 170 | 171 | let mut f = File::create(component_make_path).unwrap(); 172 | 173 | f.write_all(COMPONENT_FAILING_CONTENTS.as_bytes()); 174 | 175 | let output = Command::new(COMPONENTS_EXEC) 176 | .arg("install") 177 | .env("COMPONENTS_INSTALL_PATH", components_install_dir.path().as_os_str()) 178 | .env("COMPONENTS_MAKE_PATH", components_make_dir.path().as_os_str()) 179 | .env("COMPONENTS_BUILD_CACHE_PATH", components_build_cache_dir.path().as_os_str()) 180 | //.env("DEBUG", "YES") 181 | .output().unwrap_or_else(|e| { 182 | panic!("failed to execute process: {}", e) 183 | }); 184 | 185 | let output_string = String::from_utf8_lossy(&output.stdout); 186 | 187 | //println!("status: {}", output.status); 188 | //println!("status: {}", output_string); 189 | 190 | assert!(output.status.success() == false); 191 | assert!(output_string.contains("[install] Component-Failing: failed. See log for details:\n/tmp/Components/Component-Failing.log")); 192 | } 193 | 194 | #[test] 195 | fn it_refuses_to_operate_on_directory_with_non_make_stuff() { 196 | let current_dir = env::current_dir().unwrap(); 197 | let home_dir = env::home_dir().unwrap(); 198 | let tmp_dir = env::temp_dir(); 199 | let stage_dir = TempDir::new_in(tmp_dir.as_path(), "Components-Test").unwrap(); 200 | 201 | println!("The current directory is: {}", current_dir.display()); 202 | println!("The home directory is: {}", home_dir.display()); 203 | println!("The temporary directory is: {}", tmp_dir.display()); 204 | 205 | let components_install_dir = TempDir::new_in(stage_dir.path(), "Components").unwrap(); 206 | let components_make_dir = TempDir::new_in(stage_dir.path(), "Components.make").unwrap(); 207 | let components_build_cache_dir = TempDir::new_in(stage_dir.path(), "Cache").unwrap(); 208 | 209 | let COMPONENTS_EXEC; 210 | if let Ok(value) = std::env::var("COMPONENTS_EXEC") { 211 | COMPONENTS_EXEC = current_dir.join(value); 212 | } else { 213 | panic!("Didn't get executable to run"); 214 | } 215 | 216 | println!("COMPONENTS_INSTALL_PATH = {:?}", components_install_dir.path()); 217 | println!("COMPONENTS_MAKE_PATH = {:?}", components_make_dir.path()); 218 | println!("COMPONENTS_BUILD_CACHE_PATH = {:?}", components_build_cache_dir.path()); 219 | println!("COMPONENTS_EXEC = {:?}", COMPONENTS_EXEC); 220 | 221 | let component_make_path = components_make_dir.path().join("NON-COMPONENT-FILE"); 222 | 223 | let mut f = File::create(&component_make_path).unwrap(); 224 | f.write_all("BLIP!\n".as_bytes()); 225 | 226 | println!("---- {:?}", component_make_path); 227 | let output = Command::new(COMPONENTS_EXEC) 228 | .arg("install") 229 | .env("COMPONENTS_INSTALL_PATH", components_install_dir.path().as_os_str()) 230 | .env("COMPONENTS_MAKE_PATH", components_make_dir.path().as_os_str()) 231 | .env("COMPONENTS_BUILD_CACHE_PATH", components_build_cache_dir.path().as_os_str()) 232 | //.env("DEBUG", "YES") 233 | .output().unwrap_or_else(|e| { 234 | panic!("failed to execute process: {}", e) 235 | }); 236 | 237 | let output_string = String::from_utf8_lossy(&output.stdout); 238 | 239 | //println!("status: {}", output.status); 240 | println!("status: {}", output_string); 241 | 242 | assert!(output.status.success() == false); 243 | assert!(output_string.contains("COMPONENTS_MAKE_PATH directory contains non-builable artefacts (must only consist of *.make)")); 244 | } 245 | 246 | #[test] 247 | fn it_stops_when_COMPONENT_MAKE_PATH_directory_does_not_exist() { 248 | let current_dir = env::current_dir().unwrap(); 249 | let home_dir = env::home_dir().unwrap(); 250 | let tmp_dir = env::temp_dir(); 251 | let stage_dir = TempDir::new_in(tmp_dir.as_path(), "Components-Test").unwrap(); 252 | 253 | println!("The current directory is: {}", current_dir.display()); 254 | println!("The home directory is: {}", home_dir.display()); 255 | println!("The temporary directory is: {}", tmp_dir.display()); 256 | 257 | let components_install_dir = TempDir::new_in(stage_dir.path(), "Components").unwrap(); 258 | let components_build_cache_dir = TempDir::new_in(stage_dir.path(), "Cache").unwrap(); 259 | 260 | let components_make_non_existing_path = stage_dir.path().join("Components.make"); 261 | 262 | let COMPONENTS_EXEC; 263 | if let Ok(value) = std::env::var("COMPONENTS_EXEC") { 264 | COMPONENTS_EXEC = current_dir.join(value); 265 | } else { 266 | panic!("Didn't get executable to run"); 267 | } 268 | 269 | println!("COMPONENTS_INSTALL_PATH = {:?}", components_install_dir.path()); 270 | println!("COMPONENTS_BUILD_CACHE_PATH = {:?}", components_build_cache_dir.path()); 271 | println!("COMPONENTS_EXEC = {:?}", COMPONENTS_EXEC); 272 | 273 | let output = Command::new(COMPONENTS_EXEC) 274 | .arg("install") 275 | .env("COMPONENTS_INSTALL_PATH", components_install_dir.path().as_os_str()) 276 | .env("COMPONENTS_MAKE_PATH", components_make_non_existing_path.as_os_str()) 277 | .env("COMPONENTS_BUILD_CACHE_PATH", components_build_cache_dir.path().as_os_str()) 278 | //.env("DEBUG", "YES") 279 | .output().unwrap_or_else(|e| { 280 | panic!("failed to execute process: {}", e) 281 | }); 282 | 283 | let output_string = String::from_utf8_lossy(&output.stdout); 284 | 285 | //println!("status: {}", output_string); 286 | 287 | assert!(output.status.success() == false); 288 | assert!(output_string.contains("Directory COMPONENTS_MAKE_PATH does not exist:")); 289 | } 290 | --------------------------------------------------------------------------------