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.

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