[packages] xmlrpc-c: package is not safe for parallel build
[openwrt/svn-archive/archive.git] / libs / xmlrpc-c / Makefile
1 #
2 # Copyright (C) 2007-2010 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:=xmlrpc-c
11 PKG_REV:=2042
12 PKG_VERSION:=1.24.4_r$(PKG_REV)
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_PROTO:=svn
20
21 PKG_FIXUP:=libtool
22 PKG_INSTALL:=1
23 PKG_BUILD_PARALLEL:=0
24
25 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/xmlrpc-c_common
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=XML-RPC library - common
33 URL:=http://xmlrpc-c.sourceforge.net/
34 endef
35
36 define Package/xmlrpc-c_internal
37 SECTION:=libs
38 CATEGORY:=Libraries
39 TITLE:=XML-RPC library - (ueses internal expat variant)
40 URL:=http://xmlrpc-c.sourceforge.net/
41 DEPENDS:=+xmlrpc-c_common
42 # PROVIDES:=xmlrpc-c
43 VARIANT:=internal
44 endef
45
46 define Package/xmlrpc-c
47 SECTION:=libs
48 CATEGORY:=Libraries
49 TITLE:=XML-RPC library
50 URL:=http://xmlrpc-c.sourceforge.net/
51 DEPENDS:=+xmlrpc-c_internal
52 endef
53
54 define Package/xmlrpc-c_libxml2
55 SECTION:=libs
56 CATEGORY:=Libraries
57 TITLE:=XML-RPC library - (uses libxml2)
58 URL:=http://xmlrpc-c.sourceforge.net/
59 DEPENDS:=+xmlrpc-c_common +libxml2 @BROKEN
60 # PROVIDES:=xmlrpc-c
61 VARIANT:=libxml2
62 endef
63
64 define Package/xmlrpc-c_client
65 SECTION:=libs
66 CATEGORY:=Libraries
67 TITLE:=XML-RPC library - client
68 URL:=http://xmlrpc-c.sourceforge.net/
69 DEPENDS:=+xmlrpc-c +libcurl
70 endef
71
72 define Package/xmlrpc-c_server
73 SECTION:=libs
74 CATEGORY:=Libraries
75 TITLE:=XML-RPC library - server
76 URL:=http://xmlrpc-c.sourceforge.net/
77 DEPENDS:=+xmlrpc-c
78 endef
79
80 define Package/xmlrpc-c_abyss
81 SECTION:=libs
82 CATEGORY:=Libraries
83 TITLE:=XML-RPC library - abyss
84 URL:=http://xmlrpc-c.sourceforge.net/
85 DEPENDS:=+xmlrpc-c_common
86 endef
87
88 define Package/xmlrpc-c_server-abyss
89 SECTION:=libs
90 CATEGORY:=Libraries
91 TITLE:=XML-RPC library - abyss server
92 URL:=http://xmlrpc-c.sourceforge.net/
93 DEPENDS:=+xmlrpc-c_server +xmlrpc-c_abyss
94 endef
95
96 define Package/xmlrpc-c/description/Default
97 Programming library for writing an XML-RPC server or client in C or C++.
98 XML-RPC is a standard network protocol to allow a client program to make
99 a simple remote procedure call (RPC) type request of a server.
100 endef
101
102 Package/xmlrpc-c_common/description = $(Package/xmlrpc-c/description/Default)
103 Package/xmlrpc-c_libxml2/description = $(Package/xmlrpc-c/description/Default)
104 Package/xmlrpc-c_internal/description = $(Package/xmlrpc-c/description/Default)
105
106 Package/xmlrpc-c_libxml2/description += Uses external libxml2 library (quite big)
107 Package/xmlrpc-c_internal/description += Uses internal expat variant (stripped down)
108
109 CONFIGURE_ARGS+= \
110 --disable-wininet-client \
111 --disable-libwww-client \
112 --enable-abyss-server \
113 --disable-cplusplus \
114 --disable-static \
115 --disable-abyss-threads \
116 --disable-cgi-server
117
118 ifeq ($(BUILD_VARIANT),libxml2)
119 CONFIGURE_ARGS += \
120 --enable-libxml2-backend
121 endif
122
123 ifeq ($(BUILD_VARIANT),internal)
124 CONFIGURE_ARGS += \
125 --disable-libxml2-backend
126 endif
127
128 define Build/Compile
129 ( cd $(PKG_BUILD_DIR)/lib/expat/gennmtab && cc -I$(PKG_BUILD_DIR) -c gennmtab.c -o gennmtab.o && cc -o gennmtab gennmtab.o )
130 $(call Build/Compile/Default)
131 endef
132
133 define Build/InstallDev
134 $(INSTALL_DIR) \
135 $(1)/usr/include \
136 $(1)/usr/lib \
137 $(1)/usr/bin \
138 $(2)/bin
139
140 $(CP) \
141 $(PKG_INSTALL_DIR)/usr/include/* \
142 $(1)/usr/include/
143
144 $(CP) \
145 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc*.{a,so*} \
146 $(1)/usr/lib/
147
148 $(INSTALL_BIN) \
149 $(PKG_INSTALL_DIR)/usr/bin/xmlrpc-c-config \
150 $(2)/bin/
151
152 $(SED) \
153 's,HEADERINST_DIR="/usr/include",HEADERINST_DIR="$(STAGING_DIR)/usr/include",g' \
154 $(2)/bin/xmlrpc-c-config
155
156 $(SED) \
157 's,LIBINST_DIR="/usr/lib",LIBINST_DIR="$(STAGING_DIR)/usr/lib",g' \
158 $(2)/bin/xmlrpc-c-config
159 endef
160
161 define Package/xmlrpc-c_libxml2/install
162 $(INSTALL_DIR) \
163 $(1)/usr/lib
164
165 $(CP) \
166 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc.so* \
167 $(1)/usr/lib/
168 endef
169
170 define Package/xmlrpc-c_internal/install
171 $(INSTALL_DIR) \
172 $(1)/usr/lib
173
174 $(CP) \
175 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc.so* \
176 $(1)/usr/lib/
177
178 $(CP) \
179 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_xmltok.so* \
180 $(1)/usr/lib/
181
182 $(CP) \
183 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_xmlparse.so* \
184 $(1)/usr/lib/
185 endef
186
187 define Package/xmlrpc-c_server/install
188 $(INSTALL_DIR) \
189 $(1)/usr/lib
190
191 $(CP) \
192 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_server.so* \
193 $(1)/usr/lib/
194 endef
195
196 define Package/xmlrpc-c_abyss/install
197 $(INSTALL_DIR) \
198 $(1)/usr/lib
199
200 $(CP) \
201 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_abyss.so* \
202 $(1)/usr/lib/
203 endef
204
205 define Package/xmlrpc-c_server-abyss/install
206 $(INSTALL_DIR) \
207 $(1)/usr/lib
208
209 $(CP) \
210 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_server_abyss.so* \
211 $(1)/usr/lib/
212 endef
213
214 define Package/xmlrpc-c_client/install
215 $(INSTALL_DIR) \
216 $(1)/usr/lib
217
218 $(CP) \
219 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_client* \
220 $(1)/usr/lib/
221 endef
222
223 define Package/xmlrpc-c_common/install
224 $(INSTALL_DIR) \
225 $(1)/usr/lib
226
227 $(CP) \
228 $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_util.so* \
229 $(1)/usr/lib/
230 endef
231
232
233 $(eval $(call BuildPackage,xmlrpc-c))
234 $(eval $(call BuildPackage,xmlrpc-c_common))
235 $(eval $(call BuildPackage,xmlrpc-c_libxml2))
236 $(eval $(call BuildPackage,xmlrpc-c_internal))
237 $(eval $(call BuildPackage,xmlrpc-c_server))
238 $(eval $(call BuildPackage,xmlrpc-c_abyss))
239 $(eval $(call BuildPackage,xmlrpc-c_server-abyss))
240 $(eval $(call BuildPackage,xmlrpc-c_client))