Quellcode durchsuchen

sqlite3: import 3.7.12.1 (2012-05-22) from packages

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
Etienne CHAMPETIER vor 10 Jahren
Ursprung
Commit
9236e4f3e3
1 geänderte Dateien mit 105 neuen und 0 gelöschten Zeilen
  1. 105
    0
      libs/sqlite3/Makefile

+ 105
- 0
libs/sqlite3/Makefile Datei anzeigen

@@ -0,0 +1,105 @@
1
+#
2
+# Copyright (C) 2006-2012 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:=3071201
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://www.sqlite.org
16
+PKG_MD5SUM:=eb7bbd258913518ad30971ea7ecb0ca9
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
+endef
35
+
36
+define Package/sqlite3/Default/description
37
+ SQLite is a small C library that implements a self-contained, embeddable,
38
+ zero-configuration SQL database engine.
39
+endef
40
+
41
+define Package/libsqlite3
42
+  $(call Package/sqlite3/Default)
43
+  SECTION:=libs
44
+  CATEGORY:=Libraries
45
+  DEPENDS:=+libpthread
46
+  TITLE+= (library)
47
+endef
48
+
49
+define Package/libsqlite3/description
50
+$(call Package/sqlite3/Default/description)
51
+ This package contains the SQLite (v3.x) shared library, used by other
52
+ programs.
53
+endef
54
+
55
+define Package/sqlite3-cli
56
+  $(call Package/sqlite3/Default)
57
+  SECTION:=utils
58
+  CATEGORY:=Utilities
59
+  DEPENDS:=+libsqlite3 +libncurses +libreadline
60
+  TITLE+= (cli)
61
+endef
62
+
63
+define Package/sqlite3-cli/description
64
+$(call Package/sqlite3/Default/description)
65
+ This package contains a terminal-based front-end to the SQLite (v3.x) library
66
+ that can evaluate queries interactively and display the results in multiple
67
+ formats.
68
+endef
69
+
70
+TARGET_CFLAGS += $(FPIC) \
71
+	-DSQLITE_ENABLE_UNLOCK_NOTIFY \
72
+
73
+CONFIGURE_ARGS += \
74
+	--enable-shared \
75
+	--enable-static \
76
+
77
+CONFIGURE_VARS += \
78
+	config_BUILD_CC="$(HOSTCC)" \
79
+	config_BUILD_CFLAGS="-O2" \
80
+	config_TARGET_CC="$(TARGET_CC)" \
81
+	config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
82
+	config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
83
+	config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
84
+
85
+define Build/InstallDev
86
+	$(INSTALL_DIR) $(1)/usr/include
87
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3{,ext}.h $(1)/usr/include/
88
+	$(INSTALL_DIR) $(1)/usr/lib
89
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/
90
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
91
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/
92
+endef
93
+
94
+define Package/libsqlite3/install
95
+	$(INSTALL_DIR) $(1)/usr/lib
96
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/
97
+endef
98
+
99
+define Package/sqlite3-cli/install
100
+	$(INSTALL_DIR) $(1)/usr/bin
101
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/
102
+endef
103
+
104
+$(eval $(call BuildPackage,libsqlite3))
105
+$(eval $(call BuildPackage,sqlite3-cli))