1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
ZyXEL_VMG8623-T50B/vmg8623_t50b_default_release/package/libs/sqlite3/Makefile

103 lines
2.7 KiB
Makefile
Executable File

#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=sqlite
PKG_VERSION:=3.6.23.1
PKG_RELEASE:=1
#PKG_VERSION:=3.6.20
#PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@ZyXEL_SITE/opensource/libs
#PKG_SOURCE:=$(PKG_NAME)-amalgamation-$(PKG_VERSION).tar.gz
#PKG_SOURCE_URL:=http://www.sqlite.org/
#PKG_MD5SUM:=4bb3e9ee5d25e88b8ff8533fbeb168aa
PKG_BUILD_DEPENDS:=libncurses libreadline
PKG_FIXUP:=libtool
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/sqlite3/Default
SUBMENU:=database
TITLE:=SQLite (v3.x) database engine
URL:=http://www.sqlite.org/
endef
define Package/sqlite3/Default/description
SQLite is a small C library that implements a self-contained, embeddable,
zero-configuration SQL database engine.
endef
define Package/libsqlite3
$(call Package/sqlite3/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libpthread
TITLE+= (library)
endef
define Package/libsqlite3/description
$(call Package/sqlite3/Default/description)
This package contains the SQLite (v3.x) shared library, used by other
programs.
endef
define Package/sqlite3-cli
$(call Package/sqlite3/Default)
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libsqlite3 +libncurses +libreadline
TITLE+= (cli)
endef
define Package/sqlite3-cli/description
$(call Package/sqlite3/Default/description)
This package contains a terminal-based front-end to the SQLite (v3.x) library
that can evaluate queries interactively and display the results in multiple
formats.
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
CONFIGURE_VARS += \
config_BUILD_CC="$(HOSTCC)" \
config_BUILD_CFLAGS="-O2" \
config_TARGET_CC="$(TARGET_CC)" \
config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libsqlite3/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/
endef
define Package/sqlite3-cli/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libsqlite3))
$(eval $(call BuildPackage,sqlite3-cli))