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
+liblua
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,^CCOMPILER[[:space:]]*=.*,CCOMPILER=$(TARGET_CC),' \
57 -e
's,^CXXCOMPILER[[:space:]]*=.*,CXXCOMPILER=$(TARGET_CXX),' \
58 -e
's,^OPTIMIZATIONS[[:space:]]*=.*,OPTIMIZATIONS=-O2,' \
59 -e
's,^SSL_BASE[[:space:]]*=.*,SSL_BASE=$(STAGING_DIR)/usr,' \
60 linux-openwrt-uclibc.mk
)
64 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/builders
/make \
65 PLATFORM
=linux-openwrt-uclibc
68 define Package
/crtmpserver
/install
69 $(INSTALL_DIR
) $(1)/usr
/bin
70 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/builders
/make
/output
/dynamic
/crtmpserver
$(1)/usr
/bin
/
71 $(INSTALL_DIR
) $(1)/usr
/lib
/crtmpserver
72 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/builders
/make
/output
/dynamic
/*.so
$(1)/usr
/lib
/crtmpserver
/
73 $(foreach app
,flvplayback samplefactory admin stresstest appselector vptests applestreamingclient proxypublish
, \
74 $(INSTALL_DIR
) $(1)/usr
/lib
/crtmpserver
/$(app
); \
75 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/builders
/make
/output
/dynamic
/applications
/$(app
)/lib
$(app
).so \
76 $(1)/usr
/lib
/crtmpserver
/$(app
)/; \
78 $(INSTALL_DIR
) $(1)/etc
79 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/builders
/make
/output
/dynamic
/crtmpserver.lua
$(1)/etc
/
80 $(INSTALL_DIR
) $(1)/usr
/share
/crtmpserver
/appselector
81 $(INSTALL_DIR
) $(1)/usr
/share
/crtmpserver
/media
84 $(eval
$(call BuildPackage
,crtmpserver
))