unixodbc: Split libraries package into separate packages

This splits the unixodbc package into separate packages (libodbc,
libodbccr, libodbcinst). This also keeps the unixodbc package for
backwards compatibility.

The Internet News Server driver (libnn) is omitted as the driver README
describes it as "in mid-hack"[1] and it is doubtful if there is any
real-world use for it.

This also updates the package license information and URL, and sets
PKG_BUILD_PARALLEL and HOST_BUILD_PARALLEL.

[1]: 9b31cd228d/Drivers/nn/README (L17-L19)

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To 2023-10-27 21:03:23 +08:00 committed by Rosen Penev
parent 80aeb31082
commit 9563c6f018
1 changed files with 97 additions and 21 deletions

View File

@ -9,23 +9,27 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unixodbc
PKG_VERSION:=2.3.9
PKG_RELEASE:=6
PKG_RELEASE:=7
PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.unixodbc.org
PKG_HASH:=52833eac3d681c8b0c9a5a65f2ebd745b3a964f208fc748f977e44015a31b207
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=prog GPL libs LGPL
PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING exe/COPYING
PKG_CPE_ID:=cpe:/a:unixodbc:unixodbc
PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR)/host/unixODBC-$(PKG_VERSION)
HOST_BUILD_DEPENDS:=unixodbc
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
HOST_BUILD_DEPENDS:=unixodbc
HOST_BUILD_PARALLEL:=1
# if your other package depends on unixodbc and needs
# odbc_config, add to your other Makefile
# PKG_BUILD_DEPENDS:=unixodbc/host
@ -41,44 +45,103 @@ CONFIGURE_ARGS += \
define Package/unixodbc/Default
SUBMENU:=Database
TITLE:=unixODBC
URL:=http://www.unixodbc.org
URL:=https://www.unixodbc.org
endef
define Package/unixodbc
$(call Package/unixodbc/Default)
TITLE+= (libraries)
define Package/unixodbc/Default/description
unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux,
Mac OSX, and UNIX.
endef
define Package/libodbc
$(call Package/unixodbc/Default)
TITLE+= Driver Manager library
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libltdl +libpthread
ABI_VERSION:=2
endef
define Package/libodbc/description
$(call Package/unixodbc/Default/description)
This package provides the unixODBC Driver Manager library.
endef
define Package/libodbccr
$(call Package/unixodbc/Default)
TITLE+= Cursor library
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libodbc +libltdl +libpthread
ABI_VERSION:=2
endef
define Package/libodbccr/description
$(call Package/unixodbc/Default/description)
This package provides the unixODBC Cursor library.
endef
define Package/libodbcinst
$(call Package/unixodbc/Default)
TITLE+= Configuration library
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libltdl +libpthread
ABI_VERSION:=2
endef
define Package/libodbcinst/description
$(call Package/unixodbc/Default/description)
This package provides the unixODBC Configuration library.
endef
define Package/unixodbc
$(call Package/unixodbc/Default)
TITLE+= (libraries)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libodbc +libodbccr +libodbcinst
endef
define Package/unixodbc/description
unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux,
Mac OSX, and UNIX.
$(call Package/unixodbc/Default/description)
This package installs the unixODBC Driver Manager, Cursor, and
Configuration libraries. This package is provided for backwards
compatibility; these libraries are available in separate packages.
endef
define Package/unixodbc-tools
$(call Package/unixodbc/Default)
$(call Package/unixodbc/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= Tools
DEPENDS:=+unixodbc +libncurses +libreadline
DEPENDS:=+libodbc +libodbcinst +libltdl +libreadline
endef
define Package/unixodbc-tools/description
Command Line Tools to help install a driver and work with SQL.
$(call Package/unixodbc/Default/description)
This package provides command-line tools to help install a driver and
work with SQL.
endef
define Package/pgsqlodbc
$(call Package/unixodbc/Default)
$(call Package/unixodbc/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Postgresql driver for ODBC
DEPENDS:=+unixodbc +libpq
TITLE:=PostgreSQL driver for ODBC
DEPENDS:=+libodbc +libpq +libltdl +libpthread
ABI_VERSION:=2
endef
define Package/pgsqlodbc/description
Postgresql driver for ODBC.
$(call Package/unixodbc/Default/description)
This package provides the PostgreSQL driver for ODBC.
endef
define Build/InstallDev
@ -96,16 +159,26 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/etc/ODBCDataSources
endef
define Package/unixodbc/install
define Package/libodbc/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbc[ci]*so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbc.*so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnn*so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbc.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/odbc.init $(1)/etc/init.d/odbc
$(LN) /tmp/etc/odbcinst.ini $(1)/etc/odbcinst.ini
endef
define Package/libodbccr/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbccr.so* $(1)/usr/lib/
endef
define Package/libodbcinst/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbcinst.so* $(1)/usr/lib/
endef
Package/unixodbc/install:=:
define Package/unixodbc-tools/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/{dltest,isql,iusql,odbcinst,slencheck} $(1)/usr/bin/
@ -113,7 +186,7 @@ endef
define Package/pgsqlodbc/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbcpsql*so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libodbcpsql.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/odbcinst.ini.d/
$(INSTALL_DATA) ./files/pgsqlodbc.ini $(1)/etc/odbcinst.ini.d/
endef
@ -137,6 +210,9 @@ define Host/Install
$(INSTALL_BIN) $(HOST_BUILD_DIR)/exe/odbc_config $(STAGING_DIR)/host/bin/
endef
$(eval $(call BuildPackage,libodbc))
$(eval $(call BuildPackage,libodbccr))
$(eval $(call BuildPackage,libodbcinst))
$(eval $(call BuildPackage,unixodbc))
$(eval $(call BuildPackage,unixodbc-tools))
$(eval $(call BuildPackage,pgsqlodbc))