2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
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
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/Twisted-
$(PKG_VERSION
)
22 include $(INCLUDE_DIR
)/package.mk
24 TWISTED_SUPPROJECTS
:=core
28 define Package
/twisted
/default
31 URL
:=http
://twistedmatrix.com
32 TITLE
:=A networking engine written in Python
34 Twisted is a networking engine written in Python
, supporting
\\\
35 numerous protocols. It contains a web server
, numerous chat
\\\
36 clients
, chat servers
, mail servers
, and more.
39 define Package
/twisted
40 $(call Package
/twisted
/default
)
41 DEPENDS
:=+python
+zope-interface
42 TITLE
:=A networking engine written in Python
44 Twisted is a networking engine written in Python
, supporting
\\\
45 numerous protocols. It contains a web server
, numerous chat
\\\
46 clients
, chat servers
, mail servers
, and more.
47 URL
:=http
://twistedmatrix.com
51 define Package
/zope-interface
52 $(call Package
/twisted
/default
)
54 DESCRIPTION
:=zope-interface
57 define Package
/twisted-conch
58 $(call Package
/twisted
/default
)
63 define Package
/twisted-lore
64 $(call Package
/twisted
/default
)
69 define Package
/twisted-mail
70 $(call Package
/twisted
/default
)
75 define Package
/twisted-names
76 $(call Package
/twisted
/default
)
81 define Package
/twisted-news
82 $(call Package
/twisted
/default
)
87 define Package
/twisted-runner
88 $(call Package
/twisted
/default
)
93 define Package
/twisted-web
94 $(call Package
/twisted
/default
)
99 define Package
/twisted-words
100 $(call Package
/twisted
/default
)
105 ifneq ($(CONFIG_PACKAGE_twisted-words
),)
106 TWISTED_SUBPROJECTS
+=words
108 ifneq ($(CONFIG_PACKAGE_twisted-conch
),)
109 TWISTED_SUBPROJECTS
+=conch
111 ifneq ($(CONFIG_PACKAGE_twisted-lore
),)
112 TWISTED_SUBPROJECTS
+=lore
114 ifneq ($(CONFIG_PACKAGE_twisted-mail
),)
115 TWISTED_SUBPROJECTS
+=mail
117 ifneq ($(CONFIG_PACKAGE_twisted-names
),)
118 TWISTED_SUBPROJECTS
+=names
120 ifneq ($(CONFIG_PACKAGE_twisted-news
),)
121 TWISTED_SUBPROJECTS
+=news
123 ifneq ($(CONFIG_PACKAGE_twisted-runner
),)
124 TWISTED_SUBPROJECTS
+=runner
126 ifneq ($(CONFIG_PACKAGE_twisted-web
),)
127 TWISTED_SUBPROJECTS
+=web
131 define Build
/Configure
136 cd
$(PKG_BUILD_DIR
)/zope.interface-
$(ZOPE_IF_VER
); \
137 $(STAGING_DIR
)/usr
/bin
/hostpython .
/setup.py \
138 install --prefix=$(PKG_INSTALL_DIR
)/usr
--no-compile
;
140 cd
$(PKG_BUILD_DIR
)/; \
141 TWISTED_SUBPROJECTS
="$(TWISTED_SUBPROJECTS)" \
142 PYTHONPATH
="$(PKG_INSTALL_DIR)/usr/lib/python2.5/site-packages" \
143 $(STAGING_DIR
)/usr
/bin
/hostpython \
144 .
/setup.py
install --prefix=$(PKG_INSTALL_DIR
)/usr
--no-compile
;
147 define Package
/zope-interface
/install
148 $(INSTALL_DIR
) $(1)/usr
/lib
/python2.5
/site-packages
149 $(CP
) -a
$(PKG_INSTALL_DIR
)/usr
/lib
/python2.5
/site-packages
/zope \
150 $(1)/usr
/lib
/python2.5
/site-packages
/
153 TWISTED_DIR
=/usr
/lib
/python2.5
/site-packages
/twisted
154 define Package
/twisted
/install
155 $(INSTALL_DIR
) $(1)/usr
/bin
156 $(SED
) 's@#!$(STAGING_DIR)/usr/bin/hostpython@#!/usr/bin/python@' $(PKG_INSTALL_DIR
)/usr
/bin
/mktap
157 $(SED
) 's@#!$(STAGING_DIR)/usr/bin/hostpython@#!/usr/bin/python@' $(PKG_INSTALL_DIR
)/usr
/bin
/twistd
159 $(PKG_INSTALL_DIR
)/usr
/bin
/mktap \
160 $(PKG_INSTALL_DIR
)/usr
/bin
/twistd \
162 $(INSTALL_DIR
) $(1)/usr
/lib
/python2.5
/site-packages
/twisted
/plugins
163 cd
$(PKG_INSTALL_DIR
)/usr
/lib
/python2.5
/site-packages
/twisted
; \
164 $(CP
) -a application copyright.py cred enterprise im.py __init__.py \
165 internet manhole persisted plugin.py protocols \
166 python scripts spread tap
test trial _version.py \
167 $(1)/usr
/lib
/python2.5
/site-packages
/twisted
169 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/dropin.cache \
170 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/__init__.py \
171 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/notestplugin.py \
172 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/testplugin.py \
173 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/twisted_ftp.py \
174 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/twisted_inet.py \
175 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/twisted_manhole.py \
176 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/twisted_portforward.py \
177 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/twisted_reactors.py \
178 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/twisted_socks.py \
179 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/twisted_telnet.py \
180 $(PKG_INSTALL_DIR
)/$(TWISTED_DIR
)/plugins
/twisted_trial.py \
181 $(1)/$(TWISTED_DIR
)/plugins
/
184 define BuildSubmodule
185 define Package
/$(1)/install
186 $(INSTALL_DIR
) $$(1)/usr
/lib
/python2.5
/site-packages
/twisted
/plugins
188 $(PKG_INSTALL_DIR
)/usr
/lib
/python2.5
/site-packages
/twisted
/$(2) \
189 $$(1)/usr
/lib
/python2.5
/site-packages
/twisted
/
190 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/python2.5
/site-packages
/twisted
/plugins
/twisted_
$(2).py
$$(1)/usr
/lib
/python2.5
/site-packages
/twisted
/plugins
/
193 $$(eval
$$(call BuildPackage
,$(1)))
196 define Package
/twisted-runner
/install
197 $(INSTALL_DIR
) $(1)/usr
/lib
/python2.5
/site-packages
/twisted
199 $(PKG_INSTALL_DIR
)/usr
/lib
/python2.5
/site-packages
/twisted
/runner
$(1)/usr
/lib
/python2.5
/site-packages
/twisted
/
202 $(eval
$(call BuildPackage
,zope-interface
))
203 $(eval
$(call BuildPackage
,twisted
))
204 $(eval
$(call BuildSubmodule
,twisted-words
,words))
205 $(eval
$(call BuildSubmodule
,twisted-conch
,conch
))
206 $(eval
$(call BuildSubmodule
,twisted-lore
,lore
))
207 $(eval
$(call BuildSubmodule
,twisted-mail
,mail
))
208 $(eval
$(call BuildSubmodule
,twisted-names
,names
))
209 $(eval
$(call BuildSubmodule
,twisted-news
,news
))
210 $(eval
$(call BuildPackage
,twisted-runner
))
211 $(eval
$(call BuildSubmodule
,twisted-web
,web
))