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
/2.5/
17 PKG_MD5SUM
:=ddb7401e711354ca83b7842b733825a3
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/Python-
$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 PY_DISABLED_MODULES
=readline pyexpat dbm gdbm bsddb \
26 _curses _curses_panel _tkinter nis zipfile
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 export PYTHON_DISABLE_SSL
=1
81 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
83 DESTDIR
="$(PKG_INSTALL_DIR)" \
84 EXTRA_CFLAGS
="$(TARGET_CFLAGS) -fno-inline" \
89 define Build
/InstallDev
90 mkdir
-p
$(STAGING_DIR
)/usr
/bin
91 $(CP
) $(PKG_BUILD_DIR
)/hostpython
$(STAGING_DIR
)/usr
/bin
/
92 mkdir
-p
$(STAGING_DIR
)/usr
/include
93 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/python2.5
$(STAGING_DIR
)/usr
/include/
94 mkdir
-p
$(STAGING_DIR
)/usr
/lib
95 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/python2.5
$(STAGING_DIR
)/usr
/lib
/
98 define Build
/UninstallDev
100 $(STAGING_DIR
)/usr
/{include,lib
}/python2.5
103 define Package
/python
/install
104 $(INSTALL_DIR
) $(1)/usr
/bin
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/python2.5
$(1)/usr
/bin
/
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/python
$(1)/usr
/bin
/
107 $(INSTALL_DIR
) $(1)/usr
/lib
108 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/python2.5
$(1)/usr
/lib
/
110 $(1)/usr
/lib
/python2.5
/bsddb
/test \
111 $(1)/usr
/lib
/python2.5
/distutils
/tests \
112 $(1)/usr
/lib
/python2.5
/email
/test \
113 $(1)/usr
/lib
/python2.5
/idlelib \
114 $(1)/usr
/lib
/python2.5
/lib-tk \
115 $(1)/usr
/lib
/python2.5
/test \
119 $(eval
$(call BuildPackage
,python
))