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.

98 lines
3.5 KiB

  1. #
  2. # Copyright (C) 2010 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=crtmpserver
  9. PKG_SOURCE_DATE:=2015-10-04
  10. PKG_SOURCE_VERSION:=b866fffca37c3b967a8878499cd2b91aa2587f34
  11. PKG_RELEASE:=2
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
  13. PKG_SOURCE_URL:=https://codeload.github.com/shiretu/crtmpserver/tar.gz/$(PKG_SOURCE_VERSION)?
  14. PKG_HASH:=3744bef060129fda6f7902eb64f566b0d5049864dc542b2882c550b083ef82aa
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
  16. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  17. PKG_LICENSE:=GPL-3.0
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/crtmpserver
  22. SECTION:=multimedia
  23. CATEGORY:=Multimedia
  24. DEPENDS:=+libstdcpp +libopenssl +liblua
  25. TITLE:=C++ RTMP Server
  26. endef
  27. define Package/crtmpserver/description
  28. C++ RTMP Server it is a high performance streaming server able to
  29. stream (live or recorded) in the following technologies:
  30. * To and from Flash (RTMP,RTMPE, RTMPS, RTMPT, RTMPTE)
  31. * To and from embedded devices: iPhone, Android
  32. * From surveillance cameras
  33. * IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols
  34. Also, crtmpserver can be used as a high performance rendes-vous
  35. server. For example, it enables you to do:
  36. * Audio/Video conferencing
  37. * Online gaming
  38. * Online collaboration
  39. * Simple/complex chat applications
  40. endef
  41. define Package/crtmpserver/conffiles
  42. /etc/crtmpserver.lua
  43. endef
  44. # XXX: this hack handles the usr/bin vs bin difference of backfire and trunk
  45. TS_BASE:=$(wildcard $(TOOLCHAIN_DIR)/bin/$(TARGET_CC))
  46. TS_BASE:=$(dir $(if $(TS_BASE),$(TS_BASE),$(wildcard $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CC))))
  47. define Build/Configure
  48. (cd $(PKG_BUILD_DIR)/builders/make; \
  49. cp linux.mk linux-openwrt-uclibc.mk; \
  50. $(SED) 's,^TOOLCHAIN_BASE[[:space:]]*=.*,TOOLCHAIN_BASE=$(TS_BASE),' \
  51. -e 's,^TOOLCHAIN_PREFIX[[:space:]]*=.*,TOOLCHAIN_PREFIX=$(TARGET_CROSS),' \
  52. -e 's,^CCOMPILER[[:space:]]*=.*,CCOMPILER=$(TARGET_CC),' \
  53. -e 's,^CXXCOMPILER[[:space:]]*=.*,CXXCOMPILER=$(TARGET_CXX) -std=gnu++03,' \
  54. -e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
  55. -e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
  56. linux-openwrt-uclibc.mk)
  57. (cd $(PKG_BUILD_DIR)/sources/common/include/; \
  58. echo '#define CRTMPSERVER_VERSION_RELEASE_NUMBER "$(PKG_VERSION)\n"' > version.h; \
  59. echo '#define CRTMPSERVER_VERSION_CODE_NAME "Git\n"' >> version.h)
  60. endef
  61. define Build/Compile
  62. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/builders/make \
  63. PLATFORM=linux-openwrt-uclibc -Wno-error -j6
  64. endef
  65. define Package/crtmpserver/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver $(1)/usr/bin/
  68. $(INSTALL_DIR) $(1)/usr/lib/crtmpserver
  69. $(CP) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/
  70. $(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
  71. $(INSTALL_DIR) $(1)/usr/lib/crtmpserver/$(app); \
  72. $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
  73. $(1)/usr/lib/crtmpserver/$(app)/; \
  74. )
  75. $(INSTALL_DIR) $(1)/etc
  76. $(INSTALL_CONF) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver.lua $(1)/etc/
  77. $(INSTALL_DIR) $(1)/usr/share/crtmpserver/appselector
  78. $(INSTALL_DIR) $(1)/usr/share/crtmpserver/media
  79. $(INSTALL_DIR) $(1)/etc/init.d
  80. $(INSTALL_BIN) ./files/crtmpserver.init $(1)/etc/init.d/crtmpserver
  81. endef
  82. $(eval $(call BuildPackage,crtmpserver))