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.07
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
  12. PKG_SOURCE_URL:=@SF/xmlrpc-c/Xmlrpc-c%20Super%20Stable/$(PKG_VERSION)
  13. PKG_HASH:=84d20ae33f927582f821d61c0b9194aefbf1d7924590a13fa9da5ae1698aded9
  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) 's,PREFIX="/usr",PREFIX="$(STAGING_DIR)/usr",g' $(2)/bin/xmlrpc-c-config
  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))