building linux standalone tarballs

This commit is contained in:
Joey Hess 2012-09-28 18:21:39 -04:00
parent b2758b9de0
commit 115f05db25
7 changed files with 46 additions and 2 deletions

View file

@ -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

View file

@ -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]]
"""]]

View file

@ -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)

1
standalone/linux/README Symbolic link
View file

@ -0,0 +1 @@
../../.git/annex/objects/Xz/58/SHA256E-s1152--efa2a4e121d129f4a79d4c0bd314824a1171a6c998b0f2e15cd57812a6c94572/SHA256E-s1152--efa2a4e121d129f4a79d4c0bd314824a1171a6c998b0f2e15cd57812a6c94572

View file

@ -0,0 +1 @@
../../.git/annex/objects/Xj/jq/SHA256E-s443--93d5cf58f9b492a1c3d9b0ab437bb9a2c2f0809ee84c70800390ee18a5a735f4/SHA256E-s443--93d5cf58f9b492a1c3d9b0ab437bb9a2c2f0809ee84c70800390ee18a5a735f4

1
standalone/linux/glibc-libs Symbolic link
View file

@ -0,0 +1 @@
../../.git/annex/objects/mq/K2/SHA256E-s604--553a579a6951019186233de30823bce9f80e418ac17b52dd727faa6cdb72a3c9/SHA256E-s604--553a579a6951019186233de30823bce9f80e418ac17b52dd727faa6cdb72a3c9

1
standalone/linux/runshell Symbolic link
View file

@ -0,0 +1 @@
../../.git/annex/objects/mx/91/SHA256E-s960--bc706038b7af70b6ff20ec870997204251ff2e0146eb912b1aa9fb2dc6ba9faf/SHA256E-s960--bc706038b7af70b6ff20ec870997204251ff2e0146eb912b1aa9fb2dc6ba9faf