-
Notifications
You must be signed in to change notification settings - Fork 3.9k
A selection of new Lua packages #2855
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
Changes from 5 commits
1e64410
6742457
a16f78a
7091ea8
2d91509
9089ac1
8c8d3f5
56c4d67
f324c70
f042a62
905a2d7
b242ef8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # | ||
| # Copyright (C) 2016 OpenWrt.org | ||
| # | ||
| # This is free software, licensed under the GNU General Public License v2. | ||
| # See /LICENSE for more information. | ||
| # | ||
|
|
||
| include $(TOPDIR)/rules.mk | ||
|
|
||
| PKG_NAME:=cgilua | ||
| PKG_VERSION:=5.1.4 | ||
| PKG_RELEASE:=1 | ||
|
|
||
| PKG_SOURCE:=v$(PKG_VERSION).tar.gz | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a no go, use the git approach instead including xz tarballs.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not? What rule does this break?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You'll run into file names clashing if they having nothing more than v(version).tar.gz as file name.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, right. |
||
| PKG_SOURCE_URL:=https://github.com/keplerproject/cgilua/archive/ | ||
| PKG_MD5SUM:=ed162ca341d0f1cd16868c80bed3da4c | ||
|
|
||
| PKG_MAINTAINER:=Alex R <alex@totalwebservices.net> | ||
| PKG_LICENSE=MIT | ||
|
|
||
| LUA_MODULE_PATH:=/usr/lib/lua | ||
| LUA_BIN_PATH:=/usr/bin | ||
|
|
||
| include $(INCLUDE_DIR)/package.mk | ||
|
|
||
| define Package/cgilua | ||
| SUBMENU:=Lua | ||
| SECTION:=lang | ||
| CATEGORY:=Languages | ||
| TITLE:=cgilua | ||
| URL:=https://github.com/keplerproject/cgilua | ||
| DEPENDS:=+lua +luafilesystem | ||
| endef | ||
|
|
||
| define Package/cgilua/description | ||
| CGILua is a tool for creating dynamic HTML pages and manipulating input data from Web forms. | ||
| endef | ||
|
|
||
| define Build/Configure | ||
| endef | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't need this block.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please clarify? Why? Which block exactly? I'm pretty sure define Package/cgilua is needed. Maybe define Build/Configure?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the configure blocks. (in all these packages)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please take a look at my fix. |
||
|
|
||
| define Build/Compile | ||
| endef | ||
|
|
||
| define Package/cgilua/install | ||
| $(INSTALL_DIR) $(1)/$(LUA_MODULE_PATH)/cgilua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/cgilua.lua $(1)/$(LUA_MODULE_PATH)/cgilua.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/authentication.lua $(1)/$(LUA_MODULE_PATH)/cgilua/authentication.lua | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Really? the upstream package keeps them in the same dir and needs them in different dirs? Does the upstream package have a makefile with an "install" target you can use?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll have to test to make sure the other way works. |
||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/cookies.lua $(1)/$(LUA_MODULE_PATH)/cgilua/cookies.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/dispatcher.lua $(1)/$(LUA_MODULE_PATH)/cgilua/dispatcher.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/loader.lua $(1)/$(LUA_MODULE_PATH)/cgilua/loader.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/lp.lua $(1)/$(LUA_MODULE_PATH)/cgilua/lp.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/mime.lua $(1)/$(LUA_MODULE_PATH)/cgilua/mime.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/post.lua $(1)/$(LUA_MODULE_PATH)/cgilua/post.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/readuntil.lua $(1)/$(LUA_MODULE_PATH)/cgilua/readuntil.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/serialize.lua $(1)/$(LUA_MODULE_PATH)/cgilua/serialize.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/session.lua $(1)/$(LUA_MODULE_PATH)/cgilua/session.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cgilua/urlcode.lua $(1)/$(LUA_MODULE_PATH)/cgilua/urlcode.lua | ||
| $(INSTALL_DIR) $(1)/$(LUA_BIN_PATH)/ | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/launchers/cgilua.cgi $(1)/$(LUA_BIN_PATH)/cgilua.cgi | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/launchers/cgilua.fcgi $(1)/$(LUA_BIN_PATH)/cgilua.fcgi | ||
| endef | ||
|
|
||
| $(eval $(call BuildPackage,cgilua)) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| From: Alex R <alex@totalwebservices.net> | ||
| Date: Thu, 30 Jul 2015 20:27:30 -0700 | ||
| Subject: [PATCH] Enabled accepting all unsupported POST content types as plain | ||
| text, fixed a small issue with the tinsert call | ||
|
|
||
| --- a/src/cgilua/post.lua | ||
| +++ b/src/cgilua/post.lua | ||
| @@ -285,9 +285,8 @@ | ||
| urlcode.parsequery (read (inputsize), defs.args) | ||
| elseif strfind(contenttype, "multipart/form-data", 1, true) then | ||
| Main (inputsize, defs.args) | ||
| - elseif strfind (contenttype, "application/xml", 1, true) or strfind (contenttype, "text/xml", 1, true) or strfind (contenttype, "text/plain", 1, true) then | ||
| - tinsert (defs.args, read (inputsize)) | ||
| else | ||
| - error("Unsupported Media Type: "..contenttype) | ||
| + local input = read(inputsize) | ||
| + tinsert (defs.args, input) | ||
| end | ||
| end |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # | ||
| # Copyright (C) 2006-2015 OpenWrt.org | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. definitely not 2006! (or 2015!) |
||
| # | ||
| # This is free software, licensed under the GNU General Public License v2. | ||
| # See /LICENSE for more information. | ||
| # | ||
|
|
||
| include $(TOPDIR)/rules.mk | ||
|
|
||
| PKG_NAME:=jsonrpc4lua | ||
| PKG_VERSION:=1.0.1 | ||
| PKG_RELEASE:=2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no. pkg_release is obviously 1 here. |
||
|
|
||
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz | ||
| PKG_SOURCE_PROTO:=git | ||
| PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | ||
| PKG_SOURCE_URL:=https://github.com/pdxmeshnet/jsonrpc4lua.git | ||
| PKG_SOURCE_VERSION:=$(PKG_VERSION) | ||
|
|
||
| PKG_MAINTAINER:=Alex R <alex@totalwebservices.net> | ||
| PKG_LICENSE=MIT | ||
|
|
||
| LUA_MODULE_PATH:=/usr/lib/lua | ||
|
|
||
| include $(INCLUDE_DIR)/package.mk | ||
|
|
||
| define Package/jsonrpc4lua | ||
| SUBMENU:=Lua | ||
| SECTION:=lang | ||
| CATEGORY:=Languages | ||
| TITLE:=jsonrpc4lua | ||
| URL:=https://github.com/pdxmeshnet/jsonrpc4lua | ||
| DEPENDS:=+lua +luasocket +lua-cjson | ||
| endef | ||
|
|
||
| define Package/jsonrpc4lua/description | ||
| JSONRPC for Lua | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great description! Is this for clients? for servers? for generating stubs only? Who knows! |
||
| endef | ||
|
|
||
| define Build/Configure | ||
| endef | ||
|
|
||
| define Build/Compile | ||
| endef | ||
|
|
||
| define Package/jsonrpc4lua/install | ||
| $(INSTALL_DIR) $(1)/$(LUA_MODULE_PATH)/json | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/json/rpc.lua $(1)/$(LUA_MODULE_PATH)/json/rpc.lua | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/json/rpcserver.lua $(1)/$(LUA_MODULE_PATH)/json/rpcserver.lua | ||
| endef | ||
|
|
||
| $(eval $(call BuildPackage,jsonrpc4lua)) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # | ||
| # Copyright (C) 2016 OpenWrt.org | ||
| # | ||
| # This is free software, licensed under the GNU General Public License v2. | ||
| # See /LICENSE for more information. | ||
| # | ||
|
|
||
| include $(TOPDIR)/rules.mk | ||
|
|
||
| PKG_NAME:=lua-alt-getopt | ||
| PKG_VERSION:=0.7.0 | ||
| PKG_RELEASE:=1 | ||
|
|
||
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | ||
| PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/4260/ | ||
| PKG_MD5SUM:=f504578b1287ea02759add231b972812 | ||
|
|
||
| PKG_MAINTAINER:=Alex R <alex@totalwebservices.net> | ||
| PKG_LICENSE=MIT | ||
|
|
||
| LUA_MODULE_PATH:=/usr/lib/lua | ||
|
|
||
| include $(INCLUDE_DIR)/package.mk | ||
|
|
||
| define Package/lua-alt-getopt | ||
| SUBMENU:=Lua | ||
| SECTION:=lang | ||
| CATEGORY:=Languages | ||
| TITLE:=lua-alt-getopt | ||
| URL:=http://luaforge.net/projects/alt-getopt/ | ||
| DEPENDS:=+lua | ||
| endef | ||
|
|
||
| define Package/lua-alt-getopt/description | ||
| Process application arguments the same way as getopt_long | ||
| endef | ||
|
|
||
| define Build/Configure | ||
| endef | ||
|
|
||
| define Build/Compile | ||
| endef | ||
|
|
||
| define Package/lua-alt-getopt/install | ||
| $(INSTALL_DIR) $(1)/$(LUA_MODULE_PATH)/ | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/alt_getopt.lua $(1)/$(LUA_MODULE_PATH)/alt_getopt.lua | ||
| endef | ||
|
|
||
| $(eval $(call BuildPackage,lua-alt-getopt)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # | ||
| # Copyright (C) 2016 OpenWrt.org | ||
| # | ||
| # This is free software, licensed under the GNU General Public License v2. | ||
| # See /LICENSE for more information. | ||
| # | ||
|
|
||
| include $(TOPDIR)/rules.mk | ||
|
|
||
| PKG_NAME:=lua-bit32 | ||
| PKG_VERSION:=5.3.0 | ||
| PKG_RELEASE:=1 | ||
|
|
||
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz | ||
| PKG_SOURCE_PROTO:=git | ||
| PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | ||
| PKG_SOURCE_URL:=git://github.com/keplerproject/lua-compat-5.2.git | ||
| PKG_SOURCE_VERSION:=bitlib-5.3.0 | ||
|
|
||
| PKG_MAINTAINER:=Alex R <alex@totalwebservices.net> | ||
| PKG_LICENSE=MIT | ||
|
|
||
| LUA_MODULE_PATH:=/usr/lib/lua | ||
| PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) | ||
|
|
||
| include $(INCLUDE_DIR)/package.mk | ||
|
|
||
| define Package/lua-bit32 | ||
| SUBMENU:=Lua | ||
| SECTION:=lang | ||
| CATEGORY:=Languages | ||
| TITLE:=lua-bit32 | ||
| URL:=http://www.lua.org/manual/5.2/manual.html#6.7 | ||
| DEPENDS:= +lua | ||
| endef | ||
|
|
||
| define Package/lua-bit32/description | ||
| bit32 is the native Lua 5.2 bit manipulation library, in the version from Lua 5.3; it is compatible with Lua 5.1, 5.2 and 5.3. | ||
| endef | ||
|
|
||
| TARGET_CFLAGS += $(FPIC) -shared | ||
| TARGET_LDFLAGS += -llua | ||
|
|
||
| LUA_MODULE_PATH:=/usr/lib/lua | ||
|
|
||
| define Build/Configure | ||
| endef | ||
|
|
||
| define Build/Compile | ||
| $(TARGET_CROSS)gcc $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -I $(PKG_BUILD_DIR)/c-api/ -o $(PKG_BUILD_DIR)/bit32.so $(PKG_BUILD_DIR)/lbitlib.c | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is upstream really that broken that you have to compile it yourself? Have you considered just using lua-bitop? it's already packaged.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I recall, at the time bit32 looked better and more future proof. I didn't realize there were other ways to compile it. I'll have to check if I can rework it. |
||
| endef | ||
|
|
||
| define Package/lua-bit32/install | ||
| $(INSTALL_DIR) $(1)/$(LUA_MODULE_PATH)/ | ||
| $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit32.so $(1)/$(LUA_MODULE_PATH)/ | ||
| endef | ||
|
|
||
| $(eval $(call BuildPackage,lua-bit32)) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # | ||
| # Copyright (C) 2016 OpenWrt.org | ||
| # | ||
| # This is free software, licensed under the GNU General Public License v2. | ||
| # See /LICENSE for more information. | ||
| # | ||
|
|
||
| include $(TOPDIR)/rules.mk | ||
|
|
||
| PKG_NAME:=lua-inifile | ||
| PKG_VERSION:=1.0 | ||
| PKG_RELEASE:=1 | ||
|
|
||
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz | ||
| PKG_SOURCE_PROTO:=git | ||
| PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | ||
| PKG_SOURCE_URL:=git://github.com/bartbes/love-misc-libs.git | ||
| PKG_SOURCE_VERSION:=master | ||
|
|
||
| PKG_MAINTAINER:=Alex R <alex@totalwebservices.net> | ||
| PKG_LICENSE=Simplified BSD license | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://spdx.org/licenses/ I think you want "BSD-2-Clause" here |
||
|
|
||
| LUA_MODULE_PATH:=/usr/lib/lua | ||
|
|
||
| include $(INCLUDE_DIR)/package.mk | ||
|
|
||
| define Package/lua-inifile | ||
| SUBMENU:=Lua | ||
| SECTION:=lang | ||
| CATEGORY:=Languages | ||
| TITLE:=lua-inifile | ||
| URL:=http://docs.bartbes.com/inifile | ||
| DEPENDS:=+lua | ||
| endef | ||
|
|
||
| define Package/lua-inifile/description | ||
| Inifile is a lua library for parsing and writing ini files. | ||
| endef | ||
|
|
||
| define Build/Configure | ||
| endef | ||
|
|
||
| define Build/Compile | ||
| endef | ||
|
|
||
| define Package/lua-inifile/install | ||
| $(INSTALL_DIR) $(1)/$(LUA_MODULE_PATH)/ | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/inifile/inifile.lua $(1)/$(LUA_MODULE_PATH)/inifile.lua | ||
| endef | ||
|
|
||
| $(eval $(call BuildPackage,lua-inifile)) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct. You aren't OpenWrt. Either drop teh copyright outright (my choice) or provide your own name here. (will apply in all places)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression that was required. I'll fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, according to this I can use OpenWrt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's incorrect unfortunately. Either drop it as karlp suggests or add your own.