Makefile 5.3 KB

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