You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

222 lines
5.3 KiB

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