summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@oberon.underhill.private>2012-09-24 19:40:21 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-24 19:42:45 -0400
commit6c8abf6ca32f8a1ae7a68402d552fdf0d59392cf (patch)
tree9c5c505501381552b93b731262aed40db2f313f4 /Makefile
parent5be83ac100a3a951f78f220237d776f466ca106a (diff)
add osxapp target
Not fully tested.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 95766429e..8531be963 100644
--- a/Makefile
+++ b/Makefile
@@ -133,4 +133,24 @@ sdist: clean $(mans)
hackage: sdist
@cabal upload dist/*.tar.gz
+OSXAPP_BASE=ui-macos/git-annex.app/Contents/MacOS
+THIRDPARTY_BINS=git curl lsof xargs rsync uuid wget xargs \
+ sha1sum sha224sum sha256sum sha384sum sha512sum
+
+osxapp: $(bins)
+ install -d "$(OSXAPP_BASE)/bin"
+ for bin in git-annex $(THIRDPARTY_BINS); do \
+ cp "$$(which "$$bin")" "$(OSXAPP_BASE)/bin/" || echo "$$bin not available; skipping"; \
+ done
+
+ ln -sf git-annex "$(OSXAPP_BASE)/bin/git-annex-shell"
+ install -d "$(OSXAPP_BASE)/git-core"
+ (cd "$(shell git --exec-path)" && tar c .) | (cd "$(OSXAPP_BASE)"/git-core && tar x)
+
+ install -d "$(OSXAPP_BASE)/lib"
+ for lib in $$(otool -L "$(OSXAPP_BASE)"/bin/* "$(OSXAPP_BASE)"/git-core/* | egrep '^ ' | cut -d ' ' -f 1 | sed 's/^ //' | sort | uniq); do \
+ base=$$(basename "$$lib"); \
+ cp "$$lib" "$(OSXAPP_BASE)/lib/$$base"; \
+ done
+
.PHONY: $(bins) test install