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.

223 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.39.12
  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:=d830f3264a832dfe09f629cc64036acfd08121692526d0fabe090f7ff881ce08
  14. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  15. PKG_LICENSE:=VARIOUS
  16. PKG_LICENSE_FILES:=doc/COPYING
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=0
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/xmlrpc-c/Default
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=XML-RPC library
  26. URL:=http://xmlrpc-c.sourceforge.net/
  27. endef
  28. define Package/xmlrpc-c-common
  29. $(call Package/xmlrpc-c/Default)
  30. TITLE+= - common
  31. DEPENDS+= +libpthread
  32. HIDDEN:=1
  33. endef
  34. define Package/xmlrpc-c-internal
  35. $(call Package/xmlrpc-c/Default)
  36. TITLE+= (uses internal expat variant)
  37. DEPENDS:=+xmlrpc-c-common
  38. # PROVIDES:=xmlrpc-c
  39. VARIANT:=internal
  40. HIDDEN:=1
  41. endef
  42. define Package/xmlrpc-c
  43. $(call Package/xmlrpc-c/Default)
  44. TITLE+= (uses internal expat variant)
  45. DEPENDS:=+xmlrpc-c-internal
  46. endef
  47. define Package/xmlrpc-c-libxml2
  48. $(call Package/xmlrpc-c/Default)
  49. TITLE+= (uses libxml2)
  50. DEPENDS:=+xmlrpc-c-common +libxml2 @BROKEN
  51. # PROVIDES:=xmlrpc-c
  52. VARIANT:=libxml2
  53. endef
  54. define Package/xmlrpc-c-client
  55. $(call Package/xmlrpc-c/Default)
  56. TITLE+= - client
  57. DEPENDS:=+xmlrpc-c +libcurl
  58. endef
  59. define Package/xmlrpc-c-server
  60. $(call Package/xmlrpc-c/Default)
  61. TITLE+= - server
  62. DEPENDS:=+xmlrpc-c
  63. endef
  64. define Package/xmlrpc-c-abyss
  65. $(call Package/xmlrpc-c/Default)
  66. TITLE+= - abyss
  67. DEPENDS:=+xmlrpc-c-common @BROKEN
  68. endef
  69. define Package/xmlrpc-c-server-abyss
  70. $(call Package/xmlrpc-c/Default)
  71. TITLE+= - abyss server
  72. DEPENDS:=+xmlrpc-c-server +xmlrpc-c-abyss
  73. endef
  74. define Package/xmlrpc-c/description/Default
  75. Programming library for writing an XML-RPC server or client in C or C++.
  76. XML-RPC is a standard network protocol to allow a client program to make
  77. a simple remote procedure call (RPC) type request of a server.
  78. endef
  79. Package/xmlrpc-c-common/description = $(Package/xmlrpc-c/description/Default)
  80. Package/xmlrpc-c-libxml2/description = $(Package/xmlrpc-c/description/Default)
  81. Package/xmlrpc-c-internal/description = $(Package/xmlrpc-c/description/Default)
  82. Package/xmlrpc-c-libxml2/description += Uses external libxml2 library (quite big)
  83. Package/xmlrpc-c-internal/description += Uses internal expat variant (stripped down)
  84. CONFIGURE_ARGS+= \
  85. --disable-wininet-client \
  86. --disable-libwww-client \
  87. --disable-abyss-server \
  88. --disable-cplusplus \
  89. --disable-abyss-threads \
  90. --disable-cgi-server
  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))