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