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.

95 lines
2.9 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:=1
  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/python-package.mk
  23. include ../../lang/python/python3-package.mk
  24. define Package/libsearpc
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=Seafile RPC Library
  28. URL:=https://seafile.com
  29. DEPENDS:=+glib2 +jansson $(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, the
  34. transport part is left to users.
  35. endef
  36. define Package/python3-searpc
  37. SECTION:=lang
  38. CATEGORY:=Languages
  39. SUBMENU:=Python
  40. TITLE:=Python bindings for Searpc
  41. DEPENDS:=+libsearpc +python3-light +python3-logging
  42. VARIANT:=python3
  43. endef
  44. define Package/python3-searpc/description
  45. $(call Package/libsearpc/description)
  46. This package contains the Python bindings for Searpc.
  47. endef
  48. CONFIGURE_ARGS += \
  49. --disable-compile-demo \
  50. --disable-server-pkg
  51. define Build/InstallDev
  52. $(INSTALL_DIR) $(1)/usr/{bin,include}
  53. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  55. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  56. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
  57. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
  58. endef
  59. # Include Python 2 bindings in this package to maintain compatibility with previous versions
  60. define Package/libsearpc/install
  61. $(INSTALL_DIR) $(1)/usr/lib
  62. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/pysearpc
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  64. $(INSTALL_DATA) $(PKG_BUILD_DIR)/pysearpc/*.py $(1)$(PYTHON_PKG_DIR)/pysearpc/
  65. rm -f $(1)$(PYTHON_PKG_DIR)/pysearpc/{pygencode,test_pysearpc}.py
  66. endef
  67. define Py3Build/Compile
  68. rm -rf $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc
  69. $(INSTALL_DIR) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc
  70. $(INSTALL_DATA) $(PKG_BUILD_DIR)/pysearpc/*.py $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc/
  71. rm -f $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc/{pygencode,test_pysearpc}.py
  72. endef
  73. Py3Package/python3-searpc/install:=:
  74. $(eval $(call BuildPackage,libsearpc))
  75. $(eval $(call Py3Package,python3-searpc))
  76. $(eval $(call BuildPackage,python3-searpc))
  77. $(eval $(call BuildPackage,python3-searpc-src))