add & fix python modules
[openwrt/svn-archive/archive.git] / lang / pygtk / Makefile
1 #
2 # Copyright (C) 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pygtk
11 PKG_VERSION:=2.10.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.10/
16 PKG_FIXUP:=libtool
17
18 include $(INCLUDE_DIR)/package.mk
19
20 EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/pycairo/ -I$(STAGING_DIR)/usr/lib/libintl/include/ -I$(STAGING_DIR)/usr/lib/libiconv/include/
21
22 define Package/python-gtk
23 SUBMENU:=Python
24 SECTION:=lang
25 CATEGORY:=Languages
26 TITLE:=GTK bindings to python
27 URL:=http://www.pygtk.org/
28 DEPENDS:=python-core +python-gobject +gtk-2.10.14 +pycairo
29 endef
30
31 define Package/python-gtk/description
32 API to GTK and glade library from python
33 endef
34
35 define Build/Configure
36 (cd $(PKG_BUILD_DIR); \
37 if [ -x $(CONFIGURE_CMD) ]; then \
38 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
39 $(CONFIGURE_VARS) \
40 $(CONFIGURE_CMD) \
41 $(CONFIGURE_ARGS) ;\
42 fi \
43 )
44 endef
45
46 define Build/Compile
47 cd $(PKG_BUILD_DIR) ; PYTHON_HOST=/usr/bin/python DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) all install
48 endef
49
50 define Build/InstallDev
51 mkdir -p $(1)
52 cp -r $(PKG_INSTALL_DIR)/* $(1)
53 endef
54
55 define Package/python-gtk/install
56 mkdir -p $(1)
57 cp -r $(PKG_INSTALL_DIR)/* $(1)
58 endef
59
60 $(eval $(call BuildPackage,python-gtk))