Skip to content

Commit

Permalink
Install using makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
njdehoog committed Oct 26, 2016
1 parent 1eb9262 commit 930e213
Show file tree
Hide file tree
Showing 5 changed files with 213 additions and 7 deletions.
26 changes: 22 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
DESTDIR := /usr/local
RESOURCEDIR := "$(DESTDIR)/share/spelt"
BUILD_DIR := Build/

install:
XCODEFLAGS=-workspace Spelt.xcworkspace -scheme spelt -configuration Release -derivedDataPath $(BUILD_DIR)

all:
xcodebuild $(XCODEFLAGS) build

provision:
carthage install --use-submodules --platform Mac

clean:
rm -rf "$(BUILD_DIR)"

install: clean all install_only

install_only:
# Create directories if they don't exist
install -d "$(DESTDIR)/Frameworks"
install -d "$(RESOURCEDIR)"

# Copy framework
cp -r "./Build/Spelt/Build/Products/Release/spelt.app/Contents/Frameworks/SpeltKit.framework" "$(DESTDIR)/Frameworks/"
cp -r "$(BUILD_DIR)/Build/Products/Release/spelt.app/Contents/Frameworks/SpeltKit.framework" "$(DESTDIR)/Frameworks/"

# Copy binary
cp "./Build/Spelt/Build/Products/Release/spelt.app/Contents/MacOS/spelt" "$(DESTDIR)/bin/spelt"
cp "$(BUILD_DIR)/Build/Products/Release/spelt.app/Contents/MacOS/spelt" "$(DESTDIR)/bin/spelt"

# Copy site template
cp -r "./Resources/default-template" "$(RESOURCEDIR)"

# Add runpath search path
install_name_tool -add_rpath "@executable_path/../Frameworks/SpeltKit.framework/Versions/Current/Frameworks/" "$(DESTDIR)/bin/spelt"
install_name_tool -add_rpath "@executable_path/../Frameworks/SpeltKit.framework/Versions/Current/Frameworks/" "$(DESTDIR)/bin/spelt"

uninstall:
rm -f "$(DESTDIR)/bin/spelt"
rm -rf "$(DESTDIR)/Frameworks/SpeltKit.framework"
6 changes: 3 additions & 3 deletions Spelt.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ \"${CONFIGURATION}\" = \"Release\" ]; then\n make install\nfi";
shellScript = "if [ \"${CONFIGURATION}\" = \"Release\" ]; then\n make install_only\nfi";
};
FD6D5FDF1D4A471000A7C277 /* Copy frameworks */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -778,7 +778,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = spelt/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/. @executable_path/../Frameworks @executable_path/SpeltKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/CarthageKit.framework/Versions/Current/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/. @executable_path/../Frameworks @executable_path/SpeltKit.framework/Versions/Current/Frameworks /Library/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -825,7 +825,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = spelt/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/. @executable_path/../Frameworks @executable_path/SpeltKit.framework/Versions/Current/Frameworks /Library/Frameworks /Library/Frameworks/CarthageKit.framework/Versions/Current/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/. @executable_path/../Frameworks @executable_path/SpeltKit.framework/Versions/Current/Frameworks /Library/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "-headerpad_max_install_names";
Expand Down
151 changes: 151 additions & 0 deletions Spelt.xcodeproj/xcshareddata/xcschemes/spelt.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD3915741D7DB78E00F7F5F7"
BuildableName = "spelt.app"
BlueprintName = "spelt"
ReferencedContainer = "container:Spelt.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "NO">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD8531C41D4A2A6200658286"
BuildableName = "SpeltTests.xctest"
BlueprintName = "SpeltTests"
ReferencedContainer = "container:Spelt.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD3915741D7DB78E00F7F5F7"
BuildableName = "spelt.app"
BlueprintName = "spelt"
ReferencedContainer = "container:Spelt.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "NO"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD3915741D7DB78E00F7F5F7"
BuildableName = "spelt.app"
BlueprintName = "spelt"
ReferencedContainer = "container:Spelt.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "serve"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "build"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "new"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "new ~/Desktop/blog"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--force"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--source ~/Desktop/test-site"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--destination ~/Desktop/test-site/_build"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--source ~/Projects/Spelt/framework/SpeltTests/Fixtures/test-site"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--source ~/Projects/Spelt/framework/Resources/default-template"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--destination ~/Projects/Spelt/framework/SpeltTests/Fixtures/test-site/_build"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--source ~/Projects/nielsify.com"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--destination ~/Projects/nielsify.com/_build"
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD3915741D7DB78E00F7F5F7"
BuildableName = "spelt.app"
BlueprintName = "spelt"
ReferencedContainer = "container:Spelt.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
7 changes: 7 additions & 0 deletions Spelt.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions Spelt.xcworkspace/xcshareddata/Spelt.xcscmblueprint
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "932351BA4170361836A889B660597D71744235A0",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {

},
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
"932351BA4170361836A889B660597D71744235A0" : 0,
"3DA8097D366B6AFDAEA91946C35253AA1EBC780B" : 0
},
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "D1B73158-D20C-4920-AB52-2D9836A13DE9",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"932351BA4170361836A889B660597D71744235A0" : "framework\/",
"3DA8097D366B6AFDAEA91946C35253AA1EBC780B" : "framework\/Stencil\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "Spelt",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Spelt.xcworkspace",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/njdehoog\/Stencil.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "3DA8097D366B6AFDAEA91946C35253AA1EBC780B"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:njdehoog\/Spelt.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "932351BA4170361836A889B660597D71744235A0"
}
]
}

0 comments on commit 930e213

Please sign in to comment.