nuke $Id$ in /packages as well
[packages.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 -include $(if $(DUMP),,$(STAGING_DIR)/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 define Package/python-gobject
28   SUBMENU:=Python
29   SECTION:=lang
30   CATEGORY:=Languages
31   TITLE:=GLib bindings for python
32   URL:=http://www.pygtk.org/
33   DEPENDS:=+python-mini +glib2 +libffi
34 endef
35
36 define Package/python-gobject/description
37   GLib bindings for python
38 endef
39
40 define Build/Configure
41         $(call Build/Configure/Default, \
42                 --with-libffi \
43         )
44 endef
45
46 define Build/InstallDev
47         $(INSTALL_DIR) $(1)/usr/include/pygtk-2.0/
48         $(INSTALL_DATA) \
49                 $(PKG_INSTALL_DIR)/usr/include/pygtk-2.0/* \
50                 $(1)/usr/include/pygtk-2.0/
51
52         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
53         $(INSTALL_DATA) \
54                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
55                 $(1)/usr/lib/pkgconfig/
56
57         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
58         $(CP) \
59                 $(PKG_INSTALL_DIR)/usr/lib/*.{so,a,la} \
60                 $(1)/usr/lib/
61
62         $(SED) \
63                 "s,^\(prefix\|exec_prefix\|datadir\)=,\1=$(STAGING_DIR),g" \
64                 $(1)/usr/lib/pkgconfig/pygobject-2.0.pc
65
66         $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/codegen
67         $(INSTALL_DATA) \
68                 $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/codegen/*.py \
69                 $(1)/usr/share/pygobject/2.0/codegen
70
71         $(INSTALL_DIR) $(1)/usr/share/pygobject/2.0/defs
72         $(INSTALL_DATA) \
73                 $(PKG_INSTALL_DIR)/usr/share/pygobject/2.0/defs/* \
74                 $(1)/usr/share/pygobject/2.0/defs
75
76         $(INSTALL_DIR) $(2)/bin
77         $(INSTALL_BIN) \
78                 $(PKG_INSTALL_DIR)/usr/bin/* \
79                 $(2)/bin
80
81         $(SED) \
82                 "s,^\(prefix\|datadir\)=,\1=$(STAGING_DIR),g" \
83                 $(2)/bin/pygobject-codegen-2.0
84 endef
85
86 define Package/python-gobject/install
87         $(INSTALL_DIR) $(1)/usr/lib
88         $(CP) \
89                 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
90                 $(1)/usr/lib
91
92         $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
93         $(INSTALL_DATA) \
94                 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/*.{pth,py} \
95                 $(1)$(PYTHON_PKG_DIR)/
96
97         $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0
98         $(INSTALL_DATA) \
99                 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.py \
100                 $(1)$(PYTHON_PKG_DIR)/gtk-2.0/
101
102         $(foreach d,gobject gio glib, \
103                 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \
104                 $(INSTALL_DATA) \
105                         $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/$(d)/*.{py,so} \
106                         $(1)$(PYTHON_PKG_DIR)/gtk-2.0/$(d); \
107         )
108 endef
109
110 $(eval $(call BuildPackage,python-gobject))