2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://xmlsoft.org/sources/ \
17 ftp://fr.rpmfind.net/pub/libxml/
18 PKG_MD5SUM:=8f0b3ce721bda11401e656b90ba4e78c
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24 include $(INCLUDE_DIR)/package.mk
27 define Package/libxml2
30 DEPENDS:=+libpthread +zlib
31 TITLE:=Gnome XML library
32 URL:=http://xmlsoft.org/
35 define Package/libxml2/description
36 A library for manipulating XML and HTML resources.
72 define Build/Configure
73 $(call Build/Configure/Default)
74 $(call libtool_disable_rpath)
78 $(MAKE) -C $(PKG_BUILD_DIR) all
79 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
80 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
83 define Build/InstallDev
84 mkdir -p $(STAGING_DIR)/usr/bin
85 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(STAGING_DIR)/usr/bin/
86 mkdir -p $(STAGING_DIR)/usr/include
87 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(STAGING_DIR)/usr/include/
88 mkdir -p $(STAGING_DIR)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{a,so*} $(STAGING_DIR)/usr/lib/
90 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/
92 $(SED) 's,-I$$$${includedir}/libxml2,-I$(STAGING_DIR)/usr/include/libxml2,g' $(STAGING_DIR)/usr/bin/xml2-config
93 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/bin/xml2-config
96 define Build/UninstallDev
97 rm -rf $(STAGING_DIR)/usr/bin/xml2-config \
98 $(STAGING_DIR)/usr/include/libxml2 \
99 $(STAGING_DIR)/usr/lib/libxml2.{a,so*} \
100 $(STAGING_DIR)/usr/lib/pkgconfig/libxml-2.0.pc
104 define Package/libxml2/install
105 $(INSTALL_DIR) $(1)/usr/lib
106 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
110 $(eval $(call BuildPackage,libxml2))