mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
libsearpc: Update to 3.2.0, add Python 3 bindings package
This also moves the Python dependency from libsearpc to python3-searpc, and adds myself as a maintainer. Patches: * 001-fix-memory-leak-GH-48.patch: This is (at this time) the only difference between the tags v3.2.0 and v3.2-latest. * 002-no-future-import.patch: The future package is only needed for Python 2 compatibility; all of the functions/symbols it provides are available in Python 3. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
+51
-22
@@ -8,15 +8,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libsearpc
|
||||
PKG_VERSION:=3.1.0
|
||||
PKG_RELEASE=2
|
||||
PKG_VERSION:=3.2.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/haiwen/libsearpc/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=cbd86d3c37b54ca2060ca537a07940fe3e98498abf345b2f3e1cec488230231a
|
||||
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
|
||||
PKG_HASH:=c479d85e405674c3450eac040abe143af5a9fafe7f1b74926e2a05280ab5420e
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE.txt
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
@@ -26,41 +26,70 @@ PKG_INSTALL:=1
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
include ../../lang/python/python-package.mk
|
||||
include ../../lang/python/python3-package.mk
|
||||
|
||||
define Package/libsearpc
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Seafile RPC Library
|
||||
URL:=https://seafile.com
|
||||
DEPENDS:=+glib2 +jansson +python $(ICONV_DEPENDS)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Seafile RPC Library
|
||||
URL:=https://seafile.com
|
||||
DEPENDS:=+glib2 +jansson $(ICONV_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/libsearpc/description
|
||||
Searpc is a simple C language RPC framework based on GObject system.
|
||||
Searpc handles the serialization/deserialization part of RPC,
|
||||
the transport part is left to users.
|
||||
Searpc is a simple C language RPC framework based on GObject system.
|
||||
Searpc handles the serialization/deserialization part of RPC, the
|
||||
transport part is left to users.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += --enable-compile-demo=no \
|
||||
--disable-server-pkg
|
||||
define Package/python3-searpc
|
||||
SECTION:=lang
|
||||
CATEGORY:=Languages
|
||||
SUBMENU:=Python
|
||||
TITLE:=Python bindings for Searpc
|
||||
DEPENDS:=+libsearpc +python3-light +python3-logging
|
||||
VARIANT:=python3
|
||||
endef
|
||||
|
||||
TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv
|
||||
define Package/python3-searpc/description
|
||||
$(call Package/libsearpc/description)
|
||||
|
||||
This package contains the Python bindings for Searpc.
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-compile-demo \
|
||||
--disable-server-pkg
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/{bin,include}
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/searpc* $(1)/usr/include/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
# Include Python 2 bindings in this package to maintain compatibility with previous versions
|
||||
define Package/libsearpc/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
|
||||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/pysearpc
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/pysearpc $(1)$(PYTHON_PKG_DIR)
|
||||
find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/pysearpc/*.py $(1)$(PYTHON_PKG_DIR)/pysearpc/
|
||||
rm -f $(1)$(PYTHON_PKG_DIR)/pysearpc/{pygencode,test_pysearpc}.py
|
||||
endef
|
||||
|
||||
define Py3Build/Compile
|
||||
rm -rf $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc
|
||||
$(INSTALL_DIR) $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/pysearpc/*.py $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc/
|
||||
rm -f $(PKG_INSTALL_DIR)$(PYTHON3_PKG_DIR)/pysearpc/{pygencode,test_pysearpc}.py
|
||||
endef
|
||||
|
||||
Py3Package/python3-searpc/install:=:
|
||||
|
||||
$(eval $(call BuildPackage,libsearpc))
|
||||
|
||||
$(eval $(call Py3Package,python3-searpc))
|
||||
$(eval $(call BuildPackage,python3-searpc))
|
||||
$(eval $(call BuildPackage,python3-searpc-src))
|
||||
|
||||
Reference in New Issue
Block a user