You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.5 KiB

  1. #
  2. # Copyright (C) 20013-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=lua-sha2
  9. PKG_VERSION:=0.2.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=https://github.com/lgierth/lua-sha2.git
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=02bd4bfdc8062c7e1ae51c5a72906efc0a6375ee
  16. PKG_LICENSE:=MIT
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/lua-sha2
  19. SUBMENU:=Lua
  20. SECTION:=lang
  21. CATEGORY:=Languages
  22. TITLE:=Lua binding for Aaron Gifford's SHA-2 implementation
  23. URL:=https://code.google.com/p/sha2/
  24. MAINTAINER:=Lars Gierth <larsg@systemli.org>
  25. DEPENDS:=+lua
  26. endef
  27. define Package/lua-sha2/description
  28. Lua Binding for the SHA-2 (SHA-256/384/512) BSD-licensed C implementation by Aaron Gifford.
  29. Also contains a HMAC implementation in Lua.
  30. endef
  31. TARGET_CFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN
  32. TARGET_LDFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN
  33. define Build/Configure
  34. endef
  35. define Package/lua-sha2/install
  36. $(INSTALL_DIR) $(1)/usr/lib/lua/hmac
  37. $(INSTALL_DATA) $(PKG_BUILD_DIR)/sha2.so $(1)/usr/lib/lua
  38. $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac.lua $(1)/usr/lib/lua
  39. $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/sha2.lua $(1)/usr/lib/lua/hmac
  40. $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/md5.lua $(1)/usr/lib/lua/hmac
  41. endef
  42. $(eval $(call BuildPackage,lua-sha2))