Bladeren bron

luabitop: import from packages

Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise
operations on numbers.

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
Maxim Storchak 10 jaren geleden
bovenliggende
commit
b17a792d7d
1 gewijzigde bestanden met toevoegingen van 51 en 0 verwijderingen
  1. 51
    0
      lang/luabitop/Makefile

+ 51
- 0
lang/luabitop/Makefile Bestand weergeven

@@ -0,0 +1,51 @@
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
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=luabitop
11
+PKG_VERSION:=1.0.2
12
+PKG_RELEASE:=1
13
+
14
+_BASENAME:=LuaBitOp
15
+
16
+PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz
17
+PKG_SOURCE_URL:=http://bitop.luajit.org/download/
18
+PKG_MD5SUM:=d0c1080fe0c844e8477279668e2d0d06
19
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(_BASENAME)-$(PKG_VERSION)
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+
23
+define Package/luabitop
24
+  SUBMENU:=Lua
25
+  SECTION:=lang
26
+  CATEGORY:=Languages
27
+  TITLE:=luabitop
28
+  URL:=http://bitop.luajit.org/
29
+  DEPENDS:=+lua
30
+endef
31
+
32
+define Package/luabitop/description
33
+Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers.
34
+endef
35
+
36
+define Build/Configure
37
+endef
38
+
39
+
40
+TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE
41
+
42
+define Build/Compile
43
+	$(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
44
+endef
45
+
46
+define Package/luabitop/install
47
+	$(INSTALL_DIR) $(1)/usr/lib/lua
48
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua
49
+endef
50
+
51
+$(eval $(call BuildPackage,luabitop))