diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0084b2a --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.o +*.a +*.dll +*.deb + +build/ diff --git a/.gitmodules b/.gitmodules index 5eb46a1..30e015e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "Lua"] path = Lua url = https://git.kolibrios.org/Lua/Lua.git + branch = 5.4 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9309f19 --- /dev/null +++ b/Makefile @@ -0,0 +1,57 @@ + + + +LUA_VER=5.4 +PACKAGE_VER=0.0.1 +PACKAGE_SIZE=0 + +TOOLCHAIN_INSTALL_PATH=/home/autobuild/tools/win32 + +PACKAGE_DIR=build +DEBIAN_CONTROL_FILE=$(PACKAGE_DIR)/DEBIAN/control +PACKAGE_TOOLCHAIN_PATH=$(PACKAGE_DIR)$(TOOLCHAIN_INSTALL_PATH) + +KOLIBRIOS_REPO=$(abspath ../kolibrios) + +change_lua_ver: + git submodule set-branch -b $(LUA_VER) Lua + git submodule update --init --recursive --remote + +GenerateControl: MoveHeadersToPackage + echo Package: kos32-liblua $(LUA_VER) >> $(DEBIAN_CONTROL_FILE) + echo Version: $(PACKAGE_VER) >> $(DEBIAN_CONTROL_FILE) + echo Installed-Size: $(PACKAGE_SIZE) >> $(DEBIAN_CONTROL_FILE) + +MoveHeadersToPackage: GeneratePackage + cp Lua/src/*.h $(PACKAGE_TOOLCHAIN_PATH)/include/LUA$(LUA_VER) + +GeneratePackage: + cp -R package $(PACKAGE_DIR) + mkdir -p $(PACKAGE_TOOLCHAIN_PATH)/include/lua$(LUA_VER) + mkdir -p $(PACKAGE_TOOLCHAIN_PATH)/lib + +BuildLua: GeneratePackage + make -C Lua/src "KOLIBRIOS_REPO=$(KOLIBRIOS_REPO)" shared + mv Lua/src/lua$(LUA_VER).dll.a $(PACKAGE_TOOLCHAIN_PATH)/lib + make -C Lua/src "KOLIBRIOS_REPO=$(KOLIBRIOS_REPO)" static + mv Lua/src/liblua.a $(PACKAGE_TOOLCHAIN_PATH)/lib/liblua$(LUA_VER).a + +build: change_lua_ver MoveHeadersToPackage BuildLua GenerateControl + dpkg --build $(PACKAGE_DIR) kos32-liblua$(LUA_VER).deb + + +kos32-liblua5.4.deb: + make "LUA_VER=5.4" build + +kos32-liblua5.3.deb: + make "LUA_VER=5.3" build + +kos32-liblua5.2.deb: + make "LUA_VER=5.2" build + +kos32-liblua5.1.deb: + make "LUA_VER=5.1" build + +clean: + rm -rf $(PACKAGE_DIR) + make -C Lua clean diff --git a/package/DEBIAN/control b/package/DEBIAN/control new file mode 100644 index 0000000..f529e69 --- /dev/null +++ b/package/DEBIAN/control @@ -0,0 +1,9 @@ +Architecture: all +Section: devel +Depends: kos-newlib +Pre-Depends: kos32-gcc +Priority: optional +Homepage: https://git.kolibrios.org/Lua +Maintainer: Egor00f +Description: kolibrios lua port for dev + Contain lua headers and builded lib