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.

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