[packages] lsqlite3: fix compilation, set INCS & LIBS, pass UNAME to prevent it from...
[openwrt/svn-archive/archive.git] / lang / lsqlite3 / Makefile
1 #
2 # Copyright (C) 2009-2010 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:=lsqlite3
11 PKG_VERSION:=6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/2565
16 PKG_MD5SUM:=368da52fc52b9c5ba122f8f348db332b
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/lsqlite3
21 SUBMENU:=Lua
22 SECTION:=lang
23 CATEGORY:=Languages
24 TITLE:=LuaSQLite3
25 URL:=http://luasqlite.luaforge.net/lsqlite3.html
26 DEPENDS:=+lua +libsqlite3
27 endef
28
29 define Package/lsqlite3/description
30 LuaSQLite 3 is a thin wrapper around the public domain SQLite3 database engine.
31 endef
32
33 define Build/Configure
34 endef
35
36 TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) -std=c99
37
38 TARGET_LDFLAGS += -llua
39
40 define Build/Compile
41 $(MAKE) -C $(PKG_BUILD_DIR) \
42 CC="$(TARGET_CC)" \
43 CFLAGS="$(TARGET_CFLAGS)" \
44 INCS="$(TARGET_CPPFLAGS)" \
45 LIBS="$(TARGET_LDFLAGS)" \
46 SHFLAGS="-shared" \
47 UNAME="Linux"
48 endef
49
50 define Package/lsqlite3/install
51 $(INSTALL_DIR) $(1)/usr/lib/lua
52 $(CP) $(PKG_BUILD_DIR)/lsqlite3.so $(1)/usr/lib/lua/
53 endef
54
55 $(eval $(call BuildPackage,lsqlite3))