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.

55 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=python-psycopg2
  9. PKG_VERSION:=2.6.2
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
  12. PKG_LICENSE:=LGPL-3.0+
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_SOURCE:=psycopg2-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=http://initd.org/psycopg/tarballs/PSYCOPG-2-6/
  16. PKG_HASH:=70490e12ed9c5c818ecd85d185d363335cc8a8cbf7212e3c185431c79ff8c05c
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION)
  18. PKG_BUILD_DEPENDS:=python libpq python/host
  19. include $(INCLUDE_DIR)/package.mk
  20. $(call include_mk, python-package.mk)
  21. define Package/python-psycopg2
  22. SUBMENU:=Python
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. TITLE:=PostgreSQL database adapter for Python
  26. URL:=http://www.initd.org/
  27. DEPENDS:=+python +libpq +python-egenix-mx-base
  28. endef
  29. define Package/python-psycopg2/description
  30. Psycopg is the most popular PostgreSQL adapter for the Python programming language
  31. endef
  32. define Build/Compile
  33. # The PATH var is required so that psycopg2's setup.py script finds pg_config
  34. $(call Build/Compile/PyMod,., \
  35. install --prefix=/usr --root=$(PKG_INSTALL_DIR), \
  36. PATH=$(STAGING_DIR)/usr/bin:$(PATH))
  37. endef
  38. define Package/python-psycopg2/install
  39. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  40. $(CP) \
  41. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  42. $(1)$(PYTHON_PKG_DIR)
  43. endef
  44. $(eval $(call PyPackage,python-psycopg2))
  45. $(eval $(call BuildPackage,python-psycopg2))