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.

56 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2015 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.1
  10. PKG_RELEASE:=2
  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_MD5SUM:=842b44f8c95517ed5b792081a2370da1
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION)
  18. PKG_BUILD_DEPENDS:=python libpq python-setuptools
  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. This package contains is a PostgreSQL database adapter for the Python
  31. programming language.
  32. endef
  33. define Build/Compile
  34. # The PATH var is required so that psycopg2's setup.py script finds pg_config
  35. $(call Build/Compile/PyMod,., \
  36. install --prefix=/usr --root=$(PKG_INSTALL_DIR), \
  37. PATH=$(STAGING_DIR)/usr/bin:$(PATH))
  38. endef
  39. define Package/python-psycopg2/install
  40. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  41. $(CP) \
  42. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  43. $(1)$(PYTHON_PKG_DIR)
  44. endef
  45. $(eval $(call PyPackage,python-psycopg2))
  46. $(eval $(call BuildPackage,python-psycopg2))