7114325ca8ba5b040d5ae01dd4b7b784078fde07
[openwrt/svn-archive/archive.git] / lang / pygobject / 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:=pygobject
11 PKG_VERSION:=2.16.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.16
16 PKG_MD5SUM:=431e7d4632163b93d1ee43cd071a389c
17 PKG_FIXUP:=libtool
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21 $(call include_mk, python-package.mk)
22
23 EXTRA_LDFLAGS+= \
24 -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
25 -L$(STAGING_DIR)/usr/lib/libiconv/lib/
26
27 TARGET_CFLAGS += $(FPIC)
28
29 define Package/python-gobject
30 SUBMENU:=Python
31 SECTION:=lang
32 CATEGORY:=Languages
33 TITLE:=GLib bindings for python
34 URL:=http://www.pygtk.org/
35 DEPENDS:=+python-mini +glib2 +libffi
36 endef
37
38 define Package/python-gobject/description
39 GLib bindings for python
40 endef
41
42 define Build/Configure
43 $(call Build/Configure/Default, \
44 --with-libffi \
45 )
46 endef
47
48 define Build/InstallDev
49 $(INSTALL_DIR) $(1)/usr/include/pygtk-2.0/
50 $(INSTALL_DATA) \
51 $(PKG_INSTALL_DIR)/usr/include/pygtk-2.0/* \
52 $(1)/usr/include/pygtk-2.0/
53
54 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
55 $(INSTALL_DATA) \
56 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
57 $(1)/usr/lib/pkgconfig/
58
59 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
60 $(CP) \
61 $(PKG_INSTALL_DIR)/usr/lib/*.{so,a,la} \
62 $(1)/usr/lib/
63
64 $(SED) \
65 "s,^\(prefix\|exec_prefix\|datadir\)=,\1=$(STAGING_DIR),g" \
66 $(1)/usr/lib/pkgconfig/pygobject-2.0.pc
67
68 $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/codegen
69 $(INSTALL_DATA) \
70 $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/codegen/*.py \
71 $(1)/usr/share/pygobject/2.0/codegen
72
73 $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/defs
74 $(INSTALL_DATA) \
75 $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/defs/* \
76 $(1)/usr/share/pygobject/2.0/defs
77
78 $(INSTALL_DIR) $(2)/bin
79 $(INSTALL_BIN) \
80 $(PKG_INSTALL_DIR)/usr/bin/* \
81 $(2)/bin
82
83 $(SED) \
84 "s,^\(prefix\|datadir\)=,\1=$(STAGING_DIR),g" \
85 $(2)/bin/pygobject-codegen-2.0
86 endef
87
88 define Package/python-gobject/install
89 $(INSTALL_DIR) $(1)/usr/lib
90 $(CP) \
91 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
92 $(1)/usr/lib
93
94 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
95 $(INSTALL_DATA) \
96 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/*.{pth,py} \
97 $(1)$(PYTHON_PKG_DIR)/
98
99 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0
100 $(INSTALL_DATA) \
101 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.py \
102 $(1)$(PYTHON_PKG_DIR)/gtk-2.0/
103
104 $(foreach d,gobject gio glib, \
105 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \
106 $(INSTALL_DATA) \
107 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/$(d)/*.{py,so} \
108 $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \
109 )
110 endef
111
112 $(eval $(call BuildPackage,python-gobject))