fix up downloading in python packages
[openwrt/svn-archive/archive.git] / lang / twisted / Makefile
1 #
2 # Copyright (C) 2006 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:=twisted
12 PKG_VERSION:=2.5.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://tmrc.mit.edu/mirror/twisted/Twisted/2.5
17 PKG_MD5SUM:=56df2ae66db57932515a491c03bf514f
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/Twisted-$(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/twisted/default
29 SECTION:=lang
30 CATEGORY:=Languages
31 DEPENDS:=python-core
32 URL:=http://twistedmatrix.com/
33 endef
34
35 define Package/twisted/default/description
36 Twisted is a networking engine written in Python, supporting numerous
37 protocols. It contains a web server, numerous chat clients, chat servers,
38 mail servers, and more.
39 endef
40
41 define Package/twisted
42 $(call Package/twisted/default)
43 TITLE:=Python networking engine
44 DEPENDS+= +zope-interface
45 endef
46
47 define Package/twisted-conch
48 $(call Package/twisted/default)
49 TITLE:=Twisted - Conch
50 DEPENDS+= twisted
51 endef
52
53 define Package/twisted-lore
54 $(call Package/twisted/default)
55 TITLE:=Twisted - Lore
56 DEPENDS+= twisted
57 endef
58
59 define Package/twisted-mail
60 $(call Package/twisted/default)
61 TITLE:=Twisted - Mail
62 DEPENDS+= twisted
63 endef
64
65 define Package/twisted-names
66 $(call Package/twisted/default)
67 TITLE:=Twisted - Names
68 DEPENDS+= twisted
69 endef
70
71 define Package/twisted-news
72 $(call Package/twisted/default)
73 TITLE:=Twisted - News
74 DEPENDS+= twisted
75 endef
76
77 define Package/twisted-runner
78 $(call Package/twisted/default)
79 TITLE:=Twisted - Runner
80 DEPENDS+= twisted
81 endef
82
83 define Package/twisted-web
84 $(call Package/twisted/default)
85 TITLE:=Twisted - Web
86 DEPENDS+= twisted
87 endef
88
89 define Package/twisted-words
90 $(call Package/twisted/default)
91 TITLE:=Twisted - Words
92 DEPENDS+= twisted
93 endef
94
95 define Package/zope-interface
96 $(call Package/twisted/default)
97 TITLE:=Zope interface
98 endef
99
100 TWISTED_SUPPROJECTS:=core
101
102 ZOPE_IF_VER=3.3.0
103
104 ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-conch),)
105 TWISTED_SUBPROJECTS+=conch
106 endif
107 ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-lore),)
108 TWISTED_SUBPROJECTS+=lore
109 endif
110 ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-mail),)
111 TWISTED_SUBPROJECTS+=mail
112 endif
113 ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-names),)
114 TWISTED_SUBPROJECTS+=names
115 endif
116 ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-news),)
117 TWISTED_SUBPROJECTS+=news
118 endif
119 ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-runner),)
120 TWISTED_SUBPROJECTS+=runner
121 endif
122 ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-web),)
123 TWISTED_SUBPROJECTS+=web
124 endif
125 ifneq ($(SDK)$(CONFIG_PACKAGE_twisted-words),)
126 TWISTED_SUBPROJECTS+=words
127 endif
128
129
130 define Build/Configure
131 endef
132
133 define PyPackage/twisted/filespec
134 +|/usr/bin/mktap
135 +|/usr/bin/twistd
136 +|$(PYTHON_PKG_DIR)/twisted/application
137 +|$(PYTHON_PKG_DIR)/twisted/copyright.py
138 +|$(PYTHON_PKG_DIR)/twisted/cred
139 +|$(PYTHON_PKG_DIR)/twisted/enterprise
140 +|$(PYTHON_PKG_DIR)/twisted/im.py
141 +|$(PYTHON_PKG_DIR)/twisted/__init__.py
142 +|$(PYTHON_PKG_DIR)/twisted/internet
143 +|$(PYTHON_PKG_DIR)/twisted/manhole
144 +|$(PYTHON_PKG_DIR)/twisted/persisted
145 +|$(PYTHON_PKG_DIR)/twisted/plugin.py
146 +|$(PYTHON_PKG_DIR)/twisted/protocols
147 +|$(PYTHON_PKG_DIR)/twisted/python
148 +|$(PYTHON_PKG_DIR)/twisted/scripts
149 +|$(PYTHON_PKG_DIR)/twisted/spread
150 +|$(PYTHON_PKG_DIR)/twisted/tap
151 +|$(PYTHON_PKG_DIR)/twisted/trial
152 -|$(PYTHON_PKG_DIR)/twisted/trial/test
153 +|$(PYTHON_PKG_DIR)/twisted/_version.py
154 +|$(PYTHON_PKG_DIR)/twisted/plugins/dropin.cache
155 +|$(PYTHON_PKG_DIR)/twisted/plugins/__init__.py
156 +|$(PYTHON_PKG_DIR)/twisted/plugins/notestplugin.py
157 +|$(PYTHON_PKG_DIR)/twisted/plugins/testplugin.py
158 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_ftp.py
159 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_inet.py
160 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_manhole.py
161 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_portforward.py
162 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_reactors.py
163 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_socks.py
164 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_telnet.py
165 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_trial.py
166 endef
167
168 define PyPackage/twisted-conch/filespec
169 +|$(PYTHON_PKG_DIR)/twisted/conch
170 -|$(PYTHON_PKG_DIR)/twisted/conch/test
171 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_conch.py
172 endef
173
174 define PyPackage/twisted-lore/filespec
175 +|$(PYTHON_PKG_DIR)/twisted/lore
176 -|$(PYTHON_PKG_DIR)/twisted/lore/test
177 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_lore.py
178 endef
179
180 define PyPackage/twisted-mail/filespec
181 +|$(PYTHON_PKG_DIR)/twisted/mail
182 -|$(PYTHON_PKG_DIR)/twisted/mail/test
183 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_mail.py
184 endef
185
186 define PyPackage/twisted-names/filespec
187 +|$(PYTHON_PKG_DIR)/twisted/names
188 -|$(PYTHON_PKG_DIR)/twisted/names/test
189 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_names.py
190 endef
191
192 define PyPackage/twisted-news/filespec
193 +|$(PYTHON_PKG_DIR)/twisted/news
194 -|$(PYTHON_PKG_DIR)/twisted/news/test
195 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_news.py
196 endef
197
198 define PyPackage/twisted-runner/filespec
199 +|$(PYTHON_PKG_DIR)/twisted/runner
200 endef
201
202 define PyPackage/twisted-web/filespec
203 +|$(PYTHON_PKG_DIR)/twisted/web
204 -|$(PYTHON_PKG_DIR)/twisted/web/test
205 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_web.py
206 endef
207
208 define PyPackage/twisted-words/filespec
209 +|$(PYTHON_PKG_DIR)/twisted/words
210 -|$(PYTHON_PKG_DIR)/twisted/words/test
211 +|$(PYTHON_PKG_DIR)/twisted/plugins/twisted_words.py
212 endef
213
214 define PyPackage/zope-interface/filespec
215 +|$(PYTHON_PKG_DIR)/zope
216 -|$(PYTHON_PKG_DIR)/zope/interface/tests
217 endef
218
219 define Build/Compile
220 $(call Build/Compile/PyMod,., \
221 install --prefix="$(PKG_INSTALL_DIR)/usr" --no-compile, \
222 TWISTED_SUBPROJECTS="$(TWISTED_SUBPROJECTS)" \
223 )
224 $(call Build/Compile/PyMod,zope.interface-$(ZOPE_IF_VER), \
225 install --prefix="$(PKG_INSTALL_DIR)/usr" --no-compile, \
226 )
227 $(SED) 's,#!$(PYTHON),#!/usr/bin/python,' $(PKG_INSTALL_DIR)/usr/bin/*
228 endef
229
230 $(eval $(call PyPackage,twisted))
231 $(eval $(call PyPackage,twisted-conch))
232 $(eval $(call PyPackage,twisted-lore))
233 $(eval $(call PyPackage,twisted-mail))
234 $(eval $(call PyPackage,twisted-names))
235 $(eval $(call PyPackage,twisted-news))
236 $(eval $(call PyPackage,twisted-runner))
237 $(eval $(call PyPackage,twisted-web))
238 $(eval $(call PyPackage,twisted-words))
239 $(eval $(call PyPackage,zope-interface))
240
241 $(eval $(call BuildPackage,twisted))
242 $(eval $(call BuildPackage,twisted-conch))
243 $(eval $(call BuildPackage,twisted-lore))
244 $(eval $(call BuildPackage,twisted-mail))
245 $(eval $(call BuildPackage,twisted-names))
246 $(eval $(call BuildPackage,twisted-news))
247 $(eval $(call BuildPackage,twisted-runner))
248 $(eval $(call BuildPackage,twisted-web))
249 $(eval $(call BuildPackage,twisted-words))
250 $(eval $(call BuildPackage,zope-interface))