|
@@ -0,0 +1,55 @@
|
|
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
|
+
|
|
8
|
+include $(TOPDIR)/rules.mk
|
|
9
|
+
|
|
10
|
+PKG_NAME:=python-psycopg2
|
|
11
|
+PKG_VERSION:=2.6.1
|
|
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:=842b44f8c95517ed5b792081a2370da1
|
|
20
|
+
|
|
21
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/psycopg2-$(PKG_VERSION)
|
|
22
|
+PKG_BUILD_DEPENDS:=python libpq python-setuptools
|
|
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
|
+ This package contains is a PostgreSQL database adapter for the Python
|
|
38
|
+ programming language.
|
|
39
|
+endef
|
|
40
|
+
|
|
41
|
+define Build/Compile
|
|
42
|
+ $(call Build/Compile/PyMod,.,build_py)
|
|
43
|
+ $(call Build/Compile/PyMod,,build_ext --pg-config="$(STAGING_DIR)/usr/bin/pg_config")
|
|
44
|
+ $(call Build/Compile/PyMod,.,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
|
|
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))
|