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.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://www.initd.org
/pub
/software
/psycopg
/
16 PKG_MD5SUM
:=a31f79f68d6d32898d6f24e11369a106
18 PKG_BUILD_DEPENDS
:=python
20 include $(INCLUDE_DIR
)/package.mk
21 $(call include_mk
, python-package.mk
)
23 define Package
/python-psycopg
27 TITLE
:=PostgreSQL database adapter for Python
28 URL
:=http
://www.initd.org
/
29 DEPENDS
:=+python-mini
+libpq
+python-egenix-mx
32 define Package
/python-psycopg
/description
33 This package contains is a PostgreSQL database adapter for the Python
38 --with-python
="$(PYTHON)" \
39 --with-postgres-libraries
="$(STAGING_DIR)/usr/lib" \
40 --with-postgres-includes
="$(STAGING_DIR)/usr/include" \
41 --with-mxdatetime-includes
="$(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/DateTime/mxDateTime" \
42 --with-python-prefix
=$(STAGING_DIR
)/usr
43 --with-python-exec-prefix
=$(STAGING_DIR
)/usr
46 $(if
$(Build
/Compile
/PyMod
),,@echo Python packaging code not found.
; false
)
47 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
48 OPT
="$(TARGET_CFLAGS)"
51 define PyPackage
/python-psycopg
/install
52 $(INSTALL_DIR
) $(1)$(PYTHON_PKG_DIR
)
53 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/psycopgmodule.so
$(1)$(PYTHON_PKG_DIR
)/
56 $(eval
$(call PyPackage
,python-psycopg
))
57 $(eval
$(call BuildPackage
,python-psycopg
))