Split python-gnome-desktop into python-rsvg and python-wnck.
[openwrt/svn-archive/archive.git] / lang / python-gnome-desktop2 / 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:=gnome-python-desktop
11 PKG_VERSION:=2.22.0
12 PKG_RELEASE:=1
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14 PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.22
15 PKG_MD5SUM:=504877a973f6abc0788283232cd703c
16 PKG_FIXUP:=libtool
17
18 include $(INCLUDE_DIR)/package.mk
19 include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
20
21 PKG_INSTALL=1
22
23 EXTRA_CFLAGS += \
24 -I$(STAGING_DIR)/usr/lib/libintl/include \
25 -I$(STAGING_DIR)/usr/lib/libiconv/include \
26 $(if CONFIG_PACKAGE_python-rsvg,-I$(STAGING_DIR)/usr/include/librsvg-2,) \
27 $(if CONFIG_PACKAGE_python-wnck,-I$(STAGING_DIR)/usr/include/libwnck-1.0,)
28
29 EXTRA_LDFLAGS += \
30 -L$(STAGING_DIR)/usr/lib/libintl/lib \
31 -L$(STAGING_DIR)/usr/lib/libiconv/lib
32
33 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_python-rsvg CONFIG_PACKAGE_python-wnck)
34
35 define Package/python-gnome-desktop/Default
36 SECTION:=lang
37 SUBMENU:=Python
38 CATEGORY:=Languages
39 TITLE:=$(1) python bindings
40 URL:=http://ftp.gnome.org/
41 DEPENDS:=python-core $(2)
42 endef
43
44 define Package/python-rsvg
45 $(call Package/python-gnome-desktop/Default,librsvg,+librsvg)
46 endef
47
48 define Package/python-wnck
49 $(call Package/python-gnome-desktop/Default,libwnck,+libwnck)
50 endef
51
52 define Build/Configure
53 $(call Build/Configure/Default, \
54 $(if, $(CONFIG_PACKGE_python-rsvg), --enable-rsvg, --disable-rsvg), \
55 $(if, $(CONFIG_PACKGE_python-wnck), --enable-wnck, --disable-wnck), \
56 )
57 endef
58
59 define Build/InstallDev
60 $(INSTALL_DIR) $(1)/usr/share/pygtk/2.0/defs
61 $(INSTALL_DATA) \
62 $(PKG_INSTALL_DIR)/usr/share/pygtk/2.0/defs/* \
63 $(1)/usr/share/pygtk/2.0/defs
64
65 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
66 $(INSTALL_DATA) \
67 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
68 $(1)/usr/lib/pkgconfig
69
70 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0
71 $(INSTALL_DATA) \
72 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/*.{so,la} \
73 $(1)$(PYTHON_PKG_DIR)/gtk-2.0
74 endef
75
76 define Package/python-gnome-desktop/install/Default
77 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/gtk-2.0
78 $(INSTALL_DATA) \
79 $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/gtk-2.0/$(2).{so,a} \
80 $(1)$(PYTHON_PKG_DIR)/gtk-2.0
81 endef
82
83 define Package/python-rsvg/install
84 $(call Package/python-gnome-desktop/install/Default,$(1),rsvg)
85 endef
86
87 define Package/python-wnck/install
88 $(call Package/python-gnome-desktop/install/Default,$(1),wnck)
89 endef
90
91 $(eval $(call BuildPackage,python-rsvg))
92 $(eval $(call BuildPackage,python-wnck))
93