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_REV:=b6fdcdb953d1e99c48a0c37a8c80f2cad2db443b
  10. PKG_VERSION:=2012-07-18+git-$(PKG_REV)
  11. PKG_RELEASE:=4
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://codeload.github.com/j0sh/crtmpserver/tar.gz/$(PKG_REV)?
  14. PKG_HASH:=e210eeb99d39334e7beb0a1be27dcf23d1f851383f87cf63d7fb98209ef96cee
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REV)
  16. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  17. PKG_LICENSE:=GPL-3.0
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/uclibc++.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/crtmpserver
  22. SECTION:=multimedia
  23. CATEGORY:=Multimedia
  24. DEPENDS:=$(CXX_DEPENDS) +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. $(INSTALL_BIN) $(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))