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