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.

64 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2007-2016 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:=5.1.4
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
  11. PKG_LICENSE:=GPL-3.0
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/haiwen/libsearpc.git
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_VERSION:=8998e7b2c5587f0b94c48db24e2952d08def5add
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. $(call include_mk, 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:=http://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))