Revert package feed back
[librecmc/package-feed.git] / libs / sqlite3 / Makefile
1 #
2 # Copyright (C) 2006-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:=sqlite
11 PKG_VERSION:=3160000
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.sqlite.org/2017/
16 PKG_MD5SUM:=5102404047054b2cec2f43463293f94dea39425d42bf386d24596ab4fac7c7ff
17
18 PKG_LICENSE:=PUBLICDOMAIN
19 PKG_LICENSE_FILES:=
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-autoconf-$(PKG_VERSION)
22 PKG_BUILD_DEPENDS:=libncurses libreadline
23
24 PKG_FIXUP:=autoreconf
25
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/sqlite3/Default
31   SUBMENU:=database
32   TITLE:=SQLite (v3.x) database engine
33   URL:=http://www.sqlite.org/
34   MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
35 endef
36
37 define Package/sqlite3/Default/description
38  SQLite is a small C library that implements a self-contained, embeddable,
39  zero-configuration SQL database engine.
40 endef
41
42 define Package/libsqlite3
43   $(call Package/sqlite3/Default)
44   SECTION:=libs
45   CATEGORY:=Libraries
46   DEPENDS:=+libpthread
47   TITLE+= (library)
48 endef
49
50 define Package/libsqlite3/description
51 $(call Package/sqlite3/Default/description)
52  This package contains the SQLite (v3.x) shared library, used by other
53  programs.
54 endef
55
56 define Package/sqlite3-cli
57   $(call Package/sqlite3/Default)
58   SECTION:=utils
59   CATEGORY:=Utilities
60   DEPENDS:=+libsqlite3 +libncurses +libreadline
61   TITLE+= (cli)
62 endef
63
64 define Package/sqlite3-cli/description
65 $(call Package/sqlite3/Default/description)
66  This package contains a terminal-based front-end to the SQLite (v3.x) library
67  that can evaluate queries interactively and display the results in multiple
68  formats.
69 endef
70
71 TARGET_CFLAGS += $(FPIC) \
72         -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
73         -DHAVE_ISNAN=1 \
74         -DHAVE_MALLOC_USABLE_SIZE=1
75
76 CONFIGURE_ARGS += \
77         --enable-shared \
78         --enable-static \
79         --disable-editline
80
81 CONFIGURE_VARS += \
82         config_BUILD_CC="$(HOSTCC)" \
83         config_BUILD_CFLAGS="-O2" \
84         config_TARGET_CC="$(TARGET_CC)" \
85         config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
86         config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
87         config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
88
89 define Build/InstallDev
90         $(INSTALL_DIR) $(1)/usr/include
91         $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3{,ext}.h $(1)/usr/include/
92         $(INSTALL_DIR) $(1)/usr/lib
93         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/
94         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
95         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/
96 endef
97
98 define Package/libsqlite3/install
99         $(INSTALL_DIR) $(1)/usr/lib
100         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/
101 endef
102
103 define Package/sqlite3-cli/install
104         $(INSTALL_DIR) $(1)/usr/bin
105         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/
106 endef
107
108 $(eval $(call BuildPackage,libsqlite3))
109 $(eval $(call BuildPackage,sqlite3-cli))