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.

75 lines
2.1 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. include $(INCLUDE_DIR)/package.mk
  15. CONFIGURE_ARGS += \
  16. --with-unixodbc=$(STAGING_DIR)/usr \
  17. --with-libpq=$(STAGING_DIR)/usr
  18. define Package/psqlodbc/Default
  19. SUBMENU:=database
  20. URL:=https://odbc.postgresql.org/
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=Postgresql driver for ODBC
  24. DEPENDS:=+unixodbc +libpq
  25. endef
  26. define Package/psqlodbca
  27. $(call Package/psqlodbc/Default)
  28. TITLE:=psqlODBC - PostgreSQL ODBC driver (ASCII)
  29. endef
  30. define Package/psqlodbcw
  31. $(call Package/psqlodbc/Default)
  32. TITLE:=psqlODBC - PostgreSQL ODBC driver (UTF-8)
  33. endef
  34. define Package/psqlodbca/description
  35. psqlODBC is the official PostgreSQL ODBC Driver.
  36. It is released under the Library General Public Licence, or LGPL.
  37. endef
  38. define Package/psqlodbcw/description
  39. $(call Package/psqlodbca/description)
  40. (UTF-8 version)
  41. endef
  42. define Package/psqlodbca/install
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/psqlodbca.so* $(1)/usr/lib/
  45. $(INSTALL_DIR) $(1)/etc/odbcinst.ini.d
  46. echo "[PostgreSQL ANSI]" > $(1)/etc/odbcinst.ini.d/psqlodbca.ini
  47. echo "Description = PostgreSQL ODBC driver (ANSI version)" >> $(1)/etc/odbcinst.ini.d/psqlodbca.ini
  48. echo "Driver = /usr/lib/psqlodbca.so" >> $(1)/etc/odbcinst.ini.d/psqlodbca.ini
  49. endef
  50. define Package/psqlodbcw/install
  51. $(INSTALL_DIR) $(1)/usr/lib
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/psqlodbcw.so* $(1)/usr/lib/
  53. $(INSTALL_DIR) $(1)/etc/odbcinst.ini.d
  54. echo "[PostgreSQL Unicode]" > $(1)/etc/odbcinst.ini.d/psqlodbcw.ini
  55. echo "Description = PostgreSQL ODBC driver (Unicode version)" >> $(1)/etc/odbcinst.ini.d/psqlodbcw.ini
  56. echo "Driver = /usr/lib/psqlodbcw.so" >> $(1)/etc/odbcinst.ini.d/psqlodbcw.ini
  57. endef
  58. $(eval $(call BuildPackage,psqlodbca))
  59. $(eval $(call BuildPackage,psqlodbcw))