Makefile (1503B)
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 8 include $(TOPDIR)/rules.mk 9 10 PKG_NAME:=python-psycopg2 11 PKG_VERSION:=2.6.2 12 PKG_RELEASE:=1 13 PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru> 14 PKG_LICENSE:=LGPL-3.0+ 15 PKG_LICENSE_FILES:=LICENSE 16 17 PKG_SOURCE:=psycopg2-$(PKG_VERSION).tar.gz 18 PKG_SOURCE_URL:=http://initd.org/psycopg/tarballs/PSYCOPG-2-6/ 19 PKG_MD5SUM:=4a392949ba31a378a18ed3e775a4693f 20 21 PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION) 22 PKG_BUILD_DEPENDS:=python libpq python/host 23 24 include $(INCLUDE_DIR)/package.mk 25 $(call include_mk, python-package.mk) 26 27 define Package/python-psycopg2 28 SUBMENU:=Python 29 SECTION:=lang 30 CATEGORY:=Languages 31 TITLE:=PostgreSQL database adapter for Python 32 URL:=http://www.initd.org/ 33 DEPENDS:=+python +libpq +python-egenix-mx-base 34 endef 35 36 define Package/python-psycopg2/description 37 Psycopg is the most popular PostgreSQL adapter for the Python programming language 38 endef 39 40 define Build/Compile 41 # The PATH var is required so that psycopg2's setup.py script finds pg_config 42 $(call Build/Compile/PyMod,., \ 43 install --prefix=/usr --root=$(PKG_INSTALL_DIR), \ 44 PATH=$(STAGING_DIR)/usr/bin:$(PATH)) 45 endef 46 47 define Package/python-psycopg2/install 48 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) 49 $(CP) \ 50 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ 51 $(1)$(PYTHON_PKG_DIR) 52 endef 53 54 $(eval $(call PyPackage,python-psycopg2)) 55 $(eval $(call BuildPackage,python-psycopg2))