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.

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