fix up downloading in python packages
[openwrt/svn-archive/archive.git] / lang / egenix-mx / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=egenix-mx
12 PKG_VERSION:=2.0.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-base-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.egenix.com/files/python/
17 PKG_MD5SUM:=66841151728a06f92d0b8dd2ed317a29
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-base-$(PKG_VERSION)
20 PKG_BUILD_DEPENDS:=python
21
22 include $(INCLUDE_DIR)/package.mk
23 -include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
24 ifneq ($(MAKECMDGOALS),download)
25 $(if $(DUMP)$(Build/Compile/PyMod),,$(error Python packaging code not found.))
26 endif
27
28 define Package/python-egenix-mx
29 SECTION:=lang
30 CATEGORY:=Languages
31 DEPENDS:=python-core
32 TITLE:=Egenix mxBase
33 URL:=http://www.egenix.com/products/python/mxBase/
34 endef
35
36 define Package/python-egenix-mx/description
37 This package contains a set of base packages from Egenix required by other
38 python packages.
39 endef
40
41 define Build/Compile
42 $(call Build/Compile/PyMod,., \
43 build --build-lib="foo", \
44 BASECFLAGS="$(TARGET_CFLAGS)" \
45 OPT="" \
46 )
47 endef
48
49 define Build/InstallDev
50 mkdir -p $(1)$(PYTHON_PKG_DIR)/mx/BeeBase/mxBeeBase
51 $(CP) \
52 $(PKG_BUILD_DIR)/mx/BeeBase/mxBeeBase/mxh.h \
53 $(PKG_BUILD_DIR)/mx/BeeBase/mxBeeBase/btr.h \
54 $(PKG_BUILD_DIR)/mx/BeeBase/mxBeeBase/mxBeeBase.h \
55 $(1)$(PYTHON_PKG_DIR)/mx/BeeBase/mxBeeBase/
56 mkdir -p $(1)$(PYTHON_PKG_DIR)/mx/DateTime/mxDateTime
57 $(CP) \
58 $(PKG_BUILD_DIR)/mx/DateTime/mxDateTime/mxh.h \
59 $(PKG_BUILD_DIR)/mx/DateTime/mxDateTime/mxDateTime.h \
60 $(1)$(PYTHON_PKG_DIR)/mx/DateTime/mxDateTime/
61 mkdir -p $(1)$(PYTHON_PKG_DIR)/mx/Proxy/mxProxy
62 $(CP) \
63 $(PKG_BUILD_DIR)/mx/Proxy/mxProxy/mxh.h \
64 $(PKG_BUILD_DIR)/mx/Proxy/mxProxy/mxProxy.h \
65 $(1)$(PYTHON_PKG_DIR)/mx/Proxy/mxProxy/
66 mkdir -p $(1)$(PYTHON_PKG_DIR)/mx/Queue/mxQueue
67 $(CP) \
68 $(PKG_BUILD_DIR)/mx/Queue/mxQueue/mxh.h \
69 $(PKG_BUILD_DIR)/mx/Queue/mxQueue/mxQueue.h \
70 $(1)$(PYTHON_PKG_DIR)/mx/Queue/mxQueue/
71 mkdir -p $(1)$(PYTHON_PKG_DIR)/mx/TextTools/mxTextTools
72 $(CP) \
73 $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxh.h \
74 $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxbmse.h \
75 $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxte.h \
76 $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxTextTools.h \
77 $(1)$(PYTHON_PKG_DIR)/mx/TextTools/mxTextTools/
78 mkdir -p $(1)$(PYTHON_PKG_DIR)/mx/Tools/mxTools
79 $(CP) \
80 $(PKG_BUILD_DIR)/mx/Tools/mxTools/mxh.h \
81 $(PKG_BUILD_DIR)/mx/Tools/mxTools/mxTools.h \
82 $(1)$(PYTHON_PKG_DIR)/mx/Tools/mxTools/
83 endef
84
85 define Build/UninstallDev
86 rm -rf $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx
87 endef
88
89 define PyPackage/python-egenix-mx/install
90 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
91 $(CP) $(PKG_BUILD_DIR)/foo/mx $(1)$(PYTHON_PKG_DIR)/
92 ln -sf $(1)$(PYTHON_PKG_DIR)/mx/BeeBase/ExitFunctions.py \
93 $(1)$(PYTHON_PKG_DIR)/mx/Misc/
94 rm -rf $(1)$(PYTHON_PKG_DIR)/mx/*/Examples
95 endef
96
97 $(eval $(call PyPackage,python-egenix-mx))
98 $(eval $(call BuildPackage,python-egenix-mx))