This repository has been archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from owensd/v0.2.1-dev
Homebrew support added.
- Loading branch information
Showing
5 changed files
with
236 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
TEMPORARY_FOLDER=/tmp/Apous.dst | ||
PREFIX=/usr/local | ||
BUILD_TOOL=xcodebuild | ||
|
||
XCODEFLAGS=-project 'apous.xcodeproj' -scheme 'apous' DSTROOT=$(TEMPORARY_FOLDER) | ||
|
||
APOUS_EXECUTABLE=$(TEMPORARY_FOLDER)/apous | ||
|
||
FRAMEWORKS_FOLDER=/Library/Frameworks | ||
BINARIES_FOLDER=/usr/local/bin | ||
|
||
VERSION_STRING=v0.2.0 | ||
COMPONENTS_PLIST=misc/Components.plist | ||
|
||
OUTPUT_PACKAGE=Apous.pkg | ||
|
||
.PHONY: all bootstrap clean install package test uninstall | ||
|
||
all: bootstrap | ||
$(BUILD_TOOL) $(XCODEFLAGS) build | ||
|
||
bootstrap: | ||
misc/scripts/bootstrap.sh | ||
|
||
test: clean bootstrap | ||
$(BUILD_TOOL) $(XCODEFLAGS) test | ||
|
||
clean: | ||
rm -f "$(OUTPUT_PACKAGE)" | ||
rm -rf "$(TEMPORARY_FOLDER)" | ||
$(BUILD_TOOL) $(XCODEFLAGS) clean | ||
|
||
install: package | ||
sudo installer -pkg "$(TEMPORARY_FOLDER)/$(OUTPUT_PACKAGE)" -target / | ||
|
||
uninstall: | ||
rm -f "$(BINARIES_FOLDER)/apous" | ||
|
||
installables: clean bootstrap | ||
$(BUILD_TOOL) $(XCODEFLAGS) install | ||
|
||
mkdir -p "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)" | ||
|
||
prefix_install: installables | ||
mkdir -p "$(PREFIX)/Frameworks" "$(PREFIX)/bin" | ||
cp -f "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)/apous" "$(PREFIX)/bin/" | ||
|
||
package: installables | ||
pkgbuild \ | ||
--component-plist "$(COMPONENTS_PLIST)" \ | ||
--identifier "io.owensd.apous" \ | ||
--install-location "/" \ | ||
--root "$(TEMPORARY_FOLDER)" \ | ||
--version "$(VERSION_STRING)" \ | ||
"$(TEMPORARY_FOLDER)/$(OUTPUT_PACKAGE)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0700" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "7D0373341B49021700E2711D" | ||
BuildableName = "apous" | ||
BlueprintName = "apous" | ||
ReferencedContainer = "container:apous.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
buildConfiguration = "Debug"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "7D0F00901B4AF32F003B6EF0" | ||
BuildableName = "apoustest.xctest" | ||
BlueprintName = "apoustest" | ||
ReferencedContainer = "container:apous.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "7D0373341B49021700E2711D" | ||
BuildableName = "apous" | ||
BlueprintName = "apous" | ||
ReferencedContainer = "container:apous.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
customWorkingDirectory = "/Users/owensd/Library/Developer/Xcode/DerivedData/apous-fvgxvrkkgylijchhwanxayhydwrh/Build/Products/Debug/samples/shebang" | ||
buildConfiguration = "Debug" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "7D0373341B49021700E2711D" | ||
BuildableName = "apous" | ||
BlueprintName = "apous" | ||
ReferencedContainer = "container:apous.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
<CommandLineArguments> | ||
<CommandLineArgument | ||
argument = "~/Projects/owensd.io/apous/samples/carthage" | ||
isEnabled = "NO"> | ||
</CommandLineArgument> | ||
<CommandLineArgument | ||
argument = "/Users/owensd/Library/Developer/Xcode/DerivedData/apous-fvgxvrkkgylijchhwanxayhydwrh/Build/Products/Debug/samples/carthage" | ||
isEnabled = "YES"> | ||
</CommandLineArgument> | ||
<CommandLineArgument | ||
argument = "~/Project/owensd.io/apous/samples/basic" | ||
isEnabled = "NO"> | ||
</CommandLineArgument> | ||
<CommandLineArgument | ||
argument = "./samples/nested" | ||
isEnabled = "NO"> | ||
</CommandLineArgument> | ||
</CommandLineArguments> | ||
<EnvironmentVariables> | ||
<EnvironmentVariable | ||
key = "PATH" | ||
value = "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/scripts:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" | ||
isEnabled = "YES"> | ||
</EnvironmentVariable> | ||
</EnvironmentVariables> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
buildConfiguration = "Release" | ||
debugDocumentVersioning = "YES"> | ||
<BuildableProductRunnable | ||
runnableDebuggingMode = "0"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "7D0373341B49021700E2711D" | ||
BuildableName = "apous" | ||
BlueprintName = "apous" | ||
ReferencedContainer = "container:apous.xcodeproj"> | ||
</BuildableReference> | ||
</BuildableProductRunnable> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<array> | ||
</array> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
export SCRIPT_DIR=$(dirname "$0") | ||
|
||
## | ||
## Bootstrap Process | ||
## | ||
|
||
main () | ||
{ | ||
local submodules=$(git submodule status) | ||
local result=$? | ||
|
||
if [ "$result" -ne "0" ] | ||
then | ||
exit $result | ||
fi | ||
|
||
if [ -n "$submodules" ] | ||
then | ||
echo "*** Updating submodules..." | ||
update_submodules | ||
fi | ||
} | ||
|
||
bootstrap_submodule () | ||
{ | ||
local bootstrap="script/bootstrap" | ||
|
||
if [ -e "$bootstrap" ] | ||
then | ||
echo "*** Bootstrapping $name..." | ||
"$bootstrap" >/dev/null | ||
else | ||
update_submodules | ||
fi | ||
} | ||
|
||
update_submodules () | ||
{ | ||
git submodule sync --quiet && git submodule update --init && git submodule foreach --quiet bootstrap_submodule | ||
} | ||
|
||
export -f bootstrap_submodule | ||
export -f update_submodules | ||
|
||
main |