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.

65 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2007-2017 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.0.8
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
  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:=12a01268825e9c7e17794c58c367e3b4db912ad9
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_MIRROR_HASH:=8ca4785c4d276afeac212a26a143b22e45b85cf196c1218e4630f6072a33f430
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. include ../../lang/python/python-package.mk
  23. define Package/libsearpc
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=Seafile RPC Library
  27. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  28. URL:=http://seafile.com/
  29. DEPENDS:=+glib2 +jansson +python $(ICONV_DEPENDS)
  30. endef
  31. define Package/libsearpc/description
  32. Searpc is a simple C language RPC framework based on GObject system.
  33. Searpc handles the serialization/deserialization part of RPC,
  34. the transport part is left to users.
  35. endef
  36. CONFIGURE_ARGS += --enable-compile-demo=no \
  37. --disable-server-pkg
  38. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv
  39. define Build/InstallDev
  40. $(INSTALL_DIR) $(1)/usr/{bin,include}
  41. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  43. $(CP) $(PKG_INSTALL_DIR)/usr/include/searpc* $(1)/usr/include/
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
  45. $(CP) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
  46. endef
  47. define Package/libsearpc/install
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  51. $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/pysearpc $(1)$(PYTHON_PKG_DIR)
  52. find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
  53. endef
  54. $(eval $(call BuildPackage,libsearpc))