From a9ce2a36d54ac08608d689a5f0ec441f74e56d61 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Wed, 18 Dec 2013 08:51:10 -0800 Subject: [PATCH] Switch over to rustpkg --- .gitignore | 10 +++++++--- .travis.yml | 3 +-- Makefile | 16 ++++++++++------ hash.rs => src/crypto/hash.rs | 0 hex.rs => src/crypto/hex.rs | 0 hmac.rs => src/crypto/hmac.rs | 0 crypto.rs => src/crypto/lib.rs | 0 pkcs5.rs => src/crypto/pkcs5.rs | 0 pkey.rs => src/crypto/pkey.rs | 0 rand.rs => src/crypto/rand.rs | 0 symm.rs => src/crypto/symm.rs | 0 11 files changed, 18 insertions(+), 11 deletions(-) rename hash.rs => src/crypto/hash.rs (100%) rename hex.rs => src/crypto/hex.rs (100%) rename hmac.rs => src/crypto/hmac.rs (100%) rename crypto.rs => src/crypto/lib.rs (100%) rename pkcs5.rs => src/crypto/pkcs5.rs (100%) rename pkey.rs => src/crypto/pkey.rs (100%) rename rand.rs => src/crypto/rand.rs (100%) rename symm.rs => src/crypto/symm.rs (100%) diff --git a/.gitignore b/.gitignore index ecfc5572..d67afc9b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ *.sw[po] -libcrypto*.dylib -libcrypto*.so +*.dylib +*.so *.dSYM/ -crypto +/.rust +/bin/ +/build/ +/lib/ +/src/crypto/lib diff --git a/.travis.yml b/.travis.yml index ed4eeddf..1ba08680 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,4 @@ before_install: install: - sudo apt-get install rust-nightly script: - - make all - - ./crypto + - make all test diff --git a/Makefile b/Makefile index 9719e55c..5e385052 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,13 @@ +RUSTPKG ?= rustpkg +RUSTC ?= rustc +RUST_FLAGS ?= -Z debug-info -O -crypto: $(wildcard *.rs) - rustc crypto.rs - rustc --test crypto.rs +all: + $(RUSTPKG) $(RUST_FLAGS) install crypto + +test: + $(RUSTC) $(RUST_FLAGS) --test src/crypto/lib.rs + ./src/crypto/lib clean: - rm -f crypto libcrypto-*.so - rm -f libcrypto-*.dylib - rm -rf *.dSYM + rm -rf bin/ lib/ build/ src/crypto/lib diff --git a/hash.rs b/src/crypto/hash.rs similarity index 100% rename from hash.rs rename to src/crypto/hash.rs diff --git a/hex.rs b/src/crypto/hex.rs similarity index 100% rename from hex.rs rename to src/crypto/hex.rs diff --git a/hmac.rs b/src/crypto/hmac.rs similarity index 100% rename from hmac.rs rename to src/crypto/hmac.rs diff --git a/crypto.rs b/src/crypto/lib.rs similarity index 100% rename from crypto.rs rename to src/crypto/lib.rs diff --git a/pkcs5.rs b/src/crypto/pkcs5.rs similarity index 100% rename from pkcs5.rs rename to src/crypto/pkcs5.rs diff --git a/pkey.rs b/src/crypto/pkey.rs similarity index 100% rename from pkey.rs rename to src/crypto/pkey.rs diff --git a/rand.rs b/src/crypto/rand.rs similarity index 100% rename from rand.rs rename to src/crypto/rand.rs diff --git a/symm.rs b/src/crypto/symm.rs similarity index 100% rename from symm.rs rename to src/crypto/symm.rs