]> git.armaanb.net Git - stagit.git/commitdiff
README: add instructions to build static binaries
authorHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 25 Mar 2017 12:28:46 +0000 (13:28 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 25 Mar 2017 12:28:46 +0000 (13:28 +0100)
README

diff --git a/README b/README
index df920008c986564a551dde2b22efabf09fa114fc..e49323b8658ab7b7769acc1d6f6bb9796e36485e 100644 (file)
--- a/README
+++ b/README
@@ -39,6 +39,28 @@ Documentation
 See man pages: stagit(1) and stagit-index(1).
 
 
+Building a static binary
+------------------------
+
+It may be useful to build static binaries, for example to run in a chroot.
+
+It can be done like this at the time of writing (v0.24):
+
+cd libgit2-src
+
+# change the options in the CMake file: CMakeLists.txt
+BUILD_SHARED_LIBS to OFF (static)
+CURL to OFF              (not needed)
+USE_SSH OFF              (not needed)
+THREADSAFE OFF           (not needed)
+USE_OPENSSL OFF          (not needed, use builtin)
+
+mkdir -p build && cd build
+cmake ../
+make
+make install
+
+
 Features
 --------