|
| 1 | +include $(TOPDIR)/rules.mk |
| 2 | + |
| 3 | +PKG_NAME:=libdatachannel |
| 4 | +PKG_VERSION:=0.23.2 |
| 5 | +PKG_RELEASE:=1 |
| 6 | + |
| 7 | +PKG_SOURCE_PROTO:=git |
| 8 | +PKG_SOURCE_VERSION:=v$(PKG_VERSION) |
| 9 | +PKG_SOURCE_URL=https://github.com/paullouisageneau/libdatachannel.git |
| 10 | +PKG_MIRROR_HASH:=7246e54391ecc3835995a7721dac4af7d33ac06895ad539b27c7e5fc1e250ad1 |
| 11 | + |
| 12 | +PKG_LICENSE:=MPL-2.0 |
| 13 | +PKG_LICENSE_FILES:=LICENSE |
| 14 | + |
| 15 | +PKG_BUILD_PARALLEL:=1 |
| 16 | + |
| 17 | +include $(INCLUDE_DIR)/package.mk |
| 18 | +include $(INCLUDE_DIR)/cmake.mk |
| 19 | + |
| 20 | +define Package/libdatachannel |
| 21 | + SECTION:=libs |
| 22 | + CATEGORY:=Libraries |
| 23 | + TITLE:=libdatachannel |
| 24 | + URL:=https://libdatachannel.org/ |
| 25 | + DEPENDS:=+libstdcpp +libopenssl +libsrtp2 |
| 26 | +endef |
| 27 | + |
| 28 | +define Package/libdatachannel/description |
| 29 | + libdatachannel is a standalone implementation of WebRTC Data Channels, |
| 30 | + WebRTC Media Transport, and WebSockets in C++ with C bindings for |
| 31 | + multiple platforms, including GNU/Linux, Android, FreeBSD, Apple macOS, |
| 32 | + iOS, and Microsoft Windows. WebRTC is a W3C and IETF standard enabling |
| 33 | + real-time peer-to-peer data and media exchange between two devices. |
| 34 | +endef |
| 35 | + |
| 36 | +CMAKE_OPTIONS+= \ |
| 37 | + -DNO_EXAMPLES=ON \ |
| 38 | + -DUSE_NICE=0 \ |
| 39 | + -DCMAKE_BUILD_TYPE=Release \ |
| 40 | + -DUSE_SYSTEM_SRTP=ON |
| 41 | + |
| 42 | +define Build/InstallDev |
| 43 | + $(INSTALL_DIR) $(1)/usr/include |
| 44 | + $(CP) $(PKG_INSTALL_DIR)/usr/include/rtc $(1)/usr/include/ |
| 45 | + $(INSTALL_DIR) $(1)/usr/lib/ |
| 46 | + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdatachannel.so* $(1)/usr/lib/ |
| 47 | +endef |
| 48 | + |
| 49 | +define Package/libdatachannel/install |
| 50 | + $(INSTALL_DIR) $(1)/usr/lib |
| 51 | + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdatachannel.so* $(1)/usr/lib/ |
| 52 | +endef |
| 53 | + |
| 54 | +$(eval $(call BuildPackage,libdatachannel)) |
0 commit comments