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.

224 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.43.08
  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:=c9f5b584a42493877ae0f09ed680d94e035ab389e8fa1873b1ec42118d5cfca3
  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-cgi-server \
  89. --disable-cplusplus \
  90. --disable-abyss-threads \
  91. --without-libwww-ssl
  92. ifeq ($(BUILD_VARIANT),libxml2)
  93. CONFIGURE_ARGS += \
  94. --enable-libxml2-backend
  95. endif
  96. ifeq ($(BUILD_VARIANT),internal)
  97. CONFIGURE_ARGS += \
  98. --disable-libxml2-backend
  99. endif
  100. define Build/Compile
  101. ( cd $(PKG_BUILD_DIR)/lib/expat/gennmtab && cc -I$(PKG_BUILD_DIR) -c gennmtab.c -o gennmtab.o && cc -o gennmtab gennmtab.o )
  102. $(call Build/Compile/Default)
  103. endef
  104. define Build/InstallDev
  105. $(INSTALL_DIR) \
  106. $(1)/usr/include \
  107. $(1)/usr/lib \
  108. $(1)/usr/bin \
  109. $(2)/bin
  110. $(CP) \
  111. $(PKG_INSTALL_DIR)/usr/include/* \
  112. $(1)/usr/include/
  113. $(CP) \
  114. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc*.{a,so*} \
  115. $(1)/usr/lib/
  116. $(INSTALL_BIN) \
  117. $(PKG_INSTALL_DIR)/usr/bin/xmlrpc-c-config \
  118. $(2)/bin/
  119. $(SED) \
  120. 's,HEADERINST_DIR="/usr/include",HEADERINST_DIR="$(STAGING_DIR)/usr/include",g' \
  121. $(2)/bin/xmlrpc-c-config
  122. $(SED) \
  123. 's,LIBINST_DIR="/usr/lib",LIBINST_DIR="$(STAGING_DIR)/usr/lib",g' \
  124. $(2)/bin/xmlrpc-c-config
  125. endef
  126. define Package/xmlrpc-c-libxml2/install
  127. $(INSTALL_DIR) \
  128. $(1)/usr/lib
  129. $(CP) \
  130. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc.so* \
  131. $(1)/usr/lib/
  132. endef
  133. define Package/xmlrpc-c-internal/install
  134. $(INSTALL_DIR) \
  135. $(1)/usr/lib
  136. $(CP) \
  137. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc.so* \
  138. $(1)/usr/lib/
  139. $(CP) \
  140. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_xmltok.so* \
  141. $(1)/usr/lib/
  142. $(CP) \
  143. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_xmlparse.so* \
  144. $(1)/usr/lib/
  145. endef
  146. define Package/xmlrpc-c-server/install
  147. $(INSTALL_DIR) \
  148. $(1)/usr/lib
  149. $(CP) \
  150. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_server.so* \
  151. $(1)/usr/lib/
  152. endef
  153. define Package/xmlrpc-c-abyss/install
  154. $(INSTALL_DIR) \
  155. $(1)/usr/lib
  156. $(CP) \
  157. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_abyss.so* \
  158. $(1)/usr/lib/
  159. endef
  160. define Package/xmlrpc-c-server-abyss/install
  161. $(INSTALL_DIR) \
  162. $(1)/usr/lib
  163. $(CP) \
  164. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_server_abyss.so* \
  165. $(1)/usr/lib/
  166. endef
  167. define Package/xmlrpc-c-client/install
  168. $(INSTALL_DIR) \
  169. $(1)/usr/lib
  170. $(CP) \
  171. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_client* \
  172. $(1)/usr/lib/
  173. endef
  174. define Package/xmlrpc-c-common/install
  175. $(INSTALL_DIR) \
  176. $(1)/usr/lib
  177. $(CP) \
  178. $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_util.so* \
  179. $(1)/usr/lib/
  180. endef
  181. define Package/xmlrpc-c/install
  182. true
  183. endef
  184. $(eval $(call BuildPackage,xmlrpc-c))
  185. $(eval $(call BuildPackage,xmlrpc-c-common))
  186. #$(eval $(call BuildPackage,xmlrpc-c-libxml2))
  187. $(eval $(call BuildPackage,xmlrpc-c-internal))
  188. $(eval $(call BuildPackage,xmlrpc-c-server))
  189. #$(eval $(call BuildPackage,xmlrpc-c-abyss))
  190. #$(eval $(call BuildPackage,xmlrpc-c-server-abyss))
  191. $(eval $(call BuildPackage,xmlrpc-c-client))