No Description

Makefile 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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:=811
  10. PKG_VERSION:=r$(PKG_REV)
  11. PKG_RELEASE:=1
  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:=--username=anonymous --password= https://svn.rtmpd.com/crtmpserver/branches/1.0
  17. PKG_SOURCE_SUBDIR:=crtmpserver-$(PKG_VERSION)
  18. PKG_SOURCE_VERSION:=$(PKG_REV)
  19. PKG_SOURCE_PROTO:=svn
  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. endef
  59. define Build/Compile
  60. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/builders/make \
  61. PLATFORM=linux-openwrt-uclibc -Wno-error -j6
  62. endef
  63. define Package/crtmpserver/install
  64. $(INSTALL_DIR) $(1)/usr/bin
  65. $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver $(1)/usr/bin/
  66. $(INSTALL_DIR) $(1)/usr/lib/crtmpserver
  67. $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/crtmpserver/
  68. $(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
  69. $(INSTALL_DIR) $(1)/usr/lib/crtmpserver/$(app); \
  70. $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
  71. $(1)/usr/lib/crtmpserver/$(app)/; \
  72. )
  73. $(INSTALL_DIR) $(1)/etc
  74. $(INSTALL_CONF) $(PKG_BUILD_DIR)/builders/make/output/dynamic/crtmpserver.lua $(1)/etc/
  75. $(INSTALL_DIR) $(1)/usr/share/crtmpserver/appselector
  76. $(INSTALL_DIR) $(1)/usr/share/crtmpserver/media
  77. $(INSTALL_DIR) $(1)/etc/init.d
  78. $(INSTALL_BIN) ./files/crtmpserver.init $(1)/etc/init.d/crtmpserver
  79. endef
  80. $(eval $(call BuildPackage,crtmpserver))