fwknop: init script improvements
[feed/packages.git] / libs / libxml2 / Makefile
1 #
2 # Copyright (C) 2006-2016 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:=libxml2
11 PKG_VERSION:=2.9.10
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://xmlsoft.org/sources/
16 PKG_HASH:=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
17
18 PKG_LICENSE:=MIT
19 PKG_LICENSE_FILES:=COPYING
20 PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2
21
22 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26 PKG_BUILD_PARALLEL:=0
27
28 include $(INCLUDE_DIR)/host-build.mk
29 include $(INCLUDE_DIR)/package.mk
30
31 define Package/libxml2
32 SECTION:=libs
33 CATEGORY:=Libraries
34 TITLE:=Gnome XML library
35 URL:=http://xmlsoft.org/
36 DEPENDS:=+libpthread +zlib
37 endef
38
39 define Package/libxml2/description
40 A library for manipulating XML and HTML resources.
41 endef
42
43 define Package/libxml2-dev
44 SECTION:=devel
45 CATEGORY:=Development
46 SUBMENU:=Libraries
47 TITLE:=Development files for libxml2
48 URL:=http://xmlsoft.org/
49 DEPENDS:=+libxml2
50 endef
51
52 define Package/libxml2-dev/description
53 A library for manipulating XML and HTML resources.
54
55 This package contains the headers and xml2-config binary.
56 endef
57
58 define Package/libxml2-utils
59 SECTION:=utils
60 CATEGORY:=Utilities
61 TITLE:=XML command line utilities (xmllint...)
62 URL:=http://xmlsoft.org/
63 DEPENDS:=+libxml2
64 endef
65
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.
69 endef
70
71 TARGET_CFLAGS += $(FPIC)
72
73 CONFIGURE_ARGS += \
74 --enable-shared \
75 --enable-static \
76 --with-c14n \
77 --without-catalog \
78 --with-debug \
79 --without-docbook \
80 --with-html \
81 --without-ftp \
82 --without-http \
83 --without-iconv \
84 --without-iso8859x \
85 --without-legacy \
86 --with-output \
87 --without-pattern \
88 --without-push \
89 --without-python \
90 --with-reader \
91 --without-readline \
92 --without-regexps \
93 --with-sax1 \
94 --with-schemas \
95 --with-threads \
96 --with-tree \
97 --with-valid \
98 --with-writer \
99 --with-xinclude \
100 --with-xpath \
101 --with-xptr \
102 --with-zlib=$(STAGING_DIR)/usr \
103 --without-lzma
104
105 HOST_CONFIGURE_ARGS += \
106 --enable-shared \
107 --enable-static \
108 --with-c14n \
109 --without-catalog \
110 --with-debug \
111 --without-docbook \
112 --with-html \
113 --without-ftp \
114 --without-http \
115 --without-iconv \
116 --without-iso8859x \
117 --without-legacy \
118 --with-output \
119 --without-pattern \
120 --without-push \
121 --without-python \
122 --with-reader \
123 --without-readline \
124 --without-regexps \
125 --with-sax1 \
126 --with-schemas \
127 --with-threads \
128 --with-tree \
129 --with-valid \
130 --with-writer \
131 --with-xinclude \
132 --with-xpath \
133 --with-xptr \
134 --with-zlib \
135 --without-lzma
136
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
144
145 $(INSTALL_DIR) $(1)/usr/include
146 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
147
148 $(INSTALL_DIR) $(1)/usr/lib
149 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
150
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
154
155 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
156 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
157
158 $(INSTALL_DIR) $(2)/share/aclocal/
159 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
160 endef
161
162 define Host/Install
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
166 endef
167
168 define Package/libxml2/install
169 $(INSTALL_DIR) $(1)/usr/lib
170 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
171 endef
172
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
177
178 $(INSTALL_DIR) $(1)/usr/include/
179 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
180
181 $(INSTALL_DIR) $(1)/usr/lib
182 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
183
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
187
188 $(INSTALL_DIR) $(1)/usr/share/aclocal
189 $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
190 endef
191
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/
196 endef
197
198 $(eval $(call HostBuild))
199 $(eval $(call BuildPackage,libxml2))
200 $(eval $(call BuildPackage,libxml2-dev))
201 $(eval $(call BuildPackage,libxml2-utils))