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
:=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
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 \
140 $(2)/bin
/$(GNU_TARGET_NAME
)-xml2-config
141 $(SED
) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
142 $(2)/bin
/$(GNU_TARGET_NAME
)-xml2-config
143 $(LN
) $(GNU_TARGET_NAME
)-xml2-config
$(2)/bin
/xml2-config
145 $(INSTALL_DIR
) $(1)/usr
/include
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libxml2
$(1)/usr
/include/
148 $(INSTALL_DIR
) $(1)/usr
/lib
149 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.
{la
,a
,so
*} $(1)/usr
/lib
/
151 $(INSTALL_DIR
) $(1)/usr
/lib
/cmake
/libxml2
152 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/cmake
/libxml2
/libxml2-config.cmake \
153 $(1)/usr
/lib
/cmake
/libxml2
155 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
156 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libxml-2.0.
pc $(1)/usr
/lib
/pkgconfig
/
158 $(INSTALL_DIR
) $(2)/share
/aclocal
/
159 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/* $(2)/share
/aclocal
163 $(call Host
/Install
/Default
)
164 mv
$(1)/bin
/xml2-config
$(1)/bin
/$(GNU_HOST_NAME
)-xml2-config
165 $(LN
) $(GNU_HOST_NAME
)-xml2-config
$(1)/bin
/xml2-config
168 define Package
/libxml2
/install
169 $(INSTALL_DIR
) $(1)/usr
/lib
170 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.so.
* $(1)/usr
/lib
/
173 define Package
/libxml2-dev
/install
174 $(INSTALL_DIR
) $(1)/usr
/bin
175 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/xml2-config
$(1)/usr
/bin
/
176 $(SED
) "s,$(STAGING_DIR),,g" $(1)/usr
/bin
/xml2-config
178 $(INSTALL_DIR
) $(1)/usr
/include/
179 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
181 $(INSTALL_DIR
) $(1)/usr
/lib
182 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.so
$(1)/usr
/lib
/
184 $(INSTALL_DIR
) $(1)/usr
/lib
/{cmake
,pkgconfig
}
185 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/{cmake
,pkgconfig
} $(1)/usr
/lib
/
186 $(SED
) "s,$(STAGING_DIR),,g" $(1)/usr
/lib
/pkgconfig
/*.
pc
188 $(INSTALL_DIR
) $(1)/usr
/share
/aclocal
189 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/aclocal
/* $(1)/usr
/share
/aclocal
192 define Package
/libxml2-utils
/install
193 $(INSTALL_DIR
) $(1)/usr
/bin
194 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/xmllint
$(1)/usr
/bin
/
195 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/xmlcatalog
$(1)/usr
/bin
/
198 $(eval
$(call HostBuild
))
199 $(eval
$(call BuildPackage
,libxml2
))
200 $(eval
$(call BuildPackage
,libxml2-dev
))
201 $(eval
$(call BuildPackage
,libxml2-utils
))