egenix-mx: fix cflags
[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 BASECFLAGS='$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include' \
31 CFLAGS='$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include' \
32 LDFLAGS='$(TARGET_LDFLAGS)' \
33 $(STAGING_DIR)/usr/bin/hostpython ./setup.py build \
34 --build-lib=foo
35 endef
36
37 MX_SOURCE=$(PKG_BUILD_DIR)/mx
38 MX_INSTALL_DIR=/usr/lib/python2.5/site-packages/mx
39 define Package/egenix-mx/install
40 # distutils insists on compiling, so we need to do an install by hand
41 $(INSTALL_DIR) $(1)/usr/lib/python2.5/site-packages
42 $(CP) -R $(PKG_BUILD_DIR)/foo/mx $(1)/usr/lib/python2.5/site-packages
43 $(CP) $(1)$(MX_INSTALL_DIR)/BeeBase/ExitFunctions.py \
44 $(1)$(MX_INSTALL_DIR)/Misc/ExitFunctions.py
45
46 $(CP) \
47 $(MX_SOURCE)/BeeBase/mxBeeBase/btr.h \
48 $(MX_SOURCE)/BeeBase/mxBeeBase/mxBeeBase.h \
49 $(MX_SOURCE)/BeeBase/mxBeeBase/mxh.h \
50 $(1)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase/
51 $(CP) \
52 $(MX_SOURCE)/DateTime/mxDateTime/mxDateTime.h \
53 $(MX_SOURCE)/DateTime/mxDateTime/mxh.h \
54 $(1)$(MX_INSTALL_DIR)/DateTime/mxDateTime/
55 $(CP) \
56 $(MX_SOURCE)/Proxy/mxProxy/mxh.h \
57 $(MX_SOURCE)/Proxy/mxProxy/mxProxy.h \
58 $(1)$(MX_INSTALL_DIR)/Proxy/mxProxy/
59 $(CP) \
60 $(MX_SOURCE)/Queue/mxQueue/mxh.h \
61 $(MX_SOURCE)/Queue/mxQueue/mxQueue.h \
62 $(1)$(MX_INSTALL_DIR)/Queue/mxQueue/
63 $(CP) \
64 $(MX_SOURCE)/TextTools/mxTextTools/mxbmse.h \
65 $(MX_SOURCE)/TextTools/mxTextTools/mxh.h \
66 $(MX_SOURCE)/TextTools/mxTextTools/mxte.h \
67 $(MX_SOURCE)/TextTools/mxTextTools/mxTextTools.h \
68 $(1)$(MX_INSTALL_DIR)/TextTools/mxTextTools/
69 $(CP) \
70 $(MX_SOURCE)/Tools/mxTools/mxh.h \
71 $(MX_SOURCE)/Tools/mxTools/mxTools.h \
72 $(1)$(MX_INSTALL_DIR)/Tools/mxTools/
73
74 chmod -R a+r $(1)
75 endef
76
77 define Build/InstallDev
78 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase
79 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/DateTime/mxDateTime
80 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Proxy/mxProxy
81 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Queue/mxQueue
82 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/TextTools/mxTextTools
83 $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Tools/mxTools
84
85 $(CP) \
86 $(MX_SOURCE)/BeeBase/mxBeeBase/btr.h \
87 $(MX_SOURCE)/BeeBase/mxBeeBase/mxBeeBase.h \
88 $(MX_SOURCE)/BeeBase/mxBeeBase/mxh.h \
89 $(STAGING_DIR)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase/
90 $(CP) \
91 $(MX_SOURCE)/DateTime/mxDateTime/mxDateTime.h \
92 $(MX_SOURCE)/DateTime/mxDateTime/mxh.h \
93 $(STAGING_DIR)$(MX_INSTALL_DIR)/DateTime/mxDateTime/
94 $(CP) \
95 $(MX_SOURCE)/Proxy/mxProxy/mxh.h \
96 $(MX_SOURCE)/Proxy/mxProxy/mxProxy.h \
97 $(STAGING_DIR)$(MX_INSTALL_DIR)/Proxy/mxProxy/
98 $(CP) \
99 $(MX_SOURCE)/Queue/mxQueue/mxh.h \
100 $(MX_SOURCE)/Queue/mxQueue/mxQueue.h \
101 $(STAGING_DIR)$(MX_INSTALL_DIR)/Queue/mxQueue/
102 $(CP) \
103 $(MX_SOURCE)/TextTools/mxTextTools/mxbmse.h \
104 $(MX_SOURCE)/TextTools/mxTextTools/mxh.h \
105 $(MX_SOURCE)/TextTools/mxTextTools/mxte.h \
106 $(MX_SOURCE)/TextTools/mxTextTools/mxTextTools.h \
107 $(STAGING_DIR)$(MX_INSTALL_DIR)/TextTools/mxTextTools/
108 $(CP) \
109 $(MX_SOURCE)/Tools/mxTools/mxh.h \
110 $(MX_SOURCE)/Tools/mxTools/mxTools.h \
111 $(STAGING_DIR)$(MX_INSTALL_DIR)/Tools/mxTools/
112 endef
113
114 $(eval $(call BuildPackage,egenix-mx))