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.2 KiB

  1. #
  2. # Copyright (C) 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:=luabitop
  9. PKG_VERSION:=1.0.2
  10. PKG_RELEASE:=1
  11. _BASENAME:=LuaBitOp
  12. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  13. PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=http://bitop.luajit.org/download/
  15. PKG_MD5SUM:=d0c1080fe0c844e8477279668e2d0d06
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(_BASENAME)-$(PKG_VERSION)
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/luabitop
  19. SUBMENU:=Lua
  20. SECTION:=lang
  21. CATEGORY:=Languages
  22. TITLE:=luabitop
  23. URL:=http://bitop.luajit.org/
  24. DEPENDS:=+lua
  25. endef
  26. define Package/luabitop/description
  27. Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers.
  28. endef
  29. define Build/Configure
  30. endef
  31. TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE
  32. define Build/Compile
  33. $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CPPFLAGS) -std=gnu99 $(FPIC) -DLUA_USE_LINUX -shared -o $(PKG_BUILD_DIR)/bit.so $(PKG_BUILD_DIR)/bit.c
  34. endef
  35. define Package/luabitop/install
  36. $(INSTALL_DIR) $(1)/usr/lib/lua
  37. $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua
  38. endef
  39. $(eval $(call BuildPackage,luabitop))