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.

90 lines
2.6 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.2.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/haiwen/libsearpc/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=c479d85e405674c3450eac040abe143af5a9fafe7f1b74926e2a05280ab5420e
  14. PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
  15. PKG_LICENSE:=Apache-2.0
  16. PKG_LICENSE_FILES:=LICENSE.txt
  17. PKG_FIXUP:=autoreconf
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. include ../../lang/python/python3-package.mk
  23. define Package/libsearpc
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=Seafile RPC Library
  27. URL:=https://seafile.com
  28. DEPENDS:=+glib2 +jansson $(ICONV_DEPENDS)
  29. endef
  30. define Package/libsearpc/description
  31. Searpc is a simple C language RPC framework based on GObject system.
  32. Searpc handles the serialization/deserialization part of RPC, the
  33. transport part is left to users.
  34. endef
  35. define Package/python3-searpc
  36. SECTION:=lang
  37. CATEGORY:=Languages
  38. SUBMENU:=Python
  39. TITLE:=Python bindings for Searpc
  40. DEPENDS:=+libsearpc +python3-light +python3-logging
  41. VARIANT:=python3
  42. endef
  43. define Package/python3-searpc/description
  44. $(call Package/libsearpc/description)
  45. This package contains the Python bindings for Searpc.
  46. endef
  47. CONFIGURE_ARGS += \
  48. --disable-compile-demo \
  49. --disable-server-pkg
  50. define Build/InstallDev
  51. $(INSTALL_DIR) $(1)/usr/{bin,include}
  52. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  54. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  55. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
  56. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
  57. endef
  58. define Package/libsearpc/install
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  61. endef
  62. define Py3Build/Compile
  63. rm -rf $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc
  64. $(INSTALL_DIR) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc
  65. $(INSTALL_DATA) $(PKG_BUILD_DIR)/pysearpc/*.py $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc/
  66. rm -f $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc/{pygencode,test_pysearpc}.py
  67. endef
  68. Py3Package/python3-searpc/install:=:
  69. $(eval $(call BuildPackage,libsearpc))
  70. $(eval $(call Py3Package,python3-searpc))
  71. $(eval $(call BuildPackage,python3-searpc))
  72. $(eval $(call BuildPackage,python3-searpc-src))