Merge pull request #265 from berlinmeshnet/meshbox
Import dkjson, lua-bencode, and lua-sha2
This commit is contained in:
commit
cf255a44ab
4 changed files with 163 additions and 0 deletions
47
lang/dkjson/Makefile
Normal file
47
lang/dkjson/Makefile
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 20013-2014 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:=dkjson
|
||||||
|
PKG_VERSION:=2.5
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://dkolf.de/src/dkjson-lua.fsl/tarball/
|
||||||
|
# TODO: md5sum doesn't seem be taken into account
|
||||||
|
PKG_MD5SUM:=dbe706722dd64308172cf8e37395e762
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/dkjson
|
||||||
|
SUBMENU:=Lua
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
TITLE:=DKJSON
|
||||||
|
URL:=http://dkolf.de/src/dkjson-lua.fsl/home
|
||||||
|
MAINTAINER:=Lars Gierth <larsg@systemli.org>
|
||||||
|
DEPENDS:=+lua
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/dkjson/description
|
||||||
|
Lua JSON parser/serializer with UTF-8 support
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/dkjson/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/lua
|
||||||
|
$(INSTALL_BIN) $(BUILD_DIR)/dkjson/dkjson.lua $(1)/usr/lib/lua/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,dkjson))
|
50
lang/lua-bencode/Makefile
Normal file
50
lang/lua-bencode/Makefile
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 20013-2014 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-bencode
|
||||||
|
PKG_VERSION:=2.1.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode
|
||||||
|
PKG_SOURCE_PROTO:=hg
|
||||||
|
PKG_SOURCE_VERSION:=500243383cb6acbddd3cf12aee6e4667aab53324
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/lua-bencode
|
||||||
|
SUBMENU:=Lua
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
TITLE:=lua-bencode
|
||||||
|
URL:=https://bitbucket.org/wilhelmy/lua-bencode
|
||||||
|
MAINTAINER:=Lars Gierth <larsg@systemli.org>
|
||||||
|
DEPENDS:=+lua
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/lua-bencode/description
|
||||||
|
This is a module for the lua programming language for decoding and encoding
|
||||||
|
bencoded data which can be used to read and write torrent files for bittorrent.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Package/lua-bencode/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/lua
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/bencode.lua $(1)/usr/lib/lua
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,lua-bencode))
|
52
lang/lua-sha2/Makefile
Normal file
52
lang/lua-sha2/Makefile
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 20013-2014 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-sha2
|
||||||
|
PKG_VERSION:=0.2.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_SOURCE_URL:=https://code.google.com/p/sha2/
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_VERSION:=02bd4bfdc806
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/lua-sha2
|
||||||
|
SUBMENU:=Lua
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
TITLE:=Lua binding for Aaron Gifford's SHA-2 implementation
|
||||||
|
URL:=https://code.google.com/p/sha2/
|
||||||
|
MAINTAINER:=Lars Gierth <larsg@systemli.org>
|
||||||
|
DEPENDS:=+lua
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/lua-sha2/description
|
||||||
|
Lua Binding for the SHA-2 (SHA-256/384/512) BSD-licensed C implementation by Aaron Gifford.
|
||||||
|
Also contains a HMAC implementation in Lua.
|
||||||
|
endef
|
||||||
|
|
||||||
|
TARGET_CFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN
|
||||||
|
TARGET_LDFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/lua-sha2/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/lua/hmac
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/sha2.so $(1)/usr/lib/lua
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac.lua $(1)/usr/lib/lua
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/sha2.lua $(1)/usr/lib/lua/hmac
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/md5.lua $(1)/usr/lib/lua/hmac
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,lua-sha2))
|
14
lang/lua-sha2/patches/001-makefile.patch
Normal file
14
lang/lua-sha2/patches/001-makefile.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
From: Lars Gierth <larsg@systemli.org>
|
||||||
|
Date: Tue, 2 Sep 2014 00:05:39 +0200
|
||||||
|
|
||||||
|
Add rump Makefile
|
||||||
|
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..f081d38
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -0,0 +1,4 @@
|
||||||
|
+all: sha2.o sha2lib.o
|
||||||
|
+ $(CC) -shared -o sha2.so sha2.o sha2lib.o
|
||||||
|
+
|
||||||
|
+.PHONY: all
|
Loading…
Reference in a new issue