Browse Source

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 <nico@openwrt.org>
lilik-openwrt-22.03
Nicolas Thill 10 years ago
parent
commit
671fc5a589
2 changed files with 116 additions and 0 deletions
  1. +105
    -0
      libs/libdbi-drivers/Makefile
  2. +11
    -0
      libs/libdbi-drivers/patches/001_libsqlite3_fix.patch

+ 105
- 0
libs/libdbi-drivers/Makefile View File

@ -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 <nico@openwrt.org>
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))

+ 11
- 0
libs/libdbi-drivers/patches/001_libsqlite3_fix.patch View File

@ -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

Loading…
Cancel
Save