[packages] lsqlite3: actually link against libsqlite3, fixes segfault when accessing...
[openwrt/svn-archive/archive.git] / lang / lsqlite3 / Makefile
1 #
2 # Copyright (C) 2009-2011 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:=7
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/4472
16 PKG_MD5SUM:=ef7afdd3ea7a29333daa951cda3175bb
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 -lsqlite3
39
40 MAKE_FLAGS += \
41 CC="$(TARGET_CC)" \
42 CFLAGS="$(TARGET_CFLAGS)" \
43 INCS="$(TARGET_CPPFLAGS)" \
44 LIBS="$(TARGET_LDFLAGS)" \
45 SHFLAGS="-shared" \
46 UNAME="Linux"
47
48 define Package/lsqlite3/install
49 $(INSTALL_DIR) $(1)/usr/lib/lua
50 $(CP) $(PKG_BUILD_DIR)/lsqlite3.so $(1)/usr/lib/lua/
51 endef
52
53 $(eval $(call BuildPackage,lsqlite3))