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.

77 lines
2.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:=libsearpc
  9. PKG_VERSION:=3.1.7
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  11. PKG_LICENSE:=GPL-3.0
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/haiwen/libsearpc.git
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_VERSION:=8998e7b2c5587f0b94c48db24e2952d08def5add
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. define Package/libsearpc
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=Seafile RPC Library
  25. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  26. URL:=http://seafile.com/
  27. DEPENDS:=+glib2 +jansson +python $(ICONV_DEPENDS)
  28. endef
  29. define Package/libsearpc/description
  30. Searpc is a simple C language RPC framework based on GObject system.
  31. Searpc handles the serialization/deserialization part of RPC,
  32. the transport part is left to users.
  33. endef
  34. CONFIGURE_ARGS += --enable-compile-demo=no \
  35. --disable-server-pkg
  36. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv
  37. include $(INCLUDE_DIR)/host-build.mk
  38. define Host/Configure
  39. endef
  40. define Host/Compile
  41. endef
  42. define Host/Install
  43. $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
  44. $(INSTALL_BIN) $(HOST_BUILD_DIR)/lib/searpc-codegen.py $(STAGING_DIR_HOST)/bin/
  45. endef
  46. $(eval $(call HostBuild))
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/{bin,include}
  49. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  51. $(CP) $(PKG_INSTALL_DIR)/usr/include/searpc* $(1)/usr/include/
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
  53. $(CP) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
  54. endef
  55. define Package/libsearpc/install
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(INSTALL_DIR) $(1)/usr/lib/python2.7/site-packages
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/pysearpc $(1)/usr/lib/python2.7/site-packages/
  60. endef
  61. $(eval $(call BuildPackage,libsearpc))