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