Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some new features #29

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
39 changes: 39 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
language: erlang

env:
global:
- LUAROCKS_BASE=luarocks-2.0.13
matrix:
- "LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1"
- "LUA=lua5.2 LUA_DEV=liblua5.2-dev LUA_VER=5.2 LUA_SFX=5.2 LUA_INCDIR=/usr/include/lua5.2"
- "LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit-2.0.0-beta9 LUA_INCDIR=/usr/include/luajit-2.0"

branches:
only:
- stream

before_install:
- "sudo apt-get install $LUA"
- "sudo apt-get install $LUA_DEV"
- "lua$LUA_SFX -v"
# Install a recent luarocks release
- wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz
- tar zxvpf $LUAROCKS_BASE.tar.gz
- cd $LUAROCKS_BASE
- ./configure
--lua-version=$LUA_VER --lua-suffix=$LUA_SFX --with-lua-include="$LUA_INCDIR"
- sudo make
- sudo make install
- cd $TRAVIS_BUILD_DIR

install:
- sudo apt-get install openssl
- sudo luarocks install lunitx
- sudo luarocks make rockspecs/luacrypto-git-1.rockspec

script: "cd tests/unit && lunit.sh -i lua$LUA_SFX run.lua"

notifications:
email:
on_success: change
on_failure: always
23 changes: 15 additions & 8 deletions rockspecs/luacrypto-git-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ digests (MD5, SHA-1, HMAC, and more), encryption, decryption and crypto-grade ra
dependencies = {
"lua >= 5.1",
}
external_dependencies = {
OPENSSL = {
header = "openssl/evp.h"
}
}
source = {
url = [[git://github.com/mkottman/luacrypto.git]],
dir = "luacrypto"
url = "https://github.com/mkottman/luacrypto/archive/master.zip",
dir = "luacrypto-master",
}
build = {
platforms = {
Expand All @@ -22,12 +27,14 @@ build = {
install_command = [[copy ".\Release\crypto.dll" "$(LIBDIR)\crypto.dll" /y ]]
},
unix = {
type = "make",
variables = {
INCONCERT_DEVEL = "$(INCONCERT_DEVEL)",
LUA_LUADIR = "$(LUADIR)",
LUA_LIBDIR = "$(LIBDIR)",
LUA_PREFIX = "$(PREFIX)"
type = "builtin",
modules = {
crypto = {
sources = "src/lcrypto.c",
incdirs = "$(OPENSSL_INCDIR)",
libdirs = "$(OPENSSL_LIBDIR)",
libraries = "crypto",
}
}
}
},
Expand Down
Loading