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.

80 lines
2.3 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.1.9
  9. PKG_RELEASE:=1
  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:=bcb68170f6b6a3560902673c4145d0311d4f661b2ed3d71ed1ee1a58bdde96d2
  15. LIVE555_VERSION:=2019.11.22
  16. LIVE555_HASH:=cd10fbd2d28d0bc39c12ec57b9f6b13fab3bfc7005f5ac8f9c94a9eb34179e90
  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. PKG_BUILD_PARALLEL:=1
  22. CMAKE_INSTALL:=1
  23. include $(INCLUDE_DIR)/uclibc++.mk
  24. include $(INCLUDE_DIR)/package.mk
  25. include $(INCLUDE_DIR)/cmake.mk
  26. define Package/v4l2rtspserver
  27. SECTION:=multimedia
  28. CATEGORY:=Multimedia
  29. TITLE:=v4l2rtspserver
  30. DEPENDS:=$(CXX_DEPENDS)
  31. URL:=https://github.com/mpromonet/v4l2rtspserver
  32. endef
  33. define Package/v4l2rtspserver/description
  34. RTSP server for v4L2 video sources
  35. endef
  36. define Package/v4l2rtspserver/conffiles
  37. /etc/config/v4l2rtspserver
  38. endef
  39. define Download/live555
  40. URL:=https://download.videolan.org/pub/contrib/live555/
  41. FILE:=$(LIVE555_FILE)
  42. HASH:=$(LIVE555_HASH)
  43. endef
  44. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  45. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  46. CMAKE_OPTIONS += -DALSA=OFF -DLIVE555CFLAGS="$(TARGET_CFLAGS) -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 -DVERSION=\\\"$(PKG_VERSION)\\\""
  47. define Build/Prepare
  48. $(Build/Prepare/Default)
  49. # download live555
  50. $(eval $(call Download,live555))
  51. mkdir -p $(PKG_BUILD_DIR)/live
  52. $(TAR) -xf $(DL_DIR)/$(LIVE555_FILE) --strip=1 -C $(PKG_BUILD_DIR)/live
  53. endef
  54. define Package/v4l2rtspserver/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v4l2rtspserver $(1)/usr/bin/
  57. $(INSTALL_DIR) $(1)/etc/init.d
  58. $(INSTALL_BIN) files/v4l2rtspserver.init $(1)/etc/init.d/v4l2rtspserver
  59. $(INSTALL_DIR) $(1)/etc/config
  60. $(INSTALL_CONF) files/v4l2rtspserver.config $(1)/etc/config/v4l2rtspserver
  61. endef
  62. $(eval $(call BuildPackage,v4l2rtspserver))