correct the libdir path in libglib-2.0.la
[openwrt/svn-archive/archive.git] / libs / glib2 / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=glib2
12 PKG_VERSION:=2.12.12
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=glib-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.gtk.org/pub/glib/2.12/
17 PKG_MD5SUM:=6c6a61e4b08fb4b110ca7953f71c8b5e
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/glib2
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+libiconv +libintl
29 TITLE:=glib 2.0
30 DESCRIPTION:=The GLib library of C routines
31 URL:=http://www.gtk.org/
32 endef
33
34 define Build/Configure
35 $(call Build/Configure/Default, \
36 --enable-shared \
37 --enable-static \
38 LDFLAGS="-L$(STAGING_DIR)/usr/lib/libiconv/lib \
39 -L$(STAGING_DIR)/usr/lib/libintl/lib" \
40 CPPFLAGS="-I$(STAGING_DIR)/usr/lib/libiconv/include \
41 -I$(STAGING_DIR)/usr/lib/libintl/include" \
42 , \
43 glib_cv_stack_grows=no \
44 glib_cv_uscore=no \
45 )
46 endef
47
48 define Build/Compile
49 $(MAKE) -C $(PKG_BUILD_DIR)/glib \
50 DESTDIR="$(PKG_INSTALL_DIR)" \
51 all install
52 endef
53
54
55 define Build/InstallDev
56 mkdir -p $(STAGING_DIR)/usr/include
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/glib-2.0 $(STAGING_DIR)/usr/include/
58 $(CP) $(PKG_BUILD_DIR)/glibconfig.h $(STAGING_DIR)/usr/include/glib-2.0
59 mkdir -p $(STAGING_DIR)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg* $(STAGING_DIR)/usr/lib/
61 $(SED) "s,"libdir\=\'/usr/lib\'",libdir='$(STAGING_DIR)/usr/lib\'," $(STAGING_DIR)/usr/lib/libglib-2.0.la
62 endef
63
64 define Build/UninstallDev
65 rm -rf \
66 $(STAGING_DIR)/usr/include/glib-2.0 \
67 $(STAGING_DIR)/usr/lib/libg*
68 endef
69
70 define Package/glib2/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libg*.so* $(1)/usr/lib/
73 endef
74
75 $(eval $(call BuildPackage,glib2))