From af8f83ae5ca41322ff254e0c970fb6b591d3d0d7 Mon Sep 17 00:00:00 2001 From: mwydmuch Date: Wed, 27 Sep 2017 01:35:34 +0200 Subject: [PATCH] Updated rockspec and assemble_luarocks_package.sh Former-commit-id: 2fa6c7bd0f632f30faab5759b0d8b8120595aa6a --- scripts/assemble_luarocks_package.sh | 19 ++++++++++++----- src/lib_lua/luabind/LICENSE | 21 +++++++++++++++++++ ...1.3-0.rockspec => vizdoom-1.1.4-0.rockspec | 6 +++--- 3 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 src/lib_lua/luabind/LICENSE rename vizdoom-1.1.3-0.rockspec => vizdoom-1.1.4-0.rockspec (97%) diff --git a/scripts/assemble_luarocks_package.sh b/scripts/assemble_luarocks_package.sh index 679f1dbd0..650beff04 100755 --- a/scripts/assemble_luarocks_package.sh +++ b/scripts/assemble_luarocks_package.sh @@ -4,19 +4,28 @@ PACKAGE_DEST_DIRECTORY="./bin/lua" PACKAGE_DEST_PATH="${PACKAGE_DEST_DIRECTORY}/luarocks_package" SHARED_PACKAGE_DEST_PATH="${PACKAGE_DEST_DIRECTORY}/luarocks_shared_package" PACKAGE_SOURCE="./src/lib_lua/src_lua" -if [ "$(uname)" == "Darwin" ] -then +if [ "$(uname)" == "Darwin" ]; then VIZDOOM_EXEC_PATH="./bin/vizdoom.app/Contents/MacOS/vizdoom" else VIZDOOM_EXEC_PATH="./bin/vizdoom" fi -PK3_PATH="./bin/vizdoom.pk3" +VIZDOOM_PK3_PATH="./bin/vizdoom.pk3" LUA_BIN_PATH="${PACKAGE_DEST_DIRECTORY}/vizdoom.so" FREEDOOM_PATH="./bin/freedoom2.wad" SCENARIOS_DEST_DIR="${PACKAGE_DEST_PATH}/scenarios" SCENARIOS_PATH="./scenarios" +if [ ! -e ${LUA_BIN_PATH} ]; then + echo "Library for Lua does not exist. Aborting." + exit 1 +fi + +if [ ! -e ${VIZDOOM_EXEC_PATH} ] || [ ! -e ${VIZDOOM_PK3_PATH} ]; then + echo "Required ViZDoom's resources do not exist. Aborting." + exit 2 +fi + rm -rf ${PACKAGE_DEST_PATH} rm -rf ${SHARED_PACKAGE_DEST_PATH} mkdir ${PACKAGE_DEST_PATH} @@ -26,8 +35,8 @@ cp -r ${PACKAGE_SOURCE}/* ${PACKAGE_DEST_PATH} cp ${VIZDOOM_EXEC_PATH} ${PACKAGE_DEST_PATH} cp ${LUA_BIN_PATH} ${PACKAGE_DEST_PATH} cp ${FREEDOOM_PATH} ${PACKAGE_DEST_PATH} -cp ${PK3_PATH} ${PACKAGE_DEST_PATH} +cp ${VIZDOOM_PK3_PATH} ${PACKAGE_DEST_PATH} mkdir -p ${SCENARIOS_DEST_DIR} cp ${SCENARIOS_PATH}/*.wad ${SCENARIOS_DEST_DIR} cp ${SCENARIOS_PATH}/*.cfg ${SCENARIOS_DEST_DIR} -mv ${SCENARIOS_DEST_DIR}/bots.cfg ${PACKAGE_DEST_PATH} \ No newline at end of file +mv ${SCENARIOS_DEST_DIR}/bots.cfg ${PACKAGE_DEST_PATH} diff --git a/src/lib_lua/luabind/LICENSE b/src/lib_lua/luabind/LICENSE new file mode 100644 index 000000000..2ecc6f8d8 --- /dev/null +++ b/src/lib_lua/luabind/LICENSE @@ -0,0 +1,21 @@ +// Copyright (c) 2003 Daniel Wallin and Arvid Norberg + +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +// OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vizdoom-1.1.3-0.rockspec b/vizdoom-1.1.4-0.rockspec similarity index 97% rename from vizdoom-1.1.3-0.rockspec rename to vizdoom-1.1.4-0.rockspec index c0a30b719..0316173fc 100644 --- a/vizdoom-1.1.3-0.rockspec +++ b/vizdoom-1.1.4-0.rockspec @@ -1,9 +1,9 @@ package = "vizdoom" -version = "1.1.3-0" +version = "1.1.4-0" source = { url = "git://github.com/mwydmuch/ViZDoom", - tag = "1.1.3" + tag = "1.1.4" } description = { @@ -42,4 +42,4 @@ build = { mkdir -p $(LUA_LIBDIR)/../share/lua/5.1/vizdoom cp -r ./bin/lua/luarocks_shared_package/* $(LUA_LIBDIR)/../share/lua/5.1/vizdoom ]] -} \ No newline at end of file +}