Merge pull request #2126 from lynxis/libmicrohttpd
[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 ifeq ($(CONFIG_USE_MUSL),n)
27 LDFLAGS += -lnsl
28 endif
29
30 define Package/libzdb
31 SECTION:=libs
32 CATEGORY:=Libraries
33 TITLE:=A thread-safe multi database connection pool library
34 MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
35 URL:=http://www.tildeslash.com/libzdb/
36 DEPENDS:=+libsqlite3 +libpq +libmysqlclient +zlib +libpthread +libopenssl
37 endef
38
39 define Package/libzdb/description
40 zdb is a database library with thread-safe connection pooling. The library can connect
41 transparently to multiple database systems. It has zero runtime configuration and connections
42 are specified via a URL scheme. A modern object-oriented API is provided.
43 zdb supports MySQL, PostgreSQL, SQLite, and Oracle.
44 NOTE: This package does not include Oracle support.
45 endef
46
47 CONFIGURE_ARGS += --disable-profiling \
48 --enable-optimized \
49 --with-mysql \
50 --with-postgresql \
51 --with-sqlite \
52 --enable-sqliteunlock \
53 --enable-openssl
54
55 TARGET_CPPFLAGS += -std=c99
56
57 include $(INCLUDE_DIR)/host-build.mk
58
59 define Hooks/HostConfigure/Pre
60 endef
61
62 define Host/Configure
63 endef
64
65 define Host/Compile
66 $(HOSTCC) $(HOST_BUILD_DIR)/tools/filterh/lex.yy.c -o $(HOST_BUILD_DIR)/tools/bin/filterh
67 endef
68
69 define Host/Install
70 $(INSTALL_DIR) $(STAGING_DIR)/host/bin
71 $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR)/host/bin/
72 endef
73
74 $(eval $(call HostBuild))
75
76 define Build/Compile
77 $(call Build/Compile/Default)
78 endef
79
80 define Build/InstallDev
81 $(INSTALL_DIR) $(1)/usr/include/zdb
82 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
83 $(CP) $(PKG_INSTALL_DIR)/usr/include/zdb/ $(1)/usr/include/
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb* $(1)/usr/lib/
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/zdb.pc $(1)/usr/lib/pkgconfig
86 endef
87
88 define Package/libzdb/install
89 $(INSTALL_DIR) $(1)/usr/lib
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb.so* $(1)/usr/lib/
91 endef
92
93 $(eval $(call BuildPackage,libzdb))