2 # Copyright (C) 2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
12 PKG_VERSION:=r$(PKG_REV)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=--username=anonymous --password= https://svn.rtmpd.com/crtmpserver/trunk
17 PKG_SOURCE_SUBDIR:=crtmpserver-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=$(PKG_REV)
21 include $(INCLUDE_DIR)/package.mk
23 define Package/crtmpserver
26 DEPENDS:=+libopenssl +libstdcpp
27 TITLE:=C++ RTMP Server
28 URL:=http://www.rtmpd.com/
31 define Package/crtmpserver/description
32 C++ RTMP Server it is a high performance streaming server able to
33 stream (live or recorded) in the following technologies:
34 * To and from Flash (RTMP,RTMPE, RTMPS, RTMPT, RTMPTE)
35 * To and from embedded devices: iPhone, Android
36 * From surveillance cameras
37 * IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols
39 Also, crtmpserver can be used as a high performance rendes-vous
40 server. For example, it enables you to do:
41 * Audio/Video conferencing
43 * Online collaboration
44 * Simple/complex chat applications
47 # XXX: this hack handles the usr/bin vs bin difference of backfire and trunk
48 TS_BASE:=$(wildcard $(TOOLCHAIN_DIR)/bin/$(TARGET_CC))
49 TS_BASE:=$(dir $(if $(TS_BASE),$(TS_BASE),$(wildcard $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CC))))
51 define Build/Configure
52 (cd $(PKG_BUILD_DIR)/builders/make; \
53 cp linux.mk linux-openwrt-uclibc.mk; \
54 $(SED) 's,^TOOLCHAIN_BASE[[:space:]]*=.*,TOOLCHAIN_BASE=$(TS_BASE),' \
55 -e 's,^TOOLCHAIN_PREFIX[[:space:]]*=.*,TOOLCHAIN_PREFIX=$(TARGET_CROSS),' \
56 -e 's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
57 -e 's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
58 linux-openwrt-uclibc.mk)
62 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/builders/make \
63 PLATFORM=linux-openwrt-uclibc
66 define Package/crtmpserver/install
67 $(INSTALL_DIR) $(1)/usr/bin
68 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/rtmpserver $(1)/usr/bin/
69 $(INSTALL_DIR) $(1)/usr/lib/rtmpserver
70 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/*.so $(1)/usr/lib/rtmpserver/
71 $(foreach app,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish, \
72 $(INSTALL_DIR) $(1)/usr/lib/rtmpserver/$(app); \
73 $(INSTALL_BIN) $(PKG_BUILD_DIR)/builders/make/output/dynamic/applications/$(app)/lib$(app).so \
74 $(1)/usr/lib/rtmpserver/$(app)/; \
76 $(INSTALL_DIR) $(1)/etc
77 $(INSTALL_DATA) $(PKG_BUILD_DIR)/builders/make/output/dynamic/rtmpserver.lua $(1)/etc/
78 $(INSTALL_DIR) $(1)/usr/share/rtmpserver/appselector
79 $(INSTALL_DIR) $(1)/usr/share/rtmpserver/media
82 $(eval $(call BuildPackage,crtmpserver))