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