2 # Copyright (C) 2007-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.initd.org
/pub
/software
/psycopg
/
17 PKG_MD5SUM
:=a31f79f68d6d32898d6f24e11369a106
19 PKG_BUILD_DEPENDS
:=python
21 include $(INCLUDE_DIR
)/package.mk
22 -include $(if
$(DUMP
),,$(STAGING_DIR
)/mk
/python-package.mk
)
23 ifneq ($(MAKECMDGOALS
),download
)
24 $(if
$(DUMP
)$(Build
/Compile
/PyMod
),,$(error Python packaging code not found.
))
27 define Package
/python-psycopg
31 TITLE
:=PostgreSQL database adapter for Python
32 URL
:=http
://www.initd.org
/
33 DEPENDS
:=python-core
+libpq
+python-egenix-mx
36 define Package
/python-psycopg
/description
37 This package contains is a PostgreSQL database adapter for the Python
42 --with-python
="$(PYTHON)" \
43 --with-postgres-libraries
="$(STAGING_DIR)/usr/lib" \
44 --with-postgres-includes
="$(STAGING_DIR)/usr/include" \
45 --with-mxdatetime-includes
="$(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/DateTime/mxDateTime" \
48 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
49 OPT
="$(TARGET_CFLAGS)"
52 define PyPackage
/python-psycopg
/install
53 $(INSTALL_DIR
) $(1)$(PYTHON_PKG_DIR
)
54 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/psycopgmodule.so
$(1)$(PYTHON_PKG_DIR
)/
57 $(eval
$(call PyPackage
,python-psycopg
))
58 $(eval
$(call BuildPackage
,python-psycopg
))