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:=09.06.0310
  8. PKG_HASH:=6c42078af094d61baca2c8bd1dc4d137a77377198ef94e4eda5989bdce3474c3
  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)/usr \
  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))