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
:=Python-
$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=http
://www.python.org
/ftp
/python
/$(PKG_VERSION
)/
17 PKG_MD5SUM
:=70084ffa561660f07de466c2c8c4842d
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/Python-
$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
26 _curses _curses_panel _tkinter nis
31 DEPENDS
:=+libexpat
+libopenssl
+libpthread
+libreadline
+uclibcxx
32 TITLE
:=Python
2.5 programming language
33 URL
:=http
://www.python.org
/
36 define Package
/python
/description
37 Python programming language
38 Python is a dynamic object-oriented programming language that
39 can be used for many kinds of software development. It offers
40 strong support for integration with other languages and tools
,
41 comes with extensive standard libraries
, and can be learned in a
42 few days. Many Python programmers report substantial productivity
43 gains and feel the language encourages the development of higher
44 quality
, more maintainable code.
47 define Build
/Configure
48 (cd
$(PKG_BUILD_DIR
); \
49 rm -rf config.cache
; \
51 .
/configure
--with-threads
=no
--with-cxx
=no
; \
52 $(MAKE
) python Parser
/pgen
; \
53 mv python hostpython
; \
54 mv Parser
/pgen Parser
/hostpgen
; \
57 $(call Build
/Configure
/Default
, \
63 HOSTPYTHON
=.
/hostpython \
64 HOSTPGEN
=.
/Parser
/hostpgen \
69 $(TARGET_CONFIGURE_OPTS
) \
70 PYTHON_MODULES_INCLUDE
=$(STAGING_DIR
)/include \
71 PYTHON_MODULES_LIB
=$(STAGING_DIR
)/lib \
72 PYTHON_DISABLE_MODULES
="$(PY_DISABLED_MODULES)" \
73 CFLAGS
="$(TARGET_CFLAGS) -fno-inline" \
74 LDFLAGS
="$(TARGET_LDFLAGS)" \
76 HOSTPYTHON
=.
/hostpython \
77 HOSTPGEN
=.
/Parser
/hostpgen
80 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
82 DESTDIR
="$(PKG_INSTALL_DIR)" \
83 EXTRA_CFLAGS
="$(TARGET_CFLAGS) -fno-inline" \
88 define Build
/InstallDev
89 mkdir
-p
$(STAGING_DIR
)/usr
/bin
90 $(CP
) $(PKG_BUILD_DIR
)/hostpython
$(STAGING_DIR
)/usr
/bin
/
91 mkdir
-p
$(STAGING_DIR
)/usr
/include
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/python2.5
$(STAGING_DIR
)/usr
/include/
93 mkdir
-p
$(STAGING_DIR
)/usr
/lib
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/python2.5
$(STAGING_DIR
)/usr
/lib
/
95 $(CP
) $(PKG_BUILD_DIR
)/libpython2.5.a
$(STAGING_DIR
)/usr
/lib
/python2.5
/
98 define Build
/UninstallDev
99 rm -rf
$(STAGING_DIR
)/usr
/bin
/hostpython \
100 $(STAGING_DIR
)/usr
/include/python2.5 \
101 $(STAGING_DIR
)/usr
/lib
/python2.5
104 define Package
/python
/install
105 $(INSTALL_DIR
) $(1)/usr
/bin
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/python2.5
$(1)/usr
/bin
/
107 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/python
$(1)/usr
/bin
/
108 $(INSTALL_DIR
) $(1)/usr
/include/python2.5
109 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/python2.5
/Python.h
$(1)/usr
/include/python2.5
/
110 $(INSTALL_DIR
) $(1)/usr
/lib
111 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/python2.5
$(1)/usr
/lib
/
112 rm -rf
$(1)/usr
/lib
/python2.5
/bsddb
/test \
113 $(1)/usr
/lib
/python2.5
/distutils
/tests \
114 $(1)/usr
/lib
/python2.5
/email
/test \
115 $(1)/usr
/lib
/python2.5
/idlelib \
116 $(1)/usr
/lib
/python2.5
/lib-tk \
117 $(1)/usr
/lib
/python2.5
/sqlite3
/test \
118 $(1)/usr
/lib
/python2.5
/ctypes
/test \
119 $(1)/usr
/lib
/python2.5
/test
123 $(eval
$(call BuildPackage
,python
))