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