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.

66 lines
1.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.1.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:=cbd86d3c37b54ca2060ca537a07940fe3e98498abf345b2f3e1cec488230231a
  14. PKG_LICENSE:=GPL-3.0
  15. PKG_LICENSE_FILES:=LICENSE.txt
  16. PKG_FIXUP:=autoreconf
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. include ../../lang/python/python-package.mk
  22. define Package/libsearpc
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=Seafile RPC Library
  26. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  27. URL:=https://seafile.com
  28. DEPENDS:=+glib2 +jansson +python $(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,
  33. the transport part is left to users.
  34. endef
  35. CONFIGURE_ARGS += --enable-compile-demo=no \
  36. --disable-server-pkg
  37. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv
  38. define Build/InstallDev
  39. $(INSTALL_DIR) $(1)/usr/{bin,include}
  40. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  42. $(CP) $(PKG_INSTALL_DIR)/usr/include/searpc* $(1)/usr/include/
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
  44. $(CP) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
  45. endef
  46. define Package/libsearpc/install
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
  50. $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/pysearpc $(1)$(PYTHON_PKG_DIR)
  51. find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
  52. endef
  53. $(eval $(call BuildPackage,libsearpc))