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.

77 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=v4l2rtspserver
  8. PKG_VERSION:=0.2.3
  9. PKG_RELEASE:=$(AUTORELEASE)
  10. #cannot use codeload as this uses submodules
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/mpromonet/v4l2rtspserver
  13. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  14. PKG_MIRROR_HASH:=f047fd24441a070b123252bf82c7d7e42bb0c3280b78ad2ddb01cf200acc3a32
  15. LIVE555_VERSION:=2021.10.28
  16. LIVE555_HASH:=84dd36267940dcea848f54dc1f6d73171a949dee907750fac3a5a0b39e94dbd9
  17. LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz
  18. PKG_MAINTAINER:=Roger Dammit <rogerdammit@gmail.com>
  19. PKG_LICENSE:=Unlicense
  20. PKG_LICENSE_FILES:=LICENSE
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/cmake.mk
  23. define Package/v4l2rtspserver
  24. SECTION:=multimedia
  25. CATEGORY:=Multimedia
  26. TITLE:=v4l2rtspserver
  27. DEPENDS:=+libstdcpp
  28. URL:=https://github.com/mpromonet/v4l2rtspserver
  29. endef
  30. define Package/v4l2rtspserver/description
  31. RTSP server for v4L2 video sources
  32. endef
  33. define Package/v4l2rtspserver/conffiles
  34. /etc/config/v4l2rtspserver
  35. endef
  36. define Download/live555
  37. URL:=https://download.videolan.org/pub/contrib/live555/
  38. FILE:=$(LIVE555_FILE)
  39. HASH:=$(LIVE555_HASH)
  40. endef
  41. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  42. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  43. CMAKE_OPTIONS += \
  44. -DALSA=OFF \
  45. -DLIVE555CFLAGS=" -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLOCALE_NOT_USED -DNO_SSTREAM=1 -DALLOW_RTSP_SERVER_PORT_REUSE=1 -DNO_OPENSSL"
  46. define Build/Prepare
  47. # download live555
  48. $(eval $(call Download,live555))
  49. mkdir -p $(PKG_BUILD_DIR)/live
  50. $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live
  51. $(Build/Prepare/Default)
  52. endef
  53. define Package/v4l2rtspserver/install
  54. $(INSTALL_DIR) $(1)/usr/bin
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v4l2rtspserver $(1)/usr/bin/
  56. $(INSTALL_DIR) $(1)/etc/init.d
  57. $(INSTALL_BIN) files/v4l2rtspserver.init $(1)/etc/init.d/v4l2rtspserver
  58. $(INSTALL_DIR) $(1)/etc/config
  59. $(INSTALL_CONF) files/v4l2rtspserver.config $(1)/etc/config/v4l2rtspserver
  60. endef
  61. $(eval $(call BuildPackage,v4l2rtspserver))