psycopg 1.1.21 -- postgres wrapper for python, and datetime support
[openwrt/svn-archive/archive.git] / libs / egenix-mx / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=egenix-mx
4 PKG_VERSION:=2.0.6
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-base-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_URL:=http://www.egenix.com/files/python/
9 PKG_MD5SUM:=66841151728a06f92d0b8dd2ed317a29
10 PKG_CAT:=zcat
11
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-base-$(PKG_VERSION)
13 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define Package/egenix-mx
18 SECTION:=libs
19 CATEGORY:=Libraries
20 DEPENDS:=+python
21 TITLE:=Egenix-mx
22 MAINTAINER:=jjones@pavlovmedia.com
23 DESCRIPTION:=\
24 required library for psycopg (a PostgreSQL database adapter for the Python programming language).
25 URL=http://www.initd.org/
26 endef
27
28 define Build/Compile
29 cd $(PKG_BUILD_DIR); \
30 CFLAGS='$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include' \
31 LDFLAGS='$(TARGET_LDFLAGS)' \
32 $(STAGING_DIR)/usr/bin/hostpython ./setup.py build \
33 --build-lib=foo
34 endef
35
36 MX_SOURCE=$(PKG_BUILD_DIR)/mx
37 MX_INSTALL_DIR=/usr/lib/python2.5/site-packages/mx
38 define Package/egenix-mx/install
39 # distutils insists on compiling, so we need to do an install by hand
40 $(INSTALL_DIR) $(1)/usr/lib/python2.5/site-packages
41 $(CP) -R $(PKG_BUILD_DIR)/foo/mx $(1)/usr/lib/python2.5/site-packages
42 $(CP) $(1)$(MX_INSTALL_DIR)/BeeBase/ExitFunctions.py \
43 $(1)$(MX_INSTALL_DIR)/Misc/ExitFunctions.py
44
45 $(CP) \
46 $(MX_SOURCE)/BeeBase/mxBeeBase/btr.h \
47 $(MX_SOURCE)/BeeBase/mxBeeBase/mxBeeBase.h \
48 $(MX_SOURCE)/BeeBase/mxBeeBase/mxh.h \
49 $(1)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase/
50 $(CP) \
51 $(MX_SOURCE)/DateTime/mxDateTime/mxDateTime.h \
52 $(MX_SOURCE)/DateTime/mxDateTime/mxh.h \
53 $(1)$(MX_INSTALL_DIR)/DateTime/mxDateTime/
54 $(CP) \
55 $(MX_SOURCE)/Proxy/mxProxy/mxh.h \
56 $(MX_SOURCE)/Proxy/mxProxy/mxProxy.h \
57 $(1)$(MX_INSTALL_DIR)/Proxy/mxProxy/
58 $(CP) \
59 $(MX_SOURCE)/Queue/mxQueue/mxh.h \
60 $(MX_SOURCE)/Queue/mxQueue/mxQueue.h \
61 $(1)$(MX_INSTALL_DIR)/Queue/mxQueue/
62 $(CP) \
63 $(MX_SOURCE)/TextTools/mxTextTools/mxbmse.h \
64 $(MX_SOURCE)/TextTools/mxTextTools/mxh.h \
65 $(MX_SOURCE)/TextTools/mxTextTools/mxte.h \
66 $(MX_SOURCE)/TextTools/mxTextTools/mxTextTools.h \
67 $(1)$(MX_INSTALL_DIR)/TextTools/mxTextTools/
68 $(CP) \
69 $(MX_SOURCE)/Tools/mxTools/mxh.h \
70 $(MX_SOURCE)/Tools/mxTools/mxTools.h \
71 $(1)$(MX_INSTALL_DIR)/Tools/mxTools/
72
73 chmod -R a+r $(1)
74 endef
75
76 define Build/InstallDev
77 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase
78 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/DateTime/mxDateTime
79 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Proxy/mxProxy
80 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Queue/mxQueue
81 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/TextTools/mxTextTools
82 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Tools/mxTools
83
84 $(CP) \
85 $(MX_SOURCE)/BeeBase/mxBeeBase/btr.h \
86 $(MX_SOURCE)/BeeBase/mxBeeBase/mxBeeBase.h \
87 $(MX_SOURCE)/BeeBase/mxBeeBase/mxh.h \
88 $(STAGING_DIR)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase/
89 $(CP) \
90 $(MX_SOURCE)/DateTime/mxDateTime/mxDateTime.h \
91 $(MX_SOURCE)/DateTime/mxDateTime/mxh.h \
92 $(STAGING_DIR)$(MX_INSTALL_DIR)/DateTime/mxDateTime/
93 $(CP) \
94 $(MX_SOURCE)/Proxy/mxProxy/mxh.h \
95 $(MX_SOURCE)/Proxy/mxProxy/mxProxy.h \
96 $(STAGING_DIR)$(MX_INSTALL_DIR)/Proxy/mxProxy/
97 $(CP) \
98 $(MX_SOURCE)/Queue/mxQueue/mxh.h \
99 $(MX_SOURCE)/Queue/mxQueue/mxQueue.h \
100 $(STAGING_DIR)$(MX_INSTALL_DIR)/Queue/mxQueue/
101 $(CP) \
102 $(MX_SOURCE)/TextTools/mxTextTools/mxbmse.h \
103 $(MX_SOURCE)/TextTools/mxTextTools/mxh.h \
104 $(MX_SOURCE)/TextTools/mxTextTools/mxte.h \
105 $(MX_SOURCE)/TextTools/mxTextTools/mxTextTools.h \
106 $(STAGING_DIR)$(MX_INSTALL_DIR)/TextTools/mxTextTools/
107 $(CP) \
108 $(MX_SOURCE)/Tools/mxTools/mxh.h \
109 $(MX_SOURCE)/Tools/mxTools/mxTools.h \
110 $(STAGING_DIR)$(MX_INSTALL_DIR)/Tools/mxTools/
111 endef
112
113 $(eval $(call BuildPackage,egenix-mx))