2 # Copyright (C) 2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=python-psycopg2
13 PKG_MAINTAINER
:=Dmitry Trefilov
<the-alien@live.ru
>
14 PKG_LICENSE
:=LGPL-3.0
+
15 PKG_LICENSE_FILES
:=LICENSE
17 PKG_SOURCE
:=psycopg2-
$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_URL
:=http
://initd.org
/psycopg
/tarballs
/PSYCOPG-2-6
/
19 PKG_HASH
:=70490e12ed9c5c818ecd85d185d363335cc8a8cbf7212e3c185431c79ff8c05c
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/psycopg2-
$(PKG_VERSION
)
22 PKG_BUILD_DEPENDS
:=python libpq python
/host
24 include $(INCLUDE_DIR
)/package.mk
25 $(call include_mk
, python-package.mk
)
27 define Package
/python-psycopg2
31 TITLE
:=PostgreSQL database adapter for Python
32 URL
:=http
://www.initd.org
/
33 DEPENDS
:=+python
+libpq
+python-egenix-mx-base
36 define Package
/python-psycopg2
/description
37 Psycopg is the most popular PostgreSQL adapter for the Python programming language
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
))
47 define Package
/python-psycopg2
/install
48 $(INSTALL_DIR
) $(1)$(PYTHON_PKG_DIR
)
50 $(PKG_INSTALL_DIR
)$(PYTHON_PKG_DIR
)/* \
54 $(eval
$(call PyPackage
,python-psycopg2
))
55 $(eval
$(call BuildPackage
,python-psycopg2
))