diff options
author | Daniel Golle <daniel@makrotopia.org> | 2023-02-19 04:44:16 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2023-03-07 01:40:14 +0000 |
commit | 1ecef46f1cb00aeac717710e6a25b82b68a2970b (patch) | |
tree | dfecbe2eebd27df13f0e62004fa29c100704c827 | |
parent | a281a8af9f7b74960a52a3e102fc636c0722b92c (diff) |
libutp: add package
Add Transmission version of the uTorrent Transport Protocol library.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r-- | libs/libutp/Makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/libs/libutp/Makefile b/libs/libutp/Makefile new file mode 100644 index 000000000..28c755d9f --- /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 <daniel@makrotopia.org> + +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)) |