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.

77 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2015 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-md5
  9. PKG_VERSION:=1.3
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  12. PKG_LICENSE:=MIT
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_MIRROR_HASH:=675b8ba144d14cbe66abfd360d9a8861a18d5b69966768d6cdc78ca3c9fe0baf
  15. PKG_SOURCE_URL:=https://github.com/keplerproject/md5.git
  16. PKG_SOURCE_PROTO:=git
  17. PKG_SOURCE_VERSION:=2a98633d7587a4900cfa7cbed340f377f4acd930
  18. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/lua-md5
  22. SUBMENU:=Lua
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=Lua-MD5
  26. URL:=https://github.com/keplerproject/md5
  27. DEPENDS:=+lua
  28. endef
  29. define Package/lua-md5/description
  30. MD5 offers basic cryptographic facilities for Lua
  31. endef
  32. TARGET_CFLAGS += $(FPIC)
  33. # add make variable overrides here
  34. MAKE_FLAGS +=
  35. define Build/Configure
  36. endef
  37. define Build/Compile
  38. $(MAKE) -C $(PKG_BUILD_DIR) \
  39. PREFIX="$(STAGING_DIR)/usr" \
  40. LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \
  41. clean
  42. $(MAKE) -C $(PKG_BUILD_DIR) \
  43. PREFIX="$(STAGING_DIR)/usr" \
  44. LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \
  45. LIB_OPTION="-shared" \
  46. CC="$(TARGET_CROSS)gcc" \
  47. CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  48. all
  49. endef
  50. define Build/Install
  51. mkdir -p $(PKG_INSTALL_DIR)/usr/lib/lua
  52. $(MAKE) -C $(PKG_BUILD_DIR) \
  53. LUA_LIBDIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
  54. LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \
  55. install
  56. endef
  57. define Package/lua-md5/install
  58. $(INSTALL_DIR) $(1)/usr/lib/lua
  59. $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/md5.lua $(1)/usr/lib/lua
  60. $(INSTALL_DIR) $(1)/usr/lib/lua/md5
  61. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/core.so $(1)/usr/lib/lua/md5/core.so
  62. endef
  63. $(eval $(call BuildPackage,lua-md5))