Skip to content

Commit

Permalink
Install libsodium automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Feb 13, 2017
1 parent cedc85a commit 7283618
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@ tests/spec/suite
*.pyc
local
data
libsodium
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -12,6 +12,7 @@ env:
install:
# remotestorage testsuite only runs on rubby 2
- rvm use 2
- make libsodium
- make install-$BUILD

script:
Expand Down
19 changes: 17 additions & 2 deletions Makefile
@@ -1,3 +1,7 @@
current_dir = $(shell pwd)
export SODIUM_LIB_DIR := $(current_dir)/local/lib/
export SODIUM_STATIC := yes

export RUST_BACKTRACE := 1

SPEC_TEST_DIR=tests/spec
Expand All @@ -6,7 +10,7 @@ APP_BINARY=./target/debug/mysteryshack
TEST_CMD=$(APP_BINARY) -c $(TMP_DIR)/config
PROXY_SERVERS=false

all:
all: libsodium
$(MAKE) release-build

release-build:
Expand Down Expand Up @@ -79,4 +83,15 @@ install-unittest:
unittest:
cargo test

.PHONY: test
libsodium:
[ -d libsodium ] || git clone https://github.com/jedisct1/libsodium libsodium
set -ex && cd libsodium && \
git fetch && \
git checkout origin/stable && \
rm -rf lib && \
./autogen.sh && \
./configure --prefix=$$PWD/../local/ --disable-shared && \
$(MAKE) && \
$(MAKE) install

.PHONY: test libsodium

0 comments on commit 7283618

Please sign in to comment.