2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.16
16 PKG_MD5SUM:=431e7d4632163b93d1ee43cd071a389c
20 include $(INCLUDE_DIR)/package.mk
21 -include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
24 -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
25 -L$(STAGING_DIR)/usr/lib/libiconv/lib/
27 define Package/python-gobject
31 TITLE:=GLib bindings for python
32 URL:=http://www.pygtk.org/
33 DEPENDS:=+python-mini +glib2 +libffi
36 define Package/python-gobject/description
37 GLib bindings for python
40 define Build/Configure
41 $(call Build/Configure/Default, \
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include/pygtk-2.0/
49 $(PKG_INSTALL_DIR)/usr/include/pygtk-2.0/* \
50 $(1)/usr/include/pygtk-2.0/
52 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
54 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
55 $(1)/usr/lib/pkgconfig/
57 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
59 $(PKG_INSTALL_DIR)/usr/lib/*.{so,a,la} \
63 "s,^\(prefix\|exec_prefix\|datadir\)=,\1=$(STAGING_DIR),g" \
64 $(1)/usr/lib/pkgconfig/pygobject-2.0.pc
66 $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/codegen
68 $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/codegen/*.py \
69 $(1)/usr/share/pygobject/2.0/codegen
71 $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/defs
73 $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/defs/* \
74 $(1)/usr/share/pygobject/2.0/defs
76 $(INSTALL_DIR) $(2)/bin
78 $(PKG_INSTALL_DIR)/usr/bin/* \
82 "s,^\(prefix\|datadir\)=,\1=$(STAGING_DIR),g" \
83 $(2)/bin/pygobject-codegen-2.0
86 define Package/python-gobject/install
87 $(INSTALL_DIR) $(1)/usr/lib
89 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
92 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
94 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/*.{pth,py} \
95 $(1)$(PYTHON_PKG_DIR)/
97 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0
99 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.py \
100 $(1)$(PYTHON_PKG_DIR)/gtk-2.0/
102 $(foreach d,gobject gio glib, \
103 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \
105 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/$(d)/*.{py,so} \
106 $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \
110 $(eval $(call BuildPackage,python-gobject))