From 115f05db25481478d20ab3b47136d383d5aba2cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Sep 2012 18:21:39 -0400 Subject: [PATCH] building linux standalone tarballs --- Makefile | 37 +++++++++++++++++++++++++++++-- doc/install.mdwn | 1 + doc/install/Linux_standalone.mdwn | 6 +++++ standalone/linux/README | 1 + standalone/linux/git-annex-webapp | 1 + standalone/linux/glibc-libs | 1 + standalone/linux/runshell | 1 + 7 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 doc/install/Linux_standalone.mdwn create mode 120000 standalone/linux/README create mode 120000 standalone/linux/git-annex-webapp create mode 120000 standalone/linux/glibc-libs create mode 120000 standalone/linux/runshell diff --git a/Makefile b/Makefile index 98c5dd36e8..bbf44c2069 100644 --- a/Makefile +++ b/Makefile @@ -135,11 +135,44 @@ sdist: clean $(mans) hackage: sdist @cabal upload dist/*.tar.gz -OSXAPP_DEST=$(GIT_ANNEX_TMP_BUILD_DIR)/build-dmg/git-annex.app -OSXAPP_BASE=$(OSXAPP_DEST)/Contents/MacOS THIRDPARTY_BINS=git curl lsof xargs rsync uuid wget gpg \ sha1sum sha224sum sha256sum sha384sum sha512sum +LINUXSTANDALONE_DEST=$(GIT_ANNEX_TMP_BUILD_DIR)/git-annex.linux +linuxstandalone: $(bins) + rm -rf "$(LINUXSTANDALONE_DEST)" + + cp -R standalone/linux "$(LINUXSTANDALONE_DEST)" + + install -d "$(LINUXSTANDALONE_DEST)/bin" + cp git-annex "$(LINUXSTANDALONE_DEST)/bin/" + strip "$(LINUXSTANDALONE_DEST)/bin/git-annex" + ln -sf git-annex "$(LINUXSTANDALONE_DEST)/bin/git-annex-shell" + gzcat doc/license/git-annex-osx.app-licences.gz > $(LINUXSTANDALONE_DEST)/LICENSE + + for bin in $(THIRDPARTY_BINS); do \ + cp "$$(which "$$bin")" "$(LINUXSTANDALONE_DEST)/bin/" || echo "$$bin not available; skipping"; \ + done + + install -d "$(LINUXSTANDALONE_DEST)/git-core" + (cd "$(shell git --exec-path)" && tar c .) | (cd "$(LINUXSTANDALONE_DEST)"/git-core && tar x) + + touch "$(LINUXSTANDALONE_DEST)/libdirs.tmp" + for lib in $$(ldd "$(LINUXSTANDALONE_DEST)"/bin/* $$(find "$(LINUXSTANDALONE_DEST)"/git-core/ -type f) | grep -v -f standalone/linux/glibc-libs | grep -v "not a dynamic executable" | egrep '^ ' | sed 's/^\t//' | sed 's/.*=> //' | cut -d ' ' -f 1 | sort | uniq); do \ + dir=$$(dirname "$$lib"); \ + install -d "$(LINUXSTANDALONE_DEST)/$$dir"; \ + echo "$$dir" >> "$(LINUXSTANDALONE_DEST)/libdirs.tmp"; \ + cp "$$lib" "$(LINUXSTANDALONE_DEST)/$$dir"; \ + if [ -L "$lib" ]; then \ + link=$$(readlink -f "$$lib"); \ + cp "$$link" "$(LINUXSTANDALONE_DEST)/$$(dirname "$$link")"; \ + fi; \ + done + sort "$(LINUXSTANDALONE_DEST)/libdirs.tmp" | uniq > "$(LINUXSTANDALONE_DEST)/libdirs" + rm -f "$(LINUXSTANDALONE_DEST)/libdirs.tmp" + +OSXAPP_DEST=$(GIT_ANNEX_TMP_BUILD_DIR)/build-dmg/git-annex.app +OSXAPP_BASE=$(OSXAPP_DEST)/Contents/MacOS osxapp: $(bins) rm -rf "$(OSXAPP_DEST)" install -d $(GIT_ANNEX_TMP_BUILD_DIR)/build-dmg diff --git a/doc/install.mdwn b/doc/install.mdwn index cfac835ea9..8392e98af2 100644 --- a/doc/install.mdwn +++ b/doc/install.mdwn @@ -14,6 +14,7 @@ details. [[ScientificLinux5]] | (and other RHEL5 clones like CentOS5) [[Fedora]] | [[openSUSE]] | +[[other Linux|linux_standalone]] | get your precompiled tarballs here Windows | [[sorry, Windows not supported yet|todo/windows_support]] """]] diff --git a/doc/install/Linux_standalone.mdwn b/doc/install/Linux_standalone.mdwn new file mode 100644 index 0000000000..88a85f569a --- /dev/null +++ b/doc/install/Linux_standalone.mdwn @@ -0,0 +1,6 @@ +If your Linux distribution does not have git-annex packaged up for you, +you can either build it [[fromscratch]], or you can use these handy +prebuilt, standalone tarballs. + +* Linux x86 32 bit [download](http://downloads.kitenet.net/git-annex/linux/git-annex-standalone-i386.tar.gz) +* Linux x86 64 bit [download](http://downloads.kitenet.net/git-annex/linux/git-annex-standalone-amd64.tar.gz) diff --git a/standalone/linux/README b/standalone/linux/README new file mode 120000 index 0000000000..9db04761a1 --- /dev/null +++ b/standalone/linux/README @@ -0,0 +1 @@ +../../.git/annex/objects/Xz/58/SHA256E-s1152--efa2a4e121d129f4a79d4c0bd314824a1171a6c998b0f2e15cd57812a6c94572/SHA256E-s1152--efa2a4e121d129f4a79d4c0bd314824a1171a6c998b0f2e15cd57812a6c94572 \ No newline at end of file diff --git a/standalone/linux/git-annex-webapp b/standalone/linux/git-annex-webapp new file mode 120000 index 0000000000..ce56034a3f --- /dev/null +++ b/standalone/linux/git-annex-webapp @@ -0,0 +1 @@ +../../.git/annex/objects/Xj/jq/SHA256E-s443--93d5cf58f9b492a1c3d9b0ab437bb9a2c2f0809ee84c70800390ee18a5a735f4/SHA256E-s443--93d5cf58f9b492a1c3d9b0ab437bb9a2c2f0809ee84c70800390ee18a5a735f4 \ No newline at end of file diff --git a/standalone/linux/glibc-libs b/standalone/linux/glibc-libs new file mode 120000 index 0000000000..03ee4af4b4 --- /dev/null +++ b/standalone/linux/glibc-libs @@ -0,0 +1 @@ +../../.git/annex/objects/mq/K2/SHA256E-s604--553a579a6951019186233de30823bce9f80e418ac17b52dd727faa6cdb72a3c9/SHA256E-s604--553a579a6951019186233de30823bce9f80e418ac17b52dd727faa6cdb72a3c9 \ No newline at end of file diff --git a/standalone/linux/runshell b/standalone/linux/runshell new file mode 120000 index 0000000000..5aa33dcc4e --- /dev/null +++ b/standalone/linux/runshell @@ -0,0 +1 @@ +../../.git/annex/objects/mx/91/SHA256E-s960--bc706038b7af70b6ff20ec870997204251ff2e0146eb912b1aa9fb2dc6ba9faf/SHA256E-s960--bc706038b7af70b6ff20ec870997204251ff2e0146eb912b1aa9fb2dc6ba9faf \ No newline at end of file