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.

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