From 504c2f2c988a771f88bb8fed92b0723c2bd271b6 Mon Sep 17 00:00:00 2001 From: Tim Yardley Date: Thu, 26 Apr 2007 16:53:39 +0000 Subject: [PATCH] psycopg 1.1.21 -- postgres wrapper for python, and datetime support SVN-Revision: 7056 --- libs/egenix-mx/Makefile | 113 ++++++++++++++++++++++++++++++++++++++++ libs/psycopg/Makefile | 45 ++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 libs/egenix-mx/Makefile create mode 100644 libs/psycopg/Makefile diff --git a/libs/egenix-mx/Makefile b/libs/egenix-mx/Makefile new file mode 100644 index 000000000..bcd51afaf --- /dev/null +++ b/libs/egenix-mx/Makefile @@ -0,0 +1,113 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=egenix-mx +PKG_VERSION:=2.0.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-base-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.egenix.com/files/python/ +PKG_MD5SUM:=66841151728a06f92d0b8dd2ed317a29 +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-base-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/egenix-mx + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+python + TITLE:=Egenix-mx + MAINTAINER:=jjones@pavlovmedia.com + DESCRIPTION:=\ + required library for psycopg (a PostgreSQL database adapter for the Python programming language). + URL=http://www.initd.org/ +endef + +define Build/Compile + cd $(PKG_BUILD_DIR); \ + CFLAGS='$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include' \ + LDFLAGS='$(TARGET_LDFLAGS)' \ + $(STAGING_DIR)/usr/bin/hostpython ./setup.py build \ + --build-lib=foo +endef + +MX_SOURCE=$(PKG_BUILD_DIR)/mx +MX_INSTALL_DIR=/usr/lib/python2.5/site-packages/mx +define Package/egenix-mx/install + # distutils insists on compiling, so we need to do an install by hand + $(INSTALL_DIR) $(1)/usr/lib/python2.5/site-packages + $(CP) -R $(PKG_BUILD_DIR)/foo/mx $(1)/usr/lib/python2.5/site-packages + $(CP) $(1)$(MX_INSTALL_DIR)/BeeBase/ExitFunctions.py \ + $(1)$(MX_INSTALL_DIR)/Misc/ExitFunctions.py + + $(CP) \ + $(MX_SOURCE)/BeeBase/mxBeeBase/btr.h \ + $(MX_SOURCE)/BeeBase/mxBeeBase/mxBeeBase.h \ + $(MX_SOURCE)/BeeBase/mxBeeBase/mxh.h \ + $(1)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase/ + $(CP) \ + $(MX_SOURCE)/DateTime/mxDateTime/mxDateTime.h \ + $(MX_SOURCE)/DateTime/mxDateTime/mxh.h \ + $(1)$(MX_INSTALL_DIR)/DateTime/mxDateTime/ + $(CP) \ + $(MX_SOURCE)/Proxy/mxProxy/mxh.h \ + $(MX_SOURCE)/Proxy/mxProxy/mxProxy.h \ + $(1)$(MX_INSTALL_DIR)/Proxy/mxProxy/ + $(CP) \ + $(MX_SOURCE)/Queue/mxQueue/mxh.h \ + $(MX_SOURCE)/Queue/mxQueue/mxQueue.h \ + $(1)$(MX_INSTALL_DIR)/Queue/mxQueue/ + $(CP) \ + $(MX_SOURCE)/TextTools/mxTextTools/mxbmse.h \ + $(MX_SOURCE)/TextTools/mxTextTools/mxh.h \ + $(MX_SOURCE)/TextTools/mxTextTools/mxte.h \ + $(MX_SOURCE)/TextTools/mxTextTools/mxTextTools.h \ + $(1)$(MX_INSTALL_DIR)/TextTools/mxTextTools/ + $(CP) \ + $(MX_SOURCE)/Tools/mxTools/mxh.h \ + $(MX_SOURCE)/Tools/mxTools/mxTools.h \ + $(1)$(MX_INSTALL_DIR)/Tools/mxTools/ + + chmod -R a+r $(1) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase + $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/DateTime/mxDateTime + $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Proxy/mxProxy + $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Queue/mxQueue + $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/TextTools/mxTextTools + $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Tools/mxTools + + $(CP) \ + $(MX_SOURCE)/BeeBase/mxBeeBase/btr.h \ + $(MX_SOURCE)/BeeBase/mxBeeBase/mxBeeBase.h \ + $(MX_SOURCE)/BeeBase/mxBeeBase/mxh.h \ + $(STAGING_DIR)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase/ + $(CP) \ + $(MX_SOURCE)/DateTime/mxDateTime/mxDateTime.h \ + $(MX_SOURCE)/DateTime/mxDateTime/mxh.h \ + $(STAGING_DIR)$(MX_INSTALL_DIR)/DateTime/mxDateTime/ + $(CP) \ + $(MX_SOURCE)/Proxy/mxProxy/mxh.h \ + $(MX_SOURCE)/Proxy/mxProxy/mxProxy.h \ + $(STAGING_DIR)$(MX_INSTALL_DIR)/Proxy/mxProxy/ + $(CP) \ + $(MX_SOURCE)/Queue/mxQueue/mxh.h \ + $(MX_SOURCE)/Queue/mxQueue/mxQueue.h \ + $(STAGING_DIR)$(MX_INSTALL_DIR)/Queue/mxQueue/ + $(CP) \ + $(MX_SOURCE)/TextTools/mxTextTools/mxbmse.h \ + $(MX_SOURCE)/TextTools/mxTextTools/mxh.h \ + $(MX_SOURCE)/TextTools/mxTextTools/mxte.h \ + $(MX_SOURCE)/TextTools/mxTextTools/mxTextTools.h \ + $(STAGING_DIR)$(MX_INSTALL_DIR)/TextTools/mxTextTools/ + $(CP) \ + $(MX_SOURCE)/Tools/mxTools/mxh.h \ + $(MX_SOURCE)/Tools/mxTools/mxTools.h \ + $(STAGING_DIR)$(MX_INSTALL_DIR)/Tools/mxTools/ +endef + +$(eval $(call BuildPackage,egenix-mx)) diff --git a/libs/psycopg/Makefile b/libs/psycopg/Makefile new file mode 100644 index 000000000..ddbdab5e1 --- /dev/null +++ b/libs/psycopg/Makefile @@ -0,0 +1,45 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=psycopg +PKG_VERSION:=1.1.21 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.initd.org/pub/software/psycopg/ +PKG_MD5SUM:=a31f79f68d6d32898d6f24e11369a106 +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/psycopg + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libpq +python +egenix-mx + TITLE:=Psycopg + MAINTAINER:=jjones@pavlovmedia.com + DESCRIPTION:=\ + psycopg is a PostgreSQL database adapter for the Python programming language. + URL=http://www.initd.org/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Build/Configure + $(call Build/Configure/Default, \ + --with-python=$(STAGING_DIR)/usr/bin/hostpython \ + --with-postgres-libraries=$(STAGING_DIR)/usr/lib \ + --with-postgres-includes=$(STAGING_DIR)/usr/include \ + --with-mxdatetime-includes=$(STAGING_DIR)/usr/lib/python2.5/site-packages/mx/DateTime/mxDateTime ) +endef + +define Package/psycopg/install + $(INSTALL_DIR) $(1)/usr/lib/python2.5/site-packages + $(INSTALL_BIN) $(PKG_BUILD_DIR)/psycopgmodule.so $(1)/usr/lib/python2.5/site-packages +endef + +$(eval $(call BuildPackage,psycopg)) -- 2.30.2