You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.2 KiB

  1. # This is free software, licensed under the GNU General Public License v2.
  2. # See /LICENSE for more information.
  3. #
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=psqlodbc
  6. PKG_VERSION:=11.00.0000
  7. PKG_RELEASE:=1
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_SOURCE_URL:=https://ftp.postgresql.org/pub/odbc/versions/src
  10. PKG_HASH:=703e6b87022f95ffa00d9f86c8f0a877f8a55b9b3be0942081f382e794112a86
  11. PKG_MAINTAINER:=
  12. PKG_LICENSE:=LGPL-2.0+
  13. PKG_LICENSE_FILES:=license.txt
  14. PKG_BUILD_DEPENDS:=unixodbc/host
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. CONFIGURE_ARGS += \
  19. --with-unixodbc=$(STAGING_DIR_HOST)/bin/odbc_config \
  20. --with-libpq=$(STAGING_DIR)/usr
  21. define Package/psqlodbc/Default
  22. SUBMENU:=database
  23. URL:=https://odbc.postgresql.org/
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=Postgresql driver for ODBC
  27. DEPENDS:=+unixodbc +libpq
  28. endef
  29. define Package/psqlodbca
  30. $(call Package/psqlodbc/Default)
  31. TITLE:=psqlODBC - PostgreSQL ODBC driver (ASCII)
  32. endef
  33. define Package/psqlodbcw
  34. $(call Package/psqlodbc/Default)
  35. TITLE:=psqlODBC - PostgreSQL ODBC driver (UTF-8)
  36. endef
  37. define Package/psqlodbca/description
  38. psqlODBC is the official PostgreSQL ODBC Driver.
  39. It is released under the Library General Public Licence, or LGPL.
  40. endef
  41. define Package/psqlodbcw/description
  42. $(call Package/psqlodbca/description)
  43. (UTF-8 version)
  44. endef
  45. define Package/psqlodbca/install
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/psqlodbca.so* $(1)/usr/lib/
  48. $(INSTALL_DIR) $(1)/etc/odbcinst.ini.d
  49. echo "[PostgreSQL ANSI]" > $(1)/etc/odbcinst.ini.d/psqlodbca.ini
  50. echo "Description = PostgreSQL ODBC driver (ANSI version)" >> $(1)/etc/odbcinst.ini.d/psqlodbca.ini
  51. echo "Driver = /usr/lib/psqlodbca.so" >> $(1)/etc/odbcinst.ini.d/psqlodbca.ini
  52. endef
  53. define Package/psqlodbcw/install
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/psqlodbcw.so* $(1)/usr/lib/
  56. $(INSTALL_DIR) $(1)/etc/odbcinst.ini.d
  57. echo "[PostgreSQL Unicode]" > $(1)/etc/odbcinst.ini.d/psqlodbcw.ini
  58. echo "Description = PostgreSQL ODBC driver (Unicode version)" >> $(1)/etc/odbcinst.ini.d/psqlodbcw.ini
  59. echo "Driver = /usr/lib/psqlodbcw.so" >> $(1)/etc/odbcinst.ini.d/psqlodbcw.ini
  60. endef
  61. $(eval $(call BuildPackage,psqlodbca))
  62. $(eval $(call BuildPackage,psqlodbcw))