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