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.

89 lines
2.5 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:=4
  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. PYTHON3_PKG_BUILD:=0
  24. include $(INCLUDE_DIR)/package.mk
  25. include $(INCLUDE_DIR)/nls.mk
  26. include ../../lang/python/python3-package.mk
  27. define Package/libsearpc
  28. SECTION:=libs
  29. CATEGORY:=Libraries
  30. TITLE:=Seafile RPC Library
  31. URL:=https://seafile.com
  32. DEPENDS:=+glib2 +jansson $(ICONV_DEPENDS)
  33. endef
  34. define Package/libsearpc/description
  35. Searpc is a simple C language RPC framework based on GObject system.
  36. Searpc handles the serialization/deserialization part of RPC, the
  37. transport part is left to users.
  38. endef
  39. define Package/python3-searpc
  40. SECTION:=lang
  41. CATEGORY:=Languages
  42. SUBMENU:=Python
  43. TITLE:=Python bindings for Searpc
  44. DEPENDS:=+libsearpc +python3-light +python3-logging
  45. endef
  46. define Package/python3-searpc/description
  47. $(call Package/libsearpc/description)
  48. This package contains Python bindings for Searpc.
  49. endef
  50. CONFIGURE_ARGS += \
  51. --disable-compile-demo \
  52. --disable-server-pkg
  53. CONFIGURE_VARS += \
  54. PYTHON="$(HOST_PYTHON3_BIN)"
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(1)/usr/{bin,include}
  57. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  59. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  60. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
  61. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
  62. endef
  63. define Package/libsearpc/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  66. endef
  67. Py3Package/python3-searpc/install:=:
  68. $(eval $(call BuildPackage,libsearpc))
  69. $(eval $(call Py3Package,python3-searpc))
  70. $(eval $(call BuildPackage,python3-searpc))
  71. $(eval $(call BuildPackage,python3-searpc-src))