From 9185c338f0163bbcc091f28ef2fec54412cdbf9f Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 19 Feb 2023 04:44:16 +0000 Subject: [PATCH] libutp: add package Add Transmission version of the uTorrent Transport Protocol library. Signed-off-by: Daniel Golle (cherry picked from commit 1ecef46f1cb00aeac717710e6a25b82b68a2970b) --- libs/libutp/Makefile | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 libs/libutp/Makefile diff --git a/libs/libutp/Makefile b/libs/libutp/Makefile new file mode 100644 index 0000000000..28c755d9f4 --- /dev/null +++ b/libs/libutp/Makefile @@ -0,0 +1,46 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libutp +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/transmission/libutp +PKG_SOURCE_DATE:=2023-02-14 +PKG_SOURCE_VERSION:=c95738b1a6644b919e5b64d3ea9736cfc5894e0b +PKG_MIRROR_HASH:=5e466da0cb45119d58e8dd847da13951c94bfe9f20936f96b43f350d1e49c625 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +PKG_MAINTAINER:=Daniel Golle + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/libutp + SECTION:=libs + CATEGORY:=Libraries + TITLE:=The uTorrent Transport Protocol library + DEPENDS:=+libstdcpp +endef + +# MAKE_VARS+=OPT="-I$(PKG_BUILD_DIR)/include/libutp -I$(PKG_BUILD_DIR)/include" + +CMAKE_OPTIONS += \ + -DLIBUTP_SHARED:BOOL=YES \ + -DLIBUTP_ENABLE_INSTALL:BOOL=YES \ + -DLIBUTP_ENABLE_WERROR:BOOL=YES \ + -DLIBUTP_BUILD_PROGRAMS:BOOL=NO + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/libutp $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/include/libutp/*.h $(1)/usr/include/libutp + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libutp.so $(1)/usr/lib/ +endef + +define Package/libutp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libutp.so $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libutp)) -- 2.30.2