96bf3a6253803e0e84fbf80858713f255eed94e5
[feed/packages.git] / libs / libzdb / Makefile
1 #
2 # Copyright (C) 2007-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:=libzdb
11 PKG_VERSION:=3.0
12 PKG_RELEASE:=1
13 PKG_LICENSE:=GPL-3.0
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.tildeslash.com/libzdb/dist/
17 PKG_MD5SUM:=3bb9efff10a1f3ebc5b76c1055c48635
18
19 PKG_FIXUP:=autoreconf
20 PKG_INSTALL:=1
21
22 PKG_BUILD_DEPENDS:=libzdb/host
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libzdb
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=A thread-safe multi database connection pool library
30 MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
31 URL:=http://www.tildeslash.com/libzdb/
32 DEPENDS:=+libsqlite3 +libpq +libmysqlclient +zlib +libpthread +libopenssl
33 endef
34
35 define Package/libzdb/description
36 zdb is a database library with thread-safe connection pooling. The library can connect
37 transparently to multiple database systems. It has zero runtime configuration and connections
38 are specified via a URL scheme. A modern object-oriented API is provided.
39 zdb supports MySQL, PostgreSQL, SQLite, and Oracle.
40 NOTE: This package does not include Oracle support.
41 endef
42
43 CONFIGURE_ARGS += --disable-profiling \
44 --enable-optimized \
45 --with-mysql \
46 --with-postgresql \
47 --with-sqlite \
48 --enable-sqliteunlock \
49 --enable-openssl
50
51 TARGET_CPPFLAGS += -std=c99
52
53 include $(INCLUDE_DIR)/host-build.mk
54
55 define Hooks/HostConfigure/Pre
56 endef
57
58 define Host/Configure
59 endef
60
61 define Host/Compile
62 $(HOSTCC) $(HOST_BUILD_DIR)/tools/filterh/lex.yy.c -o $(HOST_BUILD_DIR)/tools/bin/filterh
63 endef
64
65 define Host/Install
66 $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
67 $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR_HOST)/bin/
68 endef
69
70 $(eval $(call HostBuild))
71
72 define Build/Compile
73 $(call Build/Compile/Default)
74 endef
75
76 define Build/InstallDev
77 $(INSTALL_DIR) $(1)/usr/include/zdb
78 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
79 $(CP) $(PKG_INSTALL_DIR)/usr/include/zdb/ $(1)/usr/include/
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb* $(1)/usr/lib/
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/zdb.pc $(1)/usr/lib/pkgconfig
82 endef
83
84 define Package/libzdb/install
85 $(INSTALL_DIR) $(1)/usr/lib
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb.so* $(1)/usr/lib/
87 endef
88
89 $(eval $(call BuildPackage,libzdb))