2 # Copyright (C) 2006-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://xmlsoft.org/sources/
16 PKG_HASH:=94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871
19 PKG_LICENSE_FILES:=COPYING
20 PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2
22 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
28 include $(INCLUDE_DIR)/host-build.mk
29 include $(INCLUDE_DIR)/package.mk
31 define Package/libxml2
34 TITLE:=Gnome XML library
35 URL:=http://xmlsoft.org/
36 DEPENDS:=+libpthread +zlib
39 define Package/libxml2/description
40 A library for manipulating XML and HTML resources.
43 define Package/libxml2-dev
47 TITLE:=Development files for libxml2
48 URL:=http://xmlsoft.org/
52 define Package/libxml2-dev/description
53 A library for manipulating XML and HTML resources.
55 This package contains the headers and xml2-config binary.
58 define Package/libxml2-utils
61 TITLE:=XML command line utilities (xmllint...)
62 URL:=http://xmlsoft.org/
66 define Package/libxml2-utils/description
67 This package contains the binaries xmllint and xmlcatalog
68 from libxml2, a library for manipulating XML and HTML resources.
71 TARGET_CFLAGS += $(FPIC)
102 --with-zlib=$(STAGING_DIR)/usr \
105 HOST_CONFIGURE_ARGS += \
137 define Build/InstallDev
138 $(INSTALL_DIR) $(2)/bin
139 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(2)/bin/
140 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/xml2-config
142 $(INSTALL_DIR) $(1)/usr/include
143 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
145 $(INSTALL_DIR) $(1)/usr/lib
146 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
148 $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
149 $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2/libxml2-config.cmake \
150 $(1)/usr/lib/cmake/libxml2
152 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
153 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
155 $(INSTALL_DIR) $(2)/share/aclocal/
156 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
159 define Package/libxml2/install
160 $(INSTALL_DIR) $(1)/usr/lib
161 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
164 define Package/libxml2-dev/install
165 $(INSTALL_DIR) $(1)/usr/bin
166 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
167 $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
169 $(INSTALL_DIR) $(1)/usr/include/
170 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
172 $(INSTALL_DIR) $(1)/usr/lib
173 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
175 $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
176 $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
177 $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
179 $(INSTALL_DIR) $(1)/usr/share/aclocal
180 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
183 define Package/libxml2-utils/install
184 $(INSTALL_DIR) $(1)/usr/bin
185 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
186 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
190 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(HOST_BUILD_DIR)/xml2-config
191 $(call Host/Install/Default)
194 $(eval $(call HostBuild))
195 $(eval $(call BuildPackage,libxml2))
196 $(eval $(call BuildPackage,libxml2-dev))
197 $(eval $(call BuildPackage,libxml2-utils))