From 671fc5a58935bcbea381bd595de26d95ea89f283 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Fri, 22 Aug 2014 11:46:42 +0200 Subject: [PATCH] libdbi-drivers: import from old packages feed - rename packages from libdbi-drivers-* to libdbd-* - cleanup title & description - remove SQLite v2 driver - use PKG_INSTALL - add a BuildPlugin macro to package drivers - add license info - add myself as maintainer Signed-off-by: Nicolas Thill --- libs/libdbi-drivers/Makefile | 105 ++++++++++++++++++ .../patches/001_libsqlite3_fix.patch | 11 ++ 2 files changed, 116 insertions(+) create mode 100644 libs/libdbi-drivers/Makefile create mode 100644 libs/libdbi-drivers/patches/001_libsqlite3_fix.patch diff --git a/libs/libdbi-drivers/Makefile b/libs/libdbi-drivers/Makefile new file mode 100644 index 0000000000..3ff5bae677 --- /dev/null +++ b/libs/libdbi-drivers/Makefile @@ -0,0 +1,105 @@ +# +# Copyright (C) 2009-2014 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:=libdbi-drivers +PKG_VERSION:=0.9.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/libdbi-drivers +PKG_MD5SUM:=9f47b960e225eede2cdeaabf7d22f59f + +PKG_LICENSE:=LGPL-2.1 +PKG_LICENSE_FILE:=COPYING +PKG_MAINTAINER:=Nicolas Thill + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libdbi-drivers/default + SECTION:=libs + CATEGORY:=Libraries + URL:=http://libdbi-drivers.sourceforge.net/ +endef + +define Package/libdbi-drivers +$(call Package/libdbi-drivers/default) + DEPENDS:=libdbi +libdbd-mysql +libdbd-pgsql +libdbd-sqlite3 + TITLE:=Database drivers for libdbi +endef + +define Package/libdbd-mysql +$(call Package/libdbi-drivers/default) + DEPENDS:=libdbi +libmysqlclient + TITLE:=MySQL database server driver for libdbi +endef + +define Package/libdbd-pgsql +$(call Package/libdbi-drivers/default) + DEPENDS:=libdbi +libpq + TITLE:=PostgreSQL database server driver for libdbi +endef + +define Package/libdbd-sqlite3 +$(call Package/libdbi-drivers/default) + DEPENDS:=libdbi +libsqlite3 + TITLE:=SQLite3 database driver for libdbi +endef + +CONFIGURE_ARGS += \ + --enable-shared \ + --disable-static \ + --disable-rpath \ + --disable-docs \ + --with-dbi-incdir=$(STAGING_DIR)/usr/include \ + --with-dbi-libdir=$(STAGING_DIR)/usr/lib + +ifneq ($(CONFIG_PACKAGE_libdbd-mysql),) + CONFIGURE_ARGS += \ + --with-mysql \ + --with-mysql-incdir=$(STAGING_DIR)/usr/include/mysql \ + --with-mysql-libdir=$(STAGING_DIR)/usr/lib/mysql + TARGET_LDFLAGS += \ + -L$(STAGING_DIR)/usr/lib/mysql/ +else + CONFIGURE_ARGS += --without-mysql +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_libdbd-pgsql),) + CONFIGURE_ARGS += \ + --with-pgsql \ + --with-pgsql-incdir=$(STAGING_DIR)/usr/include \ + --with-pgsql-libdir=$(STAGING_DIR)/usr/lib +else + CONFIGURE_ARGS += --without-pgsql +endif + +ifneq ($(SDK)$(CONFIG_PACKAGE_libdbd-sqlite3),) + CONFIGURE_ARGS += \ + --with-sqlite3 \ + --with-sqlite3-incdir=$(STAGING_DIR)/usr/include \ + --with-sqlite3-libdir=$(STAGING_DIR)/usr/lib +else + CONFIGURE_ARGS += --without-sqlite3 +endif + +define BuildPlugin + define Package/libdbd-$(1)/install + $(INSTALL_DIR) $$(1)/usr/lib/dbd + $(CP) $(PKG_INSTALL_DIR)/usr/lib/dbd/libdbd$(1).so $$(1)/usr/lib/dbd/ + endef + $$(eval $$(call BuildPackage,libdbd-$(1))) +endef + +#$(eval $(call BuildPackage,libdbi-drivers)) +$(eval $(call BuildPlugin,mysql)) +$(eval $(call BuildPlugin,pgsql)) +$(eval $(call BuildPlugin,sqlite3)) diff --git a/libs/libdbi-drivers/patches/001_libsqlite3_fix.patch b/libs/libdbi-drivers/patches/001_libsqlite3_fix.patch new file mode 100644 index 0000000000..5ded95328c --- /dev/null +++ b/libs/libdbi-drivers/patches/001_libsqlite3_fix.patch @@ -0,0 +1,11 @@ +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -310,7 +310,7 @@ if test "$ac_sqlite3" = "yes"; then + AC_SEARCH_LIBS_VAR([sqlite3_exec], sqlite3, , , , SQLITE3_LIBS) + SQLITE3_LDFLAGS="" + else +- SQLITE3_LIBS=-lsqlite ++ SQLITE3_LIBS=-lsqlite3 + SQLITE3_LDFLAGS=-L$ac_sqlite3_libdir + fi + -- 2.30.2