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.4.3/
17 PKG_MD5SUM
:=141c683447d5e76be1d2bd4829574f02
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/Python-
$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
28 TITLE
:=Python programming language
29 URL
:=http
://www.python.org
33 define Package
/python
/description
34 Python programming language
35 Python is a dynamic object-oriented programming language that
36 can be used for many kinds of software development. It offers
37 strong support for integration with other languages and tools
,
38 comes with extensive standard libraries
, and can be learned in a
39 few days. Many Python programmers report substantial productivity
40 gains and feel the language encourages the development of higher
41 quality
, more maintainable code.
44 define Build
/Configure
45 (cd
$(PKG_BUILD_DIR
); \
47 .
/configure
--with-threads
=no
; \
48 $(MAKE
) python Parser
/pgen
; \
49 mv python hostpython
; \
50 mv Parser
/pgen Parser
/hostpgen
; \
52 echo
"import sys" > $(PKG_BUILD_DIR
)/setup.py.new
; \
53 echo
"sys.path.append('$(PKG_BUILD_DIR)/Lib')" >> $(PKG_BUILD_DIR
)/setup.py.new
; \
54 cat
$(PKG_BUILD_DIR
)/setup.py.new
$(PKG_BUILD_DIR
)/setup.py
> $(PKG_BUILD_DIR
)/setup.py.foo
; \
55 mv
$(PKG_BUILD_DIR
)/setup.py.foo
$(PKG_BUILD_DIR
)/setup.py
; \
56 rm $(PKG_BUILD_DIR
)/setup.py.new
; \
58 $(call Build
/Configure
/Default
, \
62 HOSTPYTHON
=.
/hostpython \
63 HOSTPGEN
=.
/Parser
/hostpgen \
68 $(TARGET_CONFIGURE_OPTS
) \
69 CFLAGS
="$(TARGET_CFLAGS)" \
70 LD_LIBRARY_PATH
="$(LD_LIBRARY_PATH)" \
72 HOSTPYTHON
=.
/hostpython \
73 HOSTPGEN
=.
/Parser
/hostpgen
76 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
77 DESTDIR
="$(PKG_INSTALL_DIR)" \
82 define Build
/InstallDev
83 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/python2.4
$(STAGING_DIR
)/usr
/include/
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/python2.4
$(STAGING_DIR
)/usr
/lib
/
87 define Package
/python
/install
88 mkdir
-p
$(1)/usr
/{bin
,lib
}
89 $(CP
) $(PKG_INSTALL_DIR
)/usr
/{bin
,lib
} $(1)/usr
/
92 define Build
/UninstallDev
94 $(STAGING_DIR
)/usr
/{include,lib
}/python2.4
97 $(eval
$(call BuildPackage
,python
))